fix(linting): add missing tsc project references between lint packages - #5184
Merged
Conversation
Without these references, tsc -b couldn't resolve @equinor/fusion-framework-lint-core / lint-config types when a package was built in isolation (as happens during npm publish's prepack step). This caused the publish job for PR #5166 to fail partway through, leaving react-router@2.4.0, the CLI, and most other packages tagged but never published to npm.
🦋 Changeset detectedLatest commit: 0ec7386 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
Contributor
Coverage Report
File CoverageNo changed files found. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The release job for PR #5166 failed partway through with:
Root cause:
packages/linting/{cli,lsp,config,rules}/tsconfig.jsonwere missing TypeScript projectreferencesto their workspace dependencies. Local/full monorepo builds masked this (dist output from a previous full build was already present), butnpm publish's per-packageprepackscript runstsc -bin isolation, which failed to resolve types for packages it hadn't been told to build first.Impact of the failure: git tags were pushed for all 23 packages in the release, but only 5 actually published to npm (
fusion-imports,fusion-load-env,fusion-log,vite-plugin-markdown,vite-plugin-routes-dsl). The remaining 18 — including@equinor/fusion-framework-react-router@2.4.0and@equinor/fusion-framework-cli@15.2.2— are 404 on the registry despite the tags existing.What
Added
referencesentries:lint-rules→lint-corelint-config→lint-core,lint-rulesfusion-lint(cli) →lint-core,lint-configlint-lsp→lint-core,lint-config(
fusion-ts-lint-vscodeusestsc --noEmitand doesn't import lint-core/config types directly, so it didn't need a reference.)Validation
dist/.tsbuildinfooutput and rantsc -b --forcefor each oflint-core,lint-rules,lint-config,fusion-lint,lint-lspindividually (simulating the isolatedprepackbuild) — all succeed and correctly build their dependencies transitively.fusion-ts-lint-vscodetsc --noEmit— clean.pnpm exec biome lint packages/linting— 98 files, no issues.npx vitest run --project '*lint*'— 22 test files, 289 tests, all passing.Next step after merge
Once this merges and versions/publishes cleanly, the 18 packages that were tagged but never published in the PR #5166 release will need a follow-up release to actually reach npm.