Skip to content

Use "unknown" instead of "any"#741

Open
wasd171 wants to merge 5 commits into
gajus:mainfrom
wasd171:unknown-instead-of-any
Open

Use "unknown" instead of "any"#741
wasd171 wants to merge 5 commits into
gajus:mainfrom
wasd171:unknown-instead-of-any

Conversation

@wasd171
Copy link
Copy Markdown

@wasd171 wasd171 commented Dec 12, 2025

This should fix #740

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 12, 2025

🦋 Changeset detected

Latest commit: d0286be

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@slonik/sql-tag Major
slonik Major
@slonik/pg-driver Major
slonik-sql-tag-raw Major
@slonik/benchmark Major
@slonik/dataloaders Major
slonik-interceptor-field-name-transformation Major
slonik-interceptor-query-cache Major
slonik-interceptor-query-logging Major
@slonik/driver Major
@slonik/errors Major
@slonik/test-ssls Major
@slonik/types Major
@slonik/utilities Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Dec 12, 2025

^ cannot run pnpm commands because slonik@48.8.8 is not published to NPM

@gajus
Copy link
Copy Markdown
Owner

gajus commented Jan 20, 2026

Sorry for overlooking this. Let me know if you're still planning on updating.

@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Jan 21, 2026

I will update it this-next week

@wasd171 wasd171 force-pushed the unknown-instead-of-any branch from 5a96512 to 5d84846 Compare February 1, 2026 13:05
@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Feb 1, 2026

@gajus could you please trigger the pipeline?

@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Feb 11, 2026

@gajus pushed an update, hopefully this would work with the latest changes from main

@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Mar 7, 2026

@gajus is there something I could do to move this PR forward? 🥲

@wasd171 wasd171 force-pushed the unknown-instead-of-any branch 2 times, most recently from 9a0616d to 1cbe9e4 Compare March 7, 2026 20:22
@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Mar 7, 2026

Hey @gajus , I've looked into the latest failures, it looks like the issue is that CI is not using the workspace @slonik/* packages, rather the latest version that is available on NPM. This causes type issues, since locally updated types of @slonik/sql-tag are not passed to e.g. slonik. That means that tests of slonik use new types, but dependency types of @slonik/sql-tag are outdated. I've added this commit to use workspace:* protocol to fix it. However, I don't think that this specific commit should be merged to main since it might break your release process.

Could you please take a look at it? I'd like to get this PR released, but I also don't have a good enough understanding of your release infrastructure to just replace all monorepo links with workspace:*

@wasd171 wasd171 force-pushed the unknown-instead-of-any branch 2 times, most recently from f0b5b52 to 68853c4 Compare March 8, 2026 11:27
@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Mar 8, 2026

Actually, I think it should just work™ and is working already with some of your private dependencies (e.g. @slonik/driver has "@slonik/eslint-config": "workspace:^" as a devDependency and on NPM it is replaced with the current version (consistent with what the docs describe). I went through the packages/* and replaced all monorepo dependencies with workspace:^. This should:

  1. Run all CI checks on a consistent set of packages
  2. Replace workspace:^ with ^ACTUAL_VERSION when publishing to NPM

Tested the following locally:

pnpm install -r

pnpm run -r build
pnpm run -r lint
pnpm run -r test

^ everything worked OK

@wasd171 wasd171 force-pushed the unknown-instead-of-any branch from 68853c4 to 126530d Compare March 16, 2026 08:37
@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Mar 16, 2026

@gajus I've rebased this PR, ready for review

@wasd171
Copy link
Copy Markdown
Author

wasd171 commented Mar 23, 2026

@gajus do you have capacity to check this PR? would be happy to adapt it, if needed

@wasd171 wasd171 force-pushed the unknown-instead-of-any branch from 126530d to d0286be Compare April 20, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql.unsafe produces results of type "any / any[]" that triggers @typescript-eslint/no-unsafe-assignment

2 participants