build(deps): make _shared a proper TypeScript composite module; fix TS 6.0 compat across JS actions#4074
Closed
Copilot wants to merge 2 commits intodependabot/npm_and_yarn/js/appauth/dependencies-2474829eb6from
Conversation
…references - Add js/_shared/tsconfig.json as composite project (emitDeclarationOnly) - Generate js/_shared/retry/index.d.ts type declarations - Add project references to consuming packages (appauth, checks) - Fix TypeScript 6.0 compatibility: ignoreDeprecations, types, rootDir - Fix ts-jest caching bug in appauth/mutex via globals config - Rebuild dist for dispatch, checks, hashfiles, retest Agent-Logs-Url: https://github.com/envoyproxy/toolshed/sessions/349649d7-a46f-49a8-b9a4-2ebc6c7dbbf7 Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Rebuild and commit dist files for JS actions
build(deps): make May 4, 2026
_shared a proper TypeScript composite module; fix TS 6.0 compat across JS actions
This was referenced May 4, 2026
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.
The dependabot dep bump to TypeScript 6.0 broke all JS action builds because
_sharedwas included in consuming packages by wideningrootDir— TS 6.0 makes this a hard error. Additionally,dist/bundles needed rebuilding against the new deps.js/_shared→ TypeScript composite projectAdded
js/_shared/tsconfig.json:{ "compilerOptions": { "composite": true, "declaration": true, "emitDeclarationOnly": true, "lib": ["ES2022", "DOM"], ... } }emitDeclarationOnly— emits only.d.tsdeclarations (no.js), so jest doesn't accidentally resolve the compiled output instead of the sourcejs/_shared/retry/index.d.tsConsuming packages use project references
appauth/tsconfig.jsonandchecks/tsconfig.jsonnow declare:TypeScript resolves
import from '../../_shared/retry'via the declaration file — norootDirviolation, no source leakage into the compilation.TypeScript 6.0 compatibility fixes
tsconfig.test.jsonfiles: added"ignoreDeprecations": "6.0"to suppress themoduleResolution=nodedeprecation warning ts-jest forces at runtimemutex/tsconfig.json: added"jest"totypes(was["node"]only), consistent with all other packagests-jest ConfigSet caching bug workaround (
appauth,mutex)ts-jest 29 has a bug where the
.jstransform'sConfigSet(keyed on the shared jestconfigobject reference) is created first and reused for all transforms, ignoring the.tstransform'stsconfigpath. Fixed injest.config.jsfor both packages by adding aglobals['ts-jest']stanza that is always read before any transform-level override:Rebuilt
dist/bundlesRebuilt dist for:
dispatch,github/checks,hashfiles,retest.Original prompt
This pull request was created from Copilot chat.