Skip to content

Update dependencies#377

Merged
abovedave merged 17 commits intoproductionfrom
update-dependencies
Mar 27, 2025
Merged

Update dependencies#377
abovedave merged 17 commits intoproductionfrom
update-dependencies

Conversation

@abovedave
Copy link
Copy Markdown
Collaborator

@abovedave abovedave commented Mar 25, 2025

  • Upgrades all dependencies to latest versions, including typescript.
  • Adds an .nvmrc file as we've done in other packages.
  • Removes the old concat package which was causing ts errors in favour of a native solution.
  • Couple of changes to tsconfig.json to resolve build errors.

@abovedave abovedave added the dependencies Pull requests that update a dependency file label Mar 25, 2025
@abovedave abovedave marked this pull request as draft March 25, 2025 12:55
Comment on lines +2 to +3
export namespace Icons {}
export namespace Spots {}
Copy link
Copy Markdown
Collaborator Author

@abovedave abovedave Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a bit stuck here with an error of the package not being found before build, not sure if this breaks anything or not.

The errors were:

Cannot find module '@stackoverflow/stacks-icons/icons' or its corresponding type declarations.
Cannot find module '@stackoverflow/stacks-icons/spots' or its corresponding type declarations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that's odd. I can't reproduce that locally and the original exports make the icon and spot types available when developing around the codebase.

Is this reported from a regular npm start/npm run build?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to recommend caution with changing those declaration files. They could cause unexpected type errors for consumers down the line. If changes need to be made here I would recommend to manually test them in Core before merging to see how the TS compiler reacts there. 🙂

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can replicate by deleting your dist folder to simulate a fresh build.

I've figured it out by using @ts-expect-error, which is what we use in the other files in this folder. Should be good now!

Copy link
Copy Markdown
Collaborator Author

@abovedave abovedave Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok small update, that works on the CI, but locally it means on the next run it throws an error because it is expecting the error, so @ts-ignore looks the best bet, but I had to push an update to the link rules to allow it with a description.

Alternative would maybe be just be a @ts-nocheck in this file?

@abovedave abovedave marked this pull request as ready for review March 25, 2025 13:22
Copy link
Copy Markdown
Contributor

@dancormier dancormier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this housekeeping PR @abovedave!

Upgrades all dependencies to latest versions, including typescript.

💯 Thank you!

Adds an .nvmrc file as we've done in other packages.

👍 This seems reasonable enough. I dug around in the stacks-* repos and found that we don't include an .nvmrc file in any of them. Makes me wonder if it's worth adding just for consistency 🤔

Removes the old [concat](https://www.npmjs.com/package/concat) package which was causing ts errors in favour of a native solution.

One fewer dependencies. Nice!

Couple of changes to tsconfig.json to resolve build errors.

I made some notes about this and the changes to package.json scripts. Just a little cleanup.

Comment on lines +2 to +3
export namespace Icons {}
export namespace Spots {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that's odd. I can't reproduce that locally and the original exports make the icon and spot types available when developing around the codebase.

Is this reported from a regular npm start/npm run build?

@abovedave abovedave requested a review from dancormier March 26, 2025 10:57
After first build there is no longer an error produced here, so ignore is probably a better choice
Copy link
Copy Markdown
Contributor

@dancormier dancormier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me. Thanks @abovedave!

@abovedave abovedave merged commit d99a967 into production Mar 27, 2025
3 checks passed
@abovedave abovedave deleted the update-dependencies branch March 27, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants