You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed noEmit: true from packages/upgrade/tsconfig.json. This actually reveals the following error in CI. This is an old bug but since we didn't emit .d.ts files we didn't find it out.
@astrojs/upgrade@0.7.2 : typecheck:tests packages/upgrade
> @astrojs/upgrade@0.7.2 typecheck:tests /home/runner/work/astro/astro/packages/upgrade
> tsc --build tsconfig.test.json
Error: test/install.test.ts(30,17): error TS2345: Argument of type '{ packages: { name: string; currentVersion: string; targetVersion: string; }[]; cwd: string; version: string; packageManager: string; dryRun: boolean; }' is not assignable to parameter of type 'Pick<Context, "version" | "packages" | "packageManager" | "prompt" | "dryRun" | "exit" | "cwd">'.
Type '{ packages: { name: string; currentVersion: string; targetVersion: string; }[]; cwd: string; version: string; packageManager: string; dryRun: boolean; }' is missing the following properties from type 'Pick<Context, "version" | "packages" | "packageManager" | "prompt" | "dryRun" | "exit" | "cwd">': prompt, exit
Actually fix the TS typing so that this error is gone.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
The reason will be displayed to describe this comment to others. Learn more.
upgrade.js is a mistake. That file has been renamed to upgrade.mjs.
Since @astrojs/upgrade is a CLI, we probably don't want to ship dist/**/*.d.ts files to the NPM registry. Maybe that's why we had noEmit: true in the first place. Anyway, I get rid of all dist/**/*.d.ts files when publishing by only including .js and .mjs files.
(We currently only emit .js files; I added .mjs just in case we want to ship .mjs files in the future)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
noEmit: truefrompackages/upgrade/tsconfig.json. This actually reveals the following error in CI. This is an old bug but since we didn't emit.d.tsfiles we didn't find it out.Testing
Docs