Skip to content

Commit 22f9041

Browse files
build(deps): update dependencies, changeset tooling and the release action (#22048)
* build(deps): update dependencies, changeset tooling and the release action Refreshes every dependency that is in range (enhanced-resolve 5.24.5 among them) and takes the majors that fit: es-module-lexer 3, three 0.186 and @changesets/get-github-info 1. es-module-lexer 3 renames what it reports, so FileSystemInfo reads `type`/`specifier`/`start`/`end` and calls `init()`; it also decodes a literal specifier itself, leaving `parseString` to the wider expressions. @changesets/get-github-info 1 replaces `getInfo`/`getInfoFromPullRequest` with `getCommitInfo`/`getPullRequestInfo`, so the changelog generator flattens the new result into the links a line is built from. eslint stays on 9: 10 drops `context.getSourceCode`, which eslint-config-webpack's own rules still call. typescript stays on 6, which is what that config's peer range allows. Claude-Session: https://claude.ai/code/session_01FKKK1KEVdGYTBLg9wPSYd4 * build(deps): hold three at 0.185, which still ships a minified build 0.186 drops every `.min.js` from `build/`, and the js-parser-unit benchmark reads `three.module.min.js` to measure the parser against minified source. The fixture is pinned for what it ships, so the bump buys nothing and costs that arm. Claude-Session: https://claude.ai/code/session_01FKKK1KEVdGYTBLg9wPSYd4 * build(deps): update the snapshots schema-utils 4.4 now names types in Its "these properties are valid" list gained the type of every property whose schema is a simple leaf, so `binary?` reads `binary?: boolean` and `apply` reads `apply: function`, while a union like `dataUrl?` stays as it was. Seven snapshots quote that list: one in `configCases/errors`, shared by ConfigTestCases and ConfigCacheTestCases, and six inline in Validation.test.js, which runs in the integration matrix behind `basic`. Claude-Session: https://claude.ai/code/session_01FKKK1KEVdGYTBLg9wPSYd4 * build(deps): hold es-module-lexer at 2, whose wasm the baseline can run 3.0's full build — the one `require("es-module-lexer")` resolves to and `FileSystemInfo` reads `.mjs` build dependencies with — compiles a wasm module using SIMD (opcode prefix 0xfd), which needs V8 9.1, so Node 10, 12 and 14 reject it. `init()` rejecting there reaches the job's callback as a build error rather than degrading, and `lib/` ships to Node >= 10.13. 2.x carries no SIMD, so the range stays and the lexer reads as it did; `^2.1.0` now resolves 2.3.2. The changeset goes back to its one sentence. Claude-Session: https://claude.ai/code/session_01FKKK1KEVdGYTBLg9wPSYd4
1 parent f1c6430 commit 22f9041

7 files changed

Lines changed: 554 additions & 536 deletions

File tree

‎.changeset/changelog-generator.mjs‎

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
import { getInfo, getInfoFromPullRequest } from "@changesets/get-github-info";
1+
import { getCommitInfo, getPullRequestInfo } from "@changesets/get-github-info";
22

33
/** @import { ChangelogFunctions } from "@changesets/types" */
4+
/** @import { CommitInfo, PullRequestInfo } from "@changesets/get-github-info" */
5+
6+
/**
7+
* @typedef {object} Links
8+
* @property {string | null} commit markdown link to the commit
9+
* @property {string | null} pull markdown link to the pull request
10+
* @property {string | null} user markdown link to the author
11+
*/
412

513
/**
614
* @returns {{ GITHUB_SERVER_URL: string }} value
@@ -35,6 +43,20 @@ async function withRetry(fn) {
3543
throw lastError;
3644
}
3745

46+
/**
47+
* Flattens a lookup result into the markdown links a changelog line is built
48+
* from; a lookup that found nothing leaves every link `null`.
49+
* @param {CommitInfo | PullRequestInfo | undefined} info lookup result
50+
* @returns {Links} links
51+
*/
52+
function toLinks(info) {
53+
return {
54+
commit: info && info.commit ? info.commit.markdownLink : null,
55+
pull: info && info.pull ? info.pull.markdownLink : null,
56+
user: info && info.author ? info.author.markdownLink : null
57+
};
58+
}
59+
3860
/** @type {ChangelogFunctions} */
3961
const changelogFunctions = {
4062
getDependencyReleaseLine: async (
@@ -53,13 +75,13 @@ const changelogFunctions = {
5375
await Promise.all(
5476
changesets.map(async (cs) => {
5577
if (cs.commit) {
56-
const { links } = await withRetry(() =>
57-
getInfo({
78+
const info = await withRetry(() =>
79+
getCommitInfo({
5880
repo: options.repo,
5981
commit: cs.commit
6082
})
6183
);
62-
return links.commit;
84+
return toLinks(info).commit;
6385
}
6486
})
6587
)
@@ -110,30 +132,28 @@ const changelogFunctions = {
110132

111133
const links = await (async () => {
112134
if (prFromSummary !== undefined) {
113-
let { links } = await withRetry(() =>
114-
getInfoFromPullRequest({
135+
const info = await withRetry(() =>
136+
getPullRequestInfo({
115137
repo: options.repo,
116138
pull: prFromSummary
117139
})
118140
);
141+
const links = toLinks(info);
119142
if (commitFromSummary) {
120143
const shortCommitId = commitFromSummary.slice(0, 7);
121-
links = {
122-
...links,
123-
commit: `[\`${shortCommitId}\`](${GITHUB_SERVER_URL}/${options.repo}/commit/${commitFromSummary})`
124-
};
144+
links.commit = `[\`${shortCommitId}\`](${GITHUB_SERVER_URL}/${options.repo}/commit/${commitFromSummary})`;
125145
}
126146
return links;
127147
}
128148
const commitToFetchFrom = commitFromSummary || changeset.commit;
129149
if (commitToFetchFrom) {
130-
const { links } = await withRetry(() =>
131-
getInfo({
150+
const info = await withRetry(() =>
151+
getCommitInfo({
132152
repo: options.repo,
133153
commit: commitToFetchFrom
134154
})
135155
);
136-
return links;
156+
return toLinks(info);
137157
}
138158
return {
139159
commit: null,

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Create Release Pull Request or Publish to npm
3535
id: changesets
36-
uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1
36+
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
3737
with:
3838
github-token: ${{ secrets.GITHUB_TOKEN }}
3939
# `changeset publish` refuses to run under Yarn Classic, so npm

‎eslint.config.mjs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ export default defineConfig([
291291
languageOptions: {
292292
ecmaVersion: 2025
293293
},
294+
settings: {
295+
// exports-only package, which the node resolver predates
296+
"import/core-modules": ["@changesets/get-github-info"]
297+
},
294298
rules: {
295299
"no-console": "off",
296300
"n/no-unsupported-features/node-builtins": "off"

‎package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"lint:types-hot": "tsc -p tsconfig.hot.json",
4242
"lint:types-module-test": "tsc -p tsconfig.module.test.json",
4343
"lint:comments": "node tooling/check-comment-length.js",
44-
"lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
44+
"lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
4545
"validate:changeset": "node .changeset/changeset-validate.mjs",
4646
"validate:types": "tsc -p tsconfig.validation.json",
4747
"fmt": "yarn fmt:base --log-level warn --write",
@@ -58,7 +58,7 @@
5858
"benchmark:html-tools": "node tooling/compare-html-tools.js",
5959
"benchmark:html-tools:setup": "node tooling/compare-html-tools.js --setup",
6060
"benchmark:js-tools": "node tooling/compare-js-tools.js",
61-
"measure:color-agreement": "node tooling/measure-color-agreement.js",
61+
"measure:color-agreement": "node tooling/measure-color-agreement.js",
6262
"pretest": "yarn lint",
6363
"test": "yarn test:base",
6464
"test:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --workerIdleMemoryLimit=512MB --logHeapUsage",
@@ -131,7 +131,7 @@
131131
"@babel/core": "^8.0.1",
132132
"@babel/preset-react": "^8.0.1",
133133
"@changesets/cli": "^3.0.1",
134-
"@changesets/get-github-info": "^0.8.0",
134+
"@changesets/get-github-info": "^1.0.1",
135135
"@codspeed/core": "^5.5.0",
136136
"@mdn/browser-compat-data": "^8.0.9",
137137
"@types/convert-source-map": "^2.0.3",
@@ -155,7 +155,7 @@
155155
"date-fns": "^4.4.0",
156156
"es5-ext": "^0.10.53",
157157
"es6-promise-polyfill": "^1.2.0",
158-
"eslint": "^9.39.2",
158+
"eslint": "^9.39.5",
159159
"eslint-config-webpack": "^4.9.3",
160160
"eslint-scope": "^9.1.2",
161161
"eta": "^4.6.0",

‎test/Validation.test.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -379,14 +379,14 @@ describe("Validation", () => {
379379
expect(msg).toMatchInlineSnapshot(`
380380
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
381381
- configuration.plugins[0] should be one of these:
382-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
382+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
383383
-> Plugin of type object or instanceof Function.
384384
Details:
385385
* configuration.plugins[0] should be one of these:
386386
false | 0 | \\"\\" | null | undefined
387387
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
388388
* configuration.plugins[0] should be an object:
389-
object { apply, … }
389+
object { apply: function, … }
390390
-> Plugin instance.
391391
* configuration.plugins[0] should be an instance of function.
392392
-> Function acting as plugin."
@@ -403,14 +403,14 @@ describe("Validation", () => {
403403
expect(msg).toMatchInlineSnapshot(`
404404
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
405405
- configuration.plugins[0] should be one of these:
406-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
406+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
407407
-> Plugin of type object or instanceof Function.
408408
Details:
409409
* configuration.plugins[0] should be one of these:
410410
false | 0 | \\"\\" | null | undefined
411411
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
412412
* configuration.plugins[0] should be an object:
413-
object { apply, … }
413+
object { apply: function, … }
414414
-> Plugin instance.
415415
* configuration.plugins[0] should be an instance of function.
416416
-> Function acting as plugin."
@@ -427,14 +427,14 @@ describe("Validation", () => {
427427
expect(msg).toMatchInlineSnapshot(`
428428
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
429429
- configuration.plugins[0] should be one of these:
430-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
430+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
431431
-> Plugin of type object or instanceof Function.
432432
Details:
433433
* configuration.plugins[0] should be one of these:
434434
false | 0 | \\"\\" | null | undefined
435435
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
436436
* configuration.plugins[0] should be an object:
437-
object { apply, … }
437+
object { apply: function, … }
438438
-> Plugin instance.
439439
* configuration.plugins[0] should be an instance of function.
440440
-> Function acting as plugin."
@@ -451,14 +451,14 @@ describe("Validation", () => {
451451
expect(msg).toMatchInlineSnapshot(`
452452
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
453453
- configuration.plugins[0] should be one of these:
454-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
454+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
455455
-> Plugin of type object or instanceof Function.
456456
Details:
457457
* configuration.plugins[0] should be one of these:
458458
false | 0 | \\"\\" | null | undefined
459459
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
460460
* configuration.plugins[0] should be an object:
461-
object { apply, … }
461+
object { apply: function, … }
462462
-> Plugin instance.
463463
* configuration.plugins[0] should be an instance of function.
464464
-> Function acting as plugin."
@@ -609,7 +609,7 @@ describe("Validation", () => {
609609
expect(msg).toMatchInlineSnapshot(`
610610
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
611611
- configuration.watchOptions should be an object:
612-
object { aggregateTimeout?, followSymlinks?, ignored?, poll?, stdin? }
612+
object { aggregateTimeout?: number, followSymlinks?: boolean, ignored?, poll?, stdin?: boolean }
613613
-> Options for the watcher."
614614
`)
615615
);
@@ -673,7 +673,7 @@ describe("Validation", () => {
673673
* configuration.resolve.tsconfig should be a boolean.
674674
* configuration.resolve.tsconfig should be a string.
675675
* configuration.resolve.tsconfig should be an object:
676-
object { configFile?, references? }"
676+
object { configFile?: string, references? }"
677677
`)
678678
);
679679

‎test/configCases/errors/asset-options-validation/__snapshots__/errors.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`errors 1`] = `
44
Array [
55
"Module not found: ValidationError: Invalid generator object. Asset Modules Plugin has been initialized using a generator object that does not match the API schema.
66
- generator has an unknown property 'filename'. These properties are valid:
7-
object { binary?, dataUrl? }
7+
object { binary?: boolean, dataUrl? }
88
-> Generator options for asset/inline modules.",
99
]
1010
`;

0 commit comments

Comments
 (0)