-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Node10 deprecation fixes #73574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Node10 deprecation fixes #73574
Conversation
Regarding ltx, what's the difference in behaviour between just keeping the entire package as de facto CJS as it is currently, versus subtyping specific paths as |
The first change I had to make to make the tests compile was adding the import parsers = require("ltx/src/parsers.js") and if those files are not correctly marked as ESM, that |
Where is @typescript-bot? 🤔 |
The bot does not respond to PRs sent from the repo itself, only forks. It's a bug. I'm going to quick capture a test to understand why it's breaking before I forget. |
The test implies it should be replying, so it's possibly some other permission problem with the token... |
@typescript-bot hello |
@andrewbranch Thank you for submitting this PR! This is a live comment that I will keep updated. 8 packages in this PR
Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 7 days. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 73574,
"author": "andrewbranch",
"headCommitOid": "6ab0c44470843dd7d2245bcd1974988e5df53522",
"mergeBaseOid": "fe9f2bfc7c6569a075c68ed4cb1a1e0a3d900d00",
"lastPushDate": "2025-08-28T22:10:13.000Z",
"lastActivityDate": "2025-08-29T16:16:02.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "array-normalize",
"kind": "edit",
"files": [
{
"path": "types/array-normalize/array-normalize-tests.mts",
"kind": "test"
},
{
"path": "types/array-normalize/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"BendingBender"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "cypress-dotenv",
"kind": "edit",
"files": [
{
"path": "types/cypress-dotenv/package.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-packagejson) and not moving towards it (check: `peerDependencies`)"
}
],
"owners": [
"daikiojm",
"peterblazejewicz"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "dotenv-defaults",
"kind": "edit",
"files": [
{
"path": "types/dotenv-defaults/package.json",
"kind": "package-meta-ok"
}
],
"owners": [
"peterblazejewicz"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "dotenv-safe",
"kind": "edit",
"files": [
{
"path": "types/dotenv-safe/package.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-packagejson) and not moving towards it (check: `peerDependencies`)"
}
],
"owners": [
"krenor"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
},
{
"name": "expect-puppeteer",
"kind": "edit",
"files": [
{
"path": "types/expect-puppeteer/expect-puppeteer-tests.ts",
"kind": "test"
},
{
"path": "types/expect-puppeteer/tsconfig.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) and not moving towards it (check: `compilerOptions.esModuleInterop`)"
}
],
"owners": [
"tkrotoff",
"jfm710"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "fs-extra",
"kind": "edit",
"files": [
{
"path": "types/fs-extra/test/fs-extra-tests-module.mts",
"kind": "test"
},
{
"path": "types/fs-extra/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"alan-agius4",
"midknight41",
"shiftkey",
"mees-",
"jrockwood",
"sangdth",
"ffflorian",
"peterblazejewicz",
"NotWoods",
"BendingBender"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
},
{
"name": "hot-formula-parser",
"kind": "edit",
"files": [
{
"path": "types/hot-formula-parser/hot-formula-parser-tests.mts",
"kind": "test"
},
{
"path": "types/hot-formula-parser/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"joao-mbn"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
},
{
"name": "ltx",
"kind": "edit",
"files": [
{
"path": "types/ltx/lib/DOMElement.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/Element.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/JSONify.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/Parser.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/clone.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/createElement.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/equal.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/escape.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/is.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/ltx.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/ltx/lib/parse.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/parsers.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/parsers/libxmljs.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/parsers/ltx.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/parsers/node-expat.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/parsers/node-xml.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/parsers/sax-js.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/parsers/saxes.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/stringify.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/tag.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/lib/tagString.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/ltx-tests.mts",
"kind": "test"
},
{
"path": "types/ltx/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/ltx/src/DOMElement.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/Element.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/JSONify.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/Parser.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/clone.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/createElement.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/equal.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/escape.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/is.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/ltx.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/ltx/src/parse.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/parsers.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/parsers/libxmljs.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/parsers/ltx.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/parsers/node-expat.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/parsers/node-xml.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/parsers/sax-js.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/parsers/saxes.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/stringify.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/tag.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/src/tagString.d.ts",
"kind": "definition"
},
{
"path": "types/ltx/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"BendingBender"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [],
"mainBotCommentID": 3235348553,
"ciResult": "pass"
} |
🔔 @BendingBender @daikiojm @peterblazejewicz @krenor @tkrotoff @jfm710 @alan-agius4 @midknight41 @shiftkey @mees- @jrockwood @sangdth @ffflorian @NotWoods @joao-mbn — please review this PR in the next few days. Be sure to explicitly select |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dt-tools definitely can't handle this one; this will be skipped entirely in the built package, and probably break linting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Break linting as in, it will probably think these are script files (like we have a sub package in the node dirs)
I would honestly just delete |
It looks like ltx has actually just removed the CJS side of the package (xmppjs/ltx#160), it just hasn't been published yet. Is the easiest thing just to wait for this to hit a published version, and then update DT accordingly, rather than necessitating a change to the tooling? |
Alternatively, with that being the case, would it be easier to make a "legal fiction" change now, and fix the exports map while still assuming a CJS module (as the types do currently), since the package can be updated to a proper It feels like chasing the edge case (submodule exports from a package that uses nested package.json stubs to change the module type of specific subpaths) for one specific and soon-not-to-exist example probably isn't worth the effort? |
Yeah, I can probably find a less disruptive way to make ltx compile. |
Fixing breakages from microsoft/TypeScript#62338
Not Fixed
babel-plugin-glaze
Typings for
glaze
are broken when respecting package.jsonexports
. The last publish was 5+ years ago.Fixed
array-normalize, fs-extra, hot-formula-parser
These were dual ESM/CJS packages using a bit of a hack to test the ESM and CJS entrypoints, which broke when respecting package.json
exports
. Converted them to--module node16
and fixed test imports.cypress-dotenv, dotenv-safe
These had a dependency on an old version of dotenv that has typings that are broken when respecting package.json
exports
. In reality, the dependency should have been a peerDependency. Updated their self versions, moved dependency to peerDependency with version matching the implementation package, and added a devDependency version to ensure the one installed for testing has working types.dotenv-defaults
This one has a true dependency on dotenv, but the latest version of dotenv-defaults requires a dotenv version greater than the one where typings were fixed. Updated the self version and dependency version.
expect-puppeteer
Tests exercised
await import
, which behaves differently with/withoutesModuleInterop
, which is implied bybundler
. SetesModuleInterop
totrue
in tsconfig.ltx
Typings intended to reflect a dual ESM/CJS package but wasn’t quite right. Had to move a lot of stuff around and use nested package.json files, which I'm not sure DT-tools can handle currently, but we should add support if needed, because there's no other way to do this correctly.