@node-core/utils 7.3.1 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ncu-ci.js +39 -0
- package/lib/ci/availability.js +24 -0
- package/lib/ci/ci_utils.js +13 -0
- package/lib/ci/failure_file_scanner.js +72 -21
- package/lib/ci/jenkins.js +23 -0
- package/lib/ci/resumable_build.js +86 -0
- package/lib/ci/resume_ci.js +64 -25
- package/lib/ci/run_ci.js +39 -9
- package/lib/ci/workload.js +72 -0
- package/lib/update-v8/deps.js +4 -1
- package/node_modules/branch-diff/.github/dependabot.yml +14 -2
- package/node_modules/branch-diff/.github/workflows/test-and-release.yml +4 -15
- package/node_modules/branch-diff/CHANGELOG.md +24 -0
- package/node_modules/branch-diff/package.json +35 -3
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +2 -2
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js +2 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +2 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/package.json +1 -1
- package/node_modules/smol-toml/README.md +460 -273
- package/node_modules/smol-toml/dist/date.js +50 -21
- package/node_modules/smol-toml/dist/error.d.ts +1 -2
- package/node_modules/smol-toml/dist/error.js +6 -2
- package/node_modules/smol-toml/dist/extract.js +240 -20
- package/node_modules/smol-toml/dist/index.cjs +409 -373
- package/node_modules/smol-toml/dist/index.d.ts +5 -4
- package/node_modules/smol-toml/dist/index.js +2 -1
- package/node_modules/smol-toml/dist/parse.d.ts +38 -1
- package/node_modules/smol-toml/dist/parse.js +52 -37
- package/node_modules/smol-toml/dist/primitive.js +23 -110
- package/node_modules/smol-toml/dist/stringify.d.ts +2 -1
- package/node_modules/smol-toml/dist/stringify.js +74 -36
- package/node_modules/smol-toml/dist/struct.js +76 -99
- package/node_modules/smol-toml/dist/util.d.ts +6 -1
- package/node_modules/smol-toml/dist/util.js +4 -36
- package/node_modules/smol-toml/package.json +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CI_DOMAIN, CI_TYPES, CI_TYPES_KEYS } from './ci_type_parser.js';
|
|
2
|
+
import { readJenkinsJSON } from './jenkins.js';
|
|
3
|
+
|
|
4
|
+
const PR_JOB_URL = `https://${CI_DOMAIN}/job/${CI_TYPES.get(CI_TYPES_KEYS.PR).jobName}`;
|
|
5
|
+
|
|
6
|
+
export async function getPRWorkload(request) {
|
|
7
|
+
const signal = AbortSignal.timeout(20_000);
|
|
8
|
+
const data = await readJenkinsJSON(request, '/queue/api/json?tree=items[id,task[url]]', signal);
|
|
9
|
+
if (!Array.isArray(data?.items)) {
|
|
10
|
+
throw new Error('Jenkins returned an invalid queue');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const queued = new Set();
|
|
14
|
+
for (const item of data.items) {
|
|
15
|
+
if (!item || typeof item !== 'object' || Array.isArray(item) ||
|
|
16
|
+
!item.task || typeof item.task !== 'object' || Array.isArray(item.task)) {
|
|
17
|
+
throw new Error('Jenkins returned an invalid queue item');
|
|
18
|
+
}
|
|
19
|
+
const { url } = item.task;
|
|
20
|
+
// Some Jenkins task types do not export a URL.
|
|
21
|
+
if (url === undefined || url === null) continue;
|
|
22
|
+
if (typeof url !== 'string') {
|
|
23
|
+
throw new Error('Jenkins returned an invalid queue task URL');
|
|
24
|
+
}
|
|
25
|
+
if (url === PR_JOB_URL || url === `${PR_JOB_URL}/`) {
|
|
26
|
+
if (!Number.isSafeInteger(item.id) || item.id < 0) {
|
|
27
|
+
throw new Error('Jenkins returned an invalid queue item ID');
|
|
28
|
+
}
|
|
29
|
+
queued.add(item.id);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// PR multijobs stay on an executor while waiting for downstream tests. The
|
|
34
|
+
// waiting queue alone misses those builds, and build history can be truncated.
|
|
35
|
+
const computers = await readJenkinsJSON(request,
|
|
36
|
+
'/computer/api/json?tree=computer[executors[currentExecutable[url,queueId]],' +
|
|
37
|
+
'oneOffExecutors[currentExecutable[url,queueId]]]', signal);
|
|
38
|
+
if (!Array.isArray(computers?.computer)) {
|
|
39
|
+
throw new Error('Jenkins returned invalid executor data');
|
|
40
|
+
}
|
|
41
|
+
const running = new Set();
|
|
42
|
+
for (const computer of computers.computer) {
|
|
43
|
+
if (!Array.isArray(computer?.executors) || !Array.isArray(computer?.oneOffExecutors)) {
|
|
44
|
+
throw new Error('Jenkins returned invalid executor lists');
|
|
45
|
+
}
|
|
46
|
+
for (const executor of [...computer.executors, ...computer.oneOffExecutors]) {
|
|
47
|
+
if (!executor || typeof executor !== 'object' || Array.isArray(executor)) {
|
|
48
|
+
throw new Error('Jenkins returned an invalid executor');
|
|
49
|
+
}
|
|
50
|
+
const build = executor.currentExecutable;
|
|
51
|
+
if (build === undefined || build === null) continue;
|
|
52
|
+
if (typeof build !== 'object' || Array.isArray(build)) {
|
|
53
|
+
throw new Error('Jenkins returned an invalid executable');
|
|
54
|
+
}
|
|
55
|
+
const { url, queueId } = build;
|
|
56
|
+
if (url === undefined || url === null) continue;
|
|
57
|
+
if (typeof url !== 'string') {
|
|
58
|
+
throw new Error('Jenkins returned an invalid executable URL');
|
|
59
|
+
}
|
|
60
|
+
if (!url.startsWith(`${PR_JOB_URL}/`)) continue;
|
|
61
|
+
const match = /^([1-9]\d*)\/?$/.exec(url.slice(PR_JOB_URL.length + 1));
|
|
62
|
+
if (!match) continue;
|
|
63
|
+
if (!Number.isSafeInteger(queueId)) {
|
|
64
|
+
throw new Error('Jenkins returned an invalid executable queue ID');
|
|
65
|
+
}
|
|
66
|
+
running.add(match[1]);
|
|
67
|
+
// A queued request can start between the two reads. Count it only once.
|
|
68
|
+
queued.delete(queueId);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return queued.size + running.size;
|
|
72
|
+
}
|
package/lib/update-v8/deps.js
CHANGED
|
@@ -31,7 +31,10 @@ async function readDeps(nodeDir) {
|
|
|
31
31
|
const depsStr = await fs.readFile(path.join(nodeDir, 'deps/v8/DEPS'), 'utf8');
|
|
32
32
|
const start = depsStr.indexOf('deps = {');
|
|
33
33
|
const end = depsStr.indexOf('\n}', start) + 2;
|
|
34
|
-
const depsDeclaration = depsStr.substring(start, end)
|
|
34
|
+
const depsDeclaration = depsStr.substring(start, end)
|
|
35
|
+
.replace(/^ *#.*/gm, '')
|
|
36
|
+
// Join adjacent string literals
|
|
37
|
+
.replace(/'\s*\n\s*'/g, '');
|
|
35
38
|
const Var = () => chromiumGit; // eslint-disable-line no-unused-vars
|
|
36
39
|
let deps;
|
|
37
40
|
eval(depsDeclaration); // eslint-disable-line no-eval
|
|
@@ -3,14 +3,26 @@ updates:
|
|
|
3
3
|
- package-ecosystem: 'github-actions'
|
|
4
4
|
directory: '/'
|
|
5
5
|
schedule:
|
|
6
|
-
interval: '
|
|
6
|
+
interval: 'monthly'
|
|
7
7
|
commit-message:
|
|
8
8
|
prefix: 'chore'
|
|
9
9
|
include: 'scope'
|
|
10
|
+
cooldown:
|
|
11
|
+
default-days: 5
|
|
12
|
+
groups:
|
|
13
|
+
github-actions-minor-patch:
|
|
14
|
+
patterns: ['*']
|
|
15
|
+
update-types: ['minor', 'patch']
|
|
10
16
|
- package-ecosystem: 'npm'
|
|
11
17
|
directory: '/'
|
|
12
18
|
schedule:
|
|
13
|
-
interval: '
|
|
19
|
+
interval: 'monthly'
|
|
14
20
|
commit-message:
|
|
15
21
|
prefix: 'chore'
|
|
16
22
|
include: 'scope'
|
|
23
|
+
cooldown:
|
|
24
|
+
default-days: 5
|
|
25
|
+
groups:
|
|
26
|
+
npm-minor-patch:
|
|
27
|
+
patterns: ['*']
|
|
28
|
+
update-types: ['minor', 'patch']
|
|
@@ -10,11 +10,11 @@ jobs:
|
|
|
10
10
|
runs-on: ${{ matrix.os }}
|
|
11
11
|
steps:
|
|
12
12
|
- name: Checkout Repository
|
|
13
|
-
uses: actions/checkout@
|
|
13
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
14
14
|
with:
|
|
15
15
|
fetch-depth: 0
|
|
16
16
|
- name: Use Node.js ${{ matrix.node }}
|
|
17
|
-
uses: actions/setup-node@
|
|
17
|
+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
18
18
|
with:
|
|
19
19
|
node-version: ${{ matrix.node }}
|
|
20
20
|
- name: Install Dependencies
|
|
@@ -34,11 +34,11 @@ jobs:
|
|
|
34
34
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
35
35
|
steps:
|
|
36
36
|
- name: Checkout
|
|
37
|
-
uses: actions/checkout@
|
|
37
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
38
38
|
with:
|
|
39
39
|
fetch-depth: 0
|
|
40
40
|
- name: Setup Node.js
|
|
41
|
-
uses: actions/setup-node@
|
|
41
|
+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
42
42
|
with:
|
|
43
43
|
node-version: lts/*
|
|
44
44
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -48,17 +48,6 @@ jobs:
|
|
|
48
48
|
- name: Build
|
|
49
49
|
run: |
|
|
50
50
|
npm run build
|
|
51
|
-
- name: Install plugins
|
|
52
|
-
run: |
|
|
53
|
-
npm install \
|
|
54
|
-
@semantic-release/commit-analyzer \
|
|
55
|
-
conventional-changelog-conventionalcommits \
|
|
56
|
-
@semantic-release/release-notes-generator \
|
|
57
|
-
@semantic-release/npm \
|
|
58
|
-
@semantic-release/github \
|
|
59
|
-
@semantic-release/git \
|
|
60
|
-
@semantic-release/changelog \
|
|
61
|
-
--no-progress --no-package-lock --no-save
|
|
62
51
|
- name: Release
|
|
63
52
|
env:
|
|
64
53
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## [3.1.8](https://github.com/nodejs/branch-diff/compare/v3.1.7...v3.1.8) (2026-07-30)
|
|
2
|
+
|
|
3
|
+
### Trivial Changes
|
|
4
|
+
|
|
5
|
+
* downgrade broken changelog maker, backfill, rework GHA ([#91](https://github.com/nodejs/branch-diff/issues/91)) ([3c50d17](https://github.com/nodejs/branch-diff/commit/3c50d1791091a70dea10228c533e74cfb9036a7a))
|
|
6
|
+
|
|
7
|
+
## [3.1.7](https://github.com/nodejs/branch-diff/compare/v3.1.6...v3.1.7) (2026-07-29)
|
|
8
|
+
|
|
9
|
+
### Trivial Changes
|
|
10
|
+
|
|
11
|
+
* **ci:** slow down dependabot, group, pin actions by hash ([#90](https://github.com/nodejs/branch-diff/issues/90)) ([a31e2ff](https://github.com/nodejs/branch-diff/commit/a31e2ffef6d61d18ce45bffec9cbabe710566d48))
|
|
12
|
+
|
|
13
|
+
## [3.1.6](https://github.com/nodejs/branch-diff/compare/v3.1.5...v3.1.6) (2026-07-16)
|
|
14
|
+
|
|
15
|
+
### Trivial Changes
|
|
16
|
+
|
|
17
|
+
* **deps:** bump actions/setup-node from 6.4.0 to 7.0.0 ([#89](https://github.com/nodejs/branch-diff/issues/89)) ([53e39b5](https://github.com/nodejs/branch-diff/commit/53e39b50af203c68c004e36654a2e7d546b9b118))
|
|
18
|
+
|
|
19
|
+
## [3.1.5](https://github.com/nodejs/branch-diff/compare/v3.1.4...v3.1.5) (2026-06-22)
|
|
20
|
+
|
|
21
|
+
### Trivial Changes
|
|
22
|
+
|
|
23
|
+
* **deps:** bump actions/checkout from 6 to 7 ([#88](https://github.com/nodejs/branch-diff/issues/88)) ([c7a04e0](https://github.com/nodejs/branch-diff/commit/c7a04e0b42791a0721b9e7b43f6dd2e39b45f473))
|
|
24
|
+
|
|
1
25
|
## [3.1.4](https://github.com/nodejs/branch-diff/compare/v3.1.3...v3.1.4) (2026-04-28)
|
|
2
26
|
|
|
3
27
|
### Trivial Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "branch-diff",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.8",
|
|
4
4
|
"description": "A tool to list print the commits on one git branch that are not on another using loose comparison",
|
|
5
5
|
"main": "branch-diff.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
},
|
|
31
31
|
"preferGlobal": true,
|
|
32
32
|
"devDependencies": {
|
|
33
|
+
"@semantic-release/changelog": "^7.0.0",
|
|
34
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
35
|
+
"@semantic-release/git": "^11.0.0",
|
|
36
|
+
"@semantic-release/github": "^12.0.6",
|
|
37
|
+
"@semantic-release/npm": "^13.1.5",
|
|
38
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
39
|
+
"conventional-changelog-conventionalcommits": "^9.3.1",
|
|
40
|
+
"semantic-release": "^25.0.3",
|
|
33
41
|
"standard": "^17.0.0"
|
|
34
42
|
},
|
|
35
43
|
"release": {
|
|
@@ -91,6 +99,30 @@
|
|
|
91
99
|
"type": "fix",
|
|
92
100
|
"section": "Bug Fixes"
|
|
93
101
|
},
|
|
102
|
+
{
|
|
103
|
+
"type": "perf",
|
|
104
|
+
"section": "Performance Improvements"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "revert",
|
|
108
|
+
"section": "Reverts"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "refactor",
|
|
112
|
+
"section": "Code Refactoring"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "test",
|
|
116
|
+
"section": "Tests"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "build",
|
|
120
|
+
"section": "Trivial Changes"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "ci",
|
|
124
|
+
"section": "Trivial Changes"
|
|
125
|
+
},
|
|
94
126
|
{
|
|
95
127
|
"type": "chore",
|
|
96
128
|
"section": "Trivial Changes"
|
|
@@ -100,8 +132,8 @@
|
|
|
100
132
|
"section": "Trivial Changes"
|
|
101
133
|
},
|
|
102
134
|
{
|
|
103
|
-
"type": "
|
|
104
|
-
"section": "
|
|
135
|
+
"type": "style",
|
|
136
|
+
"section": "Trivial Changes"
|
|
105
137
|
}
|
|
106
138
|
]
|
|
107
139
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! js-yaml 5.4.
|
|
1
|
+
/*! js-yaml 5.4.2 https://github.com/nodeca/js-yaml @license MIT */
|
|
2
2
|
//#region src/tag.ts
|
|
3
3
|
var e = Symbol("NOT_RESOLVED");
|
|
4
4
|
function t(e, t) {
|
|
@@ -1805,7 +1805,7 @@ function Jn(e) {
|
|
|
1805
1805
|
e.style === E.PLAIN && /^\s+$/.test(e.node.value) && (e.style = E.DOUBLE_QUOTED);
|
|
1806
1806
|
}
|
|
1807
1807
|
function Yn(e) {
|
|
1808
|
-
e.presenterOptions.forceQuotes && (e.isKey || e.style !== E.PLAIN || (e.style = e.node.value.includes("\n") ? E.DOUBLE_QUOTED : Gn(e)));
|
|
1808
|
+
e.presenterOptions.forceQuotes && (e.isKey || e.style !== E.PLAIN || e.node.tag === e.presenterOptions.schema.defaultScalarTag.tagName && (e.style = e.node.value.includes("\n") ? E.DOUBLE_QUOTED : Gn(e)));
|
|
1809
1809
|
}
|
|
1810
1810
|
function Xn(e) {
|
|
1811
1811
|
if (e.style !== E.PLAIN || e.isKey) return;
|