chore: update template-oss

Luke Karrys committed Sep 24, 2023 at 16:20 UTC 42d42366ef4611cd2a995c3b7eff114d43fdd925
21 files changed +979 -90
.github/dependabot.yml new
+18
@@ -0,0 +1,18 @@
1 +# This file is automatically added by @npmcli/template-oss. Do not edit.
2 +
3 +version: 2
4 +
5 +updates:
6 + - package-ecosystem: npm
7 + directory: /
8 + schedule:
9 + interval: daily
10 + target-branch: "main"
11 + allow:
12 + - dependency-type: direct
13 + versioning-strategy: increase-if-necessary
14 + commit-message:
15 + prefix: deps
16 + prefix-development: chore
17 + labels:
18 + - "Dependencies"
.github/workflows/audit.yml
+45 -1
@@ -25,11 +25,55 @@ jobs:
25 git config --global user.name "npm CLI robot"
26 - name: Setup Node
27 uses: actions/setup-node@v3
28 + id: node
29 with:
30 node-version: 18.x
31 + check-latest: contains('18.x', '.x')
32 cache: npm
31 - - name: Install npm@latest
33 +
34 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
35 + - name: Update Windows npm
36 + if: |
37 + matrix.platform.os == 'windows-latest' && (
38 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
39 + )
40 + run: |
41 + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
42 + tar xf npm-7.5.4.tgz
43 + cd package
44 + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
45 + cd ..
46 + rmdir /s /q package
47 +
48 + # Start on Node 10 because we dont test on anything lower
49 + - name: Install npm@7 on Node 10
50 + shell: bash
51 + if: startsWith(steps.node.outputs.node-version, 'v10.')
52 + id: npm-7
53 + run: |
54 + npm i --prefer-online --no-fund --no-audit -g npm@7
55 + echo "updated=true" >> "$GITHUB_OUTPUT"
56 +
57 + - name: Install npm@8 on Node 12
58 + shell: bash
59 + if: startsWith(steps.node.outputs.node-version, 'v12.')
60 + id: npm-8
61 + run: |
62 + npm i --prefer-online --no-fund --no-audit -g npm@8
63 + echo "updated=true" >> "$GITHUB_OUTPUT"
64 +
65 + - name: Install npm@9 on Node 14/16/18.0
66 + shell: bash
67 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
68 + id: npm-9
69 + run: |
70 + npm i --prefer-online --no-fund --no-audit -g npm@9
71 + echo "updated=true" >> "$GITHUB_OUTPUT"
72 +
73 + - name: Install npm@latest on Node
74 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
75 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
76 +
77 - name: npm Version
78 run: npm -v
79 - name: Install Dependencies
.github/workflows/ci-cli.yml
+82 -9
@@ -10,7 +10,6 @@ on:
10 push:
11 branches:
12 - main
13 - - latest
13 paths:
14 - cli/**
15 schedule:
@@ -34,11 +33,55 @@ jobs:
33 git config --global user.name "npm CLI robot"
34 - name: Setup Node
35 uses: actions/setup-node@v3
36 + id: node
37 with:
38 node-version: 18.x
39 + check-latest: contains('18.x', '.x')
40 cache: npm
40 - - name: Install npm@latest
41 +
42 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
43 + - name: Update Windows npm
44 + if: |
45 + matrix.platform.os == 'windows-latest' && (
46 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
47 + )
48 + run: |
49 + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
50 + tar xf npm-7.5.4.tgz
51 + cd package
52 + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
53 + cd ..
54 + rmdir /s /q package
55 +
56 + # Start on Node 10 because we dont test on anything lower
57 + - name: Install npm@7 on Node 10
58 + shell: bash
59 + if: startsWith(steps.node.outputs.node-version, 'v10.')
60 + id: npm-7
61 + run: |
62 + npm i --prefer-online --no-fund --no-audit -g npm@7
63 + echo "updated=true" >> "$GITHUB_OUTPUT"
64 +
65 + - name: Install npm@8 on Node 12
66 + shell: bash
67 + if: startsWith(steps.node.outputs.node-version, 'v12.')
68 + id: npm-8
69 + run: |
70 + npm i --prefer-online --no-fund --no-audit -g npm@8
71 + echo "updated=true" >> "$GITHUB_OUTPUT"
72 +
73 + - name: Install npm@9 on Node 14/16/18.0
74 + shell: bash
75 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
76 + id: npm-9
77 + run: |
78 + npm i --prefer-online --no-fund --no-audit -g npm@9
79 + echo "updated=true" >> "$GITHUB_OUTPUT"
80 +
81 + - name: Install npm@latest on Node
82 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
83 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
84 +
85 - name: npm Version
86 run: npm -v
87 - name: Install Dependencies
@@ -73,12 +116,18 @@ jobs:
116 git config --global user.name "npm CLI robot"
117 - name: Setup Node
118 uses: actions/setup-node@v3
119 + id: node
120 with:
121 node-version: ${{ matrix.node-version }}
122 + check-latest: contains(matrix.node-version, '.x')
123 cache: npm
124 +
125 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
126 - name: Update Windows npm
80 - # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
81 - if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
127 + if: |
128 + matrix.platform.os == 'windows-latest' && (
129 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
130 + )
131 run: |
132 curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
133 tar xf npm-7.5.4.tgz
@@ -86,12 +135,36 @@ jobs:
135 node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
136 cd ..
137 rmdir /s /q package
89 - - name: Install npm@7
90 - if: startsWith(matrix.node-version, '10.')
91 - run: npm i --prefer-online --no-fund --no-audit -g npm@7
92 - - name: Install npm@latest
93 - if: ${{ !startsWith(matrix.node-version, '10.') }}
138 +
139 + # Start on Node 10 because we dont test on anything lower
140 + - name: Install npm@7 on Node 10
141 + shell: bash
142 + if: startsWith(steps.node.outputs.node-version, 'v10.')
143 + id: npm-7
144 + run: |
145 + npm i --prefer-online --no-fund --no-audit -g npm@7
146 + echo "updated=true" >> "$GITHUB_OUTPUT"
147 +
148 + - name: Install npm@8 on Node 12
149 + shell: bash
150 + if: startsWith(steps.node.outputs.node-version, 'v12.')
151 + id: npm-8
152 + run: |
153 + npm i --prefer-online --no-fund --no-audit -g npm@8
154 + echo "updated=true" >> "$GITHUB_OUTPUT"
155 +
156 + - name: Install npm@9 on Node 14/16/18.0
157 + shell: bash
158 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
159 + id: npm-9
160 + run: |
161 + npm i --prefer-online --no-fund --no-audit -g npm@9
162 + echo "updated=true" >> "$GITHUB_OUTPUT"
163 +
164 + - name: Install npm@latest on Node
165 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
166 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
167 +
168 - name: npm Version
169 run: npm -v
170 - name: Install Dependencies
.github/workflows/ci-theme.yml
+82 -9
@@ -10,7 +10,6 @@ on:
10 push:
11 branches:
12 - main
13 - - latest
13 paths:
14 - theme/**
15 schedule:
@@ -34,11 +33,55 @@ jobs:
33 git config --global user.name "npm CLI robot"
34 - name: Setup Node
35 uses: actions/setup-node@v3
36 + id: node
37 with:
38 node-version: 18.x
39 + check-latest: contains('18.x', '.x')
40 cache: npm
40 - - name: Install npm@latest
41 +
42 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
43 + - name: Update Windows npm
44 + if: |
45 + matrix.platform.os == 'windows-latest' && (
46 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
47 + )
48 + run: |
49 + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
50 + tar xf npm-7.5.4.tgz
51 + cd package
52 + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
53 + cd ..
54 + rmdir /s /q package
55 +
56 + # Start on Node 10 because we dont test on anything lower
57 + - name: Install npm@7 on Node 10
58 + shell: bash
59 + if: startsWith(steps.node.outputs.node-version, 'v10.')
60 + id: npm-7
61 + run: |
62 + npm i --prefer-online --no-fund --no-audit -g npm@7
63 + echo "updated=true" >> "$GITHUB_OUTPUT"
64 +
65 + - name: Install npm@8 on Node 12
66 + shell: bash
67 + if: startsWith(steps.node.outputs.node-version, 'v12.')
68 + id: npm-8
69 + run: |
70 + npm i --prefer-online --no-fund --no-audit -g npm@8
71 + echo "updated=true" >> "$GITHUB_OUTPUT"
72 +
73 + - name: Install npm@9 on Node 14/16/18.0
74 + shell: bash
75 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
76 + id: npm-9
77 + run: |
78 + npm i --prefer-online --no-fund --no-audit -g npm@9
79 + echo "updated=true" >> "$GITHUB_OUTPUT"
80 +
81 + - name: Install npm@latest on Node
82 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
83 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
84 +
85 - name: npm Version
86 run: npm -v
87 - name: Install Dependencies
@@ -73,12 +116,18 @@ jobs:
116 git config --global user.name "npm CLI robot"
117 - name: Setup Node
118 uses: actions/setup-node@v3
119 + id: node
120 with:
121 node-version: ${{ matrix.node-version }}
122 + check-latest: contains(matrix.node-version, '.x')
123 cache: npm
124 +
125 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
126 - name: Update Windows npm
80 - # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
81 - if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
127 + if: |
128 + matrix.platform.os == 'windows-latest' && (
129 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
130 + )
131 run: |
132 curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
133 tar xf npm-7.5.4.tgz
@@ -86,12 +135,36 @@ jobs:
135 node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
136 cd ..
137 rmdir /s /q package
89 - - name: Install npm@7
90 - if: startsWith(matrix.node-version, '10.')
91 - run: npm i --prefer-online --no-fund --no-audit -g npm@7
92 - - name: Install npm@latest
93 - if: ${{ !startsWith(matrix.node-version, '10.') }}
138 +
139 + # Start on Node 10 because we dont test on anything lower
140 + - name: Install npm@7 on Node 10
141 + shell: bash
142 + if: startsWith(steps.node.outputs.node-version, 'v10.')
143 + id: npm-7
144 + run: |
145 + npm i --prefer-online --no-fund --no-audit -g npm@7
146 + echo "updated=true" >> "$GITHUB_OUTPUT"
147 +
148 + - name: Install npm@8 on Node 12
149 + shell: bash
150 + if: startsWith(steps.node.outputs.node-version, 'v12.')
151 + id: npm-8
152 + run: |
153 + npm i --prefer-online --no-fund --no-audit -g npm@8
154 + echo "updated=true" >> "$GITHUB_OUTPUT"
155 +
156 + - name: Install npm@9 on Node 14/16/18.0
157 + shell: bash
158 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
159 + id: npm-9
160 + run: |
161 + npm i --prefer-online --no-fund --no-audit -g npm@9
162 + echo "updated=true" >> "$GITHUB_OUTPUT"
163 +
164 + - name: Install npm@latest on Node
165 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
166 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
167 +
168 - name: npm Version
169 run: npm -v
170 - name: Install Dependencies
.github/workflows/ci.yml
+119 -16
@@ -11,7 +11,6 @@ on:
11 push:
12 branches:
13 - main
14 - - latest
14 paths-ignore:
15 - cli/**
16 - theme/**
@@ -36,11 +35,55 @@ jobs:
35 git config --global user.name "npm CLI robot"
36 - name: Setup Node
37 uses: actions/setup-node@v3
38 + id: node
39 with:
40 node-version: 18.x
41 + check-latest: contains('18.x', '.x')
42 cache: npm
42 - - name: Install npm@latest
43 +
44 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
45 + - name: Update Windows npm
46 + if: |
47 + matrix.platform.os == 'windows-latest' && (
48 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
49 + )
50 + run: |
51 + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
52 + tar xf npm-7.5.4.tgz
53 + cd package
54 + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
55 + cd ..
56 + rmdir /s /q package
57 +
58 + # Start on Node 10 because we dont test on anything lower
59 + - name: Install npm@7 on Node 10
60 + shell: bash
61 + if: startsWith(steps.node.outputs.node-version, 'v10.')
62 + id: npm-7
63 + run: |
64 + npm i --prefer-online --no-fund --no-audit -g npm@7
65 + echo "updated=true" >> "$GITHUB_OUTPUT"
66 +
67 + - name: Install npm@8 on Node 12
68 + shell: bash
69 + if: startsWith(steps.node.outputs.node-version, 'v12.')
70 + id: npm-8
71 + run: |
72 + npm i --prefer-online --no-fund --no-audit -g npm@8
73 + echo "updated=true" >> "$GITHUB_OUTPUT"
74 +
75 + - name: Install npm@9 on Node 14/16/18.0
76 + shell: bash
77 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
78 + id: npm-9
79 + run: |
80 + npm i --prefer-online --no-fund --no-audit -g npm@9
81 + echo "updated=true" >> "$GITHUB_OUTPUT"
82 +
83 + - name: Install npm@latest on Node
84 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
85 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
86 +
87 - name: npm Version
88 run: npm -v
89 - name: Install Dependencies
@@ -75,12 +118,18 @@ jobs:
118 git config --global user.name "npm CLI robot"
119 - name: Setup Node
120 uses: actions/setup-node@v3
121 + id: node
122 with:
123 node-version: ${{ matrix.node-version }}
124 + check-latest: contains(matrix.node-version, '.x')
125 cache: npm
126 +
127 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
128 - name: Update Windows npm
82 - # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
83 - if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
129 + if: |
130 + matrix.platform.os == 'windows-latest' && (
131 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
132 + )
133 run: |
134 curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
135 tar xf npm-7.5.4.tgz
@@ -88,12 +137,36 @@ jobs:
137 node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
138 cd ..
139 rmdir /s /q package
91 - - name: Install npm@7
92 - if: startsWith(matrix.node-version, '10.')
93 - run: npm i --prefer-online --no-fund --no-audit -g npm@7
94 - - name: Install npm@latest
95 - if: ${{ !startsWith(matrix.node-version, '10.') }}
140 +
141 + # Start on Node 10 because we dont test on anything lower
142 + - name: Install npm@7 on Node 10
143 + shell: bash
144 + if: startsWith(steps.node.outputs.node-version, 'v10.')
145 + id: npm-7
146 + run: |
147 + npm i --prefer-online --no-fund --no-audit -g npm@7
148 + echo "updated=true" >> "$GITHUB_OUTPUT"
149 +
150 + - name: Install npm@8 on Node 12
151 + shell: bash
152 + if: startsWith(steps.node.outputs.node-version, 'v12.')
153 + id: npm-8
154 + run: |
155 + npm i --prefer-online --no-fund --no-audit -g npm@8
156 + echo "updated=true" >> "$GITHUB_OUTPUT"
157 +
158 + - name: Install npm@9 on Node 14/16/18.0
159 + shell: bash
160 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
161 + id: npm-9
162 + run: |
163 + npm i --prefer-online --no-fund --no-audit -g npm@9
164 + echo "updated=true" >> "$GITHUB_OUTPUT"
165 +
166 + - name: Install npm@latest on Node
167 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
168 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
169 +
170 - name: npm Version
171 run: npm -v
172 - name: Install Dependencies
@@ -128,12 +201,18 @@ jobs:
201 git config --global user.name "npm CLI robot"
202 - name: Setup Node
203 uses: actions/setup-node@v3
204 + id: node
205 with:
206 node-version: ${{ matrix.node-version }}
207 + check-latest: contains(matrix.node-version, '.x')
208 cache: npm
209 +
210 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
211 - name: Update Windows npm
135 - # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
136 - if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
212 + if: |
213 + matrix.platform.os == 'windows-latest' && (
214 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
215 + )
216 run: |
217 curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
218 tar xf npm-7.5.4.tgz
@@ -141,12 +220,36 @@ jobs:
220 node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
221 cd ..
222 rmdir /s /q package
144 - - name: Install npm@7
145 - if: startsWith(matrix.node-version, '10.')
146 - run: npm i --prefer-online --no-fund --no-audit -g npm@7
147 - - name: Install npm@latest
148 - if: ${{ !startsWith(matrix.node-version, '10.') }}
223 +
224 + # Start on Node 10 because we dont test on anything lower
225 + - name: Install npm@7 on Node 10
226 + shell: bash
227 + if: startsWith(steps.node.outputs.node-version, 'v10.')
228 + id: npm-7
229 + run: |
230 + npm i --prefer-online --no-fund --no-audit -g npm@7
231 + echo "updated=true" >> "$GITHUB_OUTPUT"
232 +
233 + - name: Install npm@8 on Node 12
234 + shell: bash
235 + if: startsWith(steps.node.outputs.node-version, 'v12.')
236 + id: npm-8
237 + run: |
238 + npm i --prefer-online --no-fund --no-audit -g npm@8
239 + echo "updated=true" >> "$GITHUB_OUTPUT"
240 +
241 + - name: Install npm@9 on Node 14/16/18.0
242 + shell: bash
243 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
244 + id: npm-9
245 + run: |
246 + npm i --prefer-online --no-fund --no-audit -g npm@9
247 + echo "updated=true" >> "$GITHUB_OUTPUT"
248 +
249 + - name: Install npm@latest on Node
250 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
251 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
252 +
253 - name: npm Version
254 run: npm -v
255 - name: Install Dependencies
.github/workflows/codeql-analysis.yml
-2
@@ -6,11 +6,9 @@ on:
6 push:
7 branches:
8 - main
9 - - latest
9 pull_request:
10 branches:
11 - main
13 - - latest
12 schedule:
13 # "At 10:00 UTC (03:00 PT) on Monday" https://crontab.guru/#0_10_*_*_1
14 - cron: "0 10 * * 1"
.github/workflows/post-dependabot.yml new
+166
@@ -0,0 +1,166 @@
1 +# This file is automatically added by @npmcli/template-oss. Do not edit.
2 +
3 +name: Post Dependabot
4 +
5 +on: pull_request
6 +
7 +permissions:
8 + contents: write
9 +
10 +jobs:
11 + template-oss:
12 + name: template-oss
13 + if: github.repository_owner == 'npm' && github.actor == 'dependabot[bot]'
14 + runs-on: ubuntu-latest
15 + defaults:
16 + run:
17 + shell: bash
18 + steps:
19 + - name: Checkout
20 + uses: actions/checkout@v3
21 + with:
22 + ref: ${{ github.event.pull_request.head.ref }}
23 + - name: Setup Git User
24 + run: |
25 + git config --global user.email "npm-cli+bot@github.com"
26 + git config --global user.name "npm CLI robot"
27 + - name: Setup Node
28 + uses: actions/setup-node@v3
29 + id: node
30 + with:
31 + node-version: 18.x
32 + check-latest: contains('18.x', '.x')
33 + cache: npm
34 +
35 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
36 + - name: Update Windows npm
37 + if: |
38 + matrix.platform.os == 'windows-latest' && (
39 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
40 + )
41 + run: |
42 + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
43 + tar xf npm-7.5.4.tgz
44 + cd package
45 + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
46 + cd ..
47 + rmdir /s /q package
48 +
49 + # Start on Node 10 because we dont test on anything lower
50 + - name: Install npm@7 on Node 10
51 + shell: bash
52 + if: startsWith(steps.node.outputs.node-version, 'v10.')
53 + id: npm-7
54 + run: |
55 + npm i --prefer-online --no-fund --no-audit -g npm@7
56 + echo "updated=true" >> "$GITHUB_OUTPUT"
57 +
58 + - name: Install npm@8 on Node 12
59 + shell: bash
60 + if: startsWith(steps.node.outputs.node-version, 'v12.')
61 + id: npm-8
62 + run: |
63 + npm i --prefer-online --no-fund --no-audit -g npm@8
64 + echo "updated=true" >> "$GITHUB_OUTPUT"
65 +
66 + - name: Install npm@9 on Node 14/16/18.0
67 + shell: bash
68 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
69 + id: npm-9
70 + run: |
71 + npm i --prefer-online --no-fund --no-audit -g npm@9
72 + echo "updated=true" >> "$GITHUB_OUTPUT"
73 +
74 + - name: Install npm@latest on Node
75 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
76 + run: npm i --prefer-online --no-fund --no-audit -g npm@latest
77 +
78 + - name: npm Version
79 + run: npm -v
80 + - name: Install Dependencies
81 + run: npm i --no-audit --no-fund
82 + - name: Fetch Dependabot Metadata
83 + id: metadata
84 + uses: dependabot/fetch-metadata@v1
85 + with:
86 + github-token: ${{ secrets.GITHUB_TOKEN }}
87 +
88 + # Dependabot can update multiple directories so we output which directory
89 + # it is acting on so we can run the command for the correct root or workspace
90 + - name: Get Dependabot Directory
91 + if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')
92 + id: flags
93 + run: |
94 + dependabot_dir="${{ steps.metadata.outputs.directory }}"
95 + if [[ "$dependabot_dir" == "/" ]]; then
96 + echo "workspace=-iwr" >> $GITHUB_OUTPUT
97 + else
98 + # strip leading slash from directory so it works as a
99 + # a path to the workspace flag
100 + echo "workspace=-w ${dependabot_dir#/}" >> $GITHUB_OUTPUT
101 + fi
102 +
103 + - name: Apply Changes
104 + if: steps.flags.outputs.workspace
105 + id: apply
106 + run: |
107 + npm run template-oss-apply ${{ steps.flags.outputs.workspace }}
108 + if [[ `git status --porcelain` ]]; then
109 + echo "changes=true" >> $GITHUB_OUTPUT
110 + fi
111 + # This only sets the conventional commit prefix. This workflow can't reliably determine
112 + # what the breaking change is though. If a BREAKING CHANGE message is required then
113 + # this PR check will fail and the commit will be amended with stafftools
114 + if [[ "${{ steps.metadata.outputs.update-type }}" == "version-update:semver-major" ]]; then
115 + prefix='feat!'
116 + else
117 + prefix='chore'
118 + fi
119 + echo "message=$prefix: postinstall for dependabot template-oss PR" >> $GITHUB_OUTPUT
120 +
121 + # This step will fail if template-oss has made any workflow updates. It is impossible
122 + # for a workflow to update other workflows. In the case it does fail, we continue
123 + # and then try to apply only a portion of the changes in the next step
124 + - name: Push All Changes
125 + if: steps.apply.outputs.changes
126 + id: push
127 + continue-on-error: true
128 + env:
129 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130 + run: |
131 + git commit -am "${{ steps.apply.outputs.message }}"
132 + git push
133 +
134 + # If the previous step failed, then reset the commit and remove any workflow changes
135 + # and attempt to commit and push again. This is helpful because we will have a commit
136 + # with the correct prefix that we can then --amend with @npmcli/stafftools later.
137 + - name: Push All Changes Except Workflows
138 + if: steps.apply.outputs.changes && steps.push.outcome == 'failure'
139 + env:
140 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141 + run: |
142 + git reset HEAD~
143 + git checkout HEAD -- .github/workflows/
144 + git clean -fd .github/workflows/
145 + git commit -am "${{ steps.apply.outputs.message }}"
146 + git push
147 +
148 + # Check if all the necessary template-oss changes were applied. Since we continued
149 + # on errors in one of the previous steps, this check will fail if our follow up
150 + # only applied a portion of the changes and we need to followup manually.
151 + #
152 + # Note that this used to run `lint` and `postlint` but that will fail this action
153 + # if we've also shipped any linting changes separate from template-oss. We do
154 + # linting in another action, so we want to fail this one only if there are
155 + # template-oss changes that could not be applied.
156 + - name: Check Changes
157 + if: steps.apply.outputs.changes
158 + run: |
159 + npm exec --offline ${{ steps.flags.outputs.workspace }} -- template-oss-check
160 +
161 + - name: Fail on Breaking Change
162 + if: steps.apply.outputs.changes && startsWith(steps.apply.outputs.message, 'feat!')
163 + run: |
164 + echo "This PR has a breaking change. Run 'npx -p @npmcli/stafftools gh template-oss-fix'"
165 + echo "for more information on how to fix this with a BREAKING CHANGE footer."
166 + exit 1
.github/workflows/publish.yml
+45 -1
@@ -31,11 +31,55 @@ jobs:
31 git config --global user.name "npm CLI robot"
32 - name: Setup Node
33 uses: actions/setup-node@v3
34 + id: node
35 with:
36 node-version: 18.x
37 + check-latest: contains('18.x', '.x')
38 cache: npm
37 - - name: Install npm@latest
39 +
40 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
41 + - name: Update Windows npm
42 + if: |
43 + matrix.platform.os == 'windows-latest' && (
44 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
45 + )
46 + run: |
47 + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
48 + tar xf npm-7.5.4.tgz
49 + cd package
50 + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
51 + cd ..
52 + rmdir /s /q package
53 +
54 + # Start on Node 10 because we dont test on anything lower
55 + - name: Install npm@7 on Node 10
56 + shell: bash
57 + if: startsWith(steps.node.outputs.node-version, 'v10.')
58 + id: npm-7
59 + run: |
60 + npm i --prefer-online --no-fund --no-audit -g npm@7
61 + echo "updated=true" >> "$GITHUB_OUTPUT"
62 +
63 + - name: Install npm@8 on Node 12
64 + shell: bash
65 + if: startsWith(steps.node.outputs.node-version, 'v12.')
66 + id: npm-8
67 + run: |
68 + npm i --prefer-online --no-fund --no-audit -g npm@8
69 + echo "updated=true" >> "$GITHUB_OUTPUT"
70 +
71 + - name: Install npm@9 on Node 14/16/18.0
72 + shell: bash
73 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
74 + id: npm-9
75 + run: |
76 + npm i --prefer-online --no-fund --no-audit -g npm@9
77 + echo "updated=true" >> "$GITHUB_OUTPUT"
78 +
79 + - name: Install npm@latest on Node
80 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
81 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
82 +
83 - name: npm Version
84 run: npm -v
85 - name: Install Dependencies
.github/workflows/update-cli.yml
+45 -1
@@ -26,11 +26,55 @@ jobs:
26 git config --global user.name "npm CLI robot"
27 - name: Setup Node
28 uses: actions/setup-node@v3
29 + id: node
30 with:
31 node-version: 18.x
32 + check-latest: contains('18.x', '.x')
33 cache: npm
32 - - name: Install npm@latest
34 +
35 + # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
36 + - name: Update Windows npm
37 + if: |
38 + matrix.platform.os == 'windows-latest' && (
39 + startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
40 + )
41 + run: |
42 + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
43 + tar xf npm-7.5.4.tgz
44 + cd package
45 + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
46 + cd ..
47 + rmdir /s /q package
48 +
49 + # Start on Node 10 because we dont test on anything lower
50 + - name: Install npm@7 on Node 10
51 + shell: bash
52 + if: startsWith(steps.node.outputs.node-version, 'v10.')
53 + id: npm-7
54 + run: |
55 + npm i --prefer-online --no-fund --no-audit -g npm@7
56 + echo "updated=true" >> "$GITHUB_OUTPUT"
57 +
58 + - name: Install npm@8 on Node 12
59 + shell: bash
60 + if: startsWith(steps.node.outputs.node-version, 'v12.')
61 + id: npm-8
62 + run: |
63 + npm i --prefer-online --no-fund --no-audit -g npm@8
64 + echo "updated=true" >> "$GITHUB_OUTPUT"
65 +
66 + - name: Install npm@9 on Node 14/16/18.0
67 + shell: bash
68 + if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
69 + id: npm-9
70 + run: |
71 + npm i --prefer-online --no-fund --no-audit -g npm@9
72 + echo "updated=true" >> "$GITHUB_OUTPUT"
73 +
74 + - name: Install npm@latest on Node
75 + if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
76 run: npm i --prefer-online --no-fund --no-audit -g npm@latest
77 +
78 - name: npm Version
79 run: npm -v
80 - name: Install Dependencies
.gitignore
+2
@@ -17,7 +17,9 @@
17 !/bin/
18 !/CHANGELOG*
19 !/CODE_OF_CONDUCT.md
20 +!/CONTENT-MODEL.md
21 !/content/
22 +!/CONTRIBUTING.md
23 !/docs/
24 !/gatsby-*.js
25 !/lib/
SECURITY.md
+1 -2
@@ -4,11 +4,10 @@ GitHub takes the security of our software products and services seriously, inclu
4
5 If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways.
6
7 -If the vulnerability you have found is *not* [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) or if you do not wish to be considered for a bounty reward, please report the issue to us directly using [private vulnerability reporting](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability).
7 +If the vulnerability you have found is *not* [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) or if you do not wish to be considered for a bounty reward, please report the issue to us directly through [opensource-security@github.com](mailto:opensource-security@github.com).
8
9 If the vulnerability you have found is [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) and you would like for your finding to be considered for a bounty reward, please submit the vulnerability to us through [HackerOne](https://hackerone.com/github) in order to be eligible to receive a bounty award.
10
11 **Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
12
13 Thanks for helping make GitHub safe for everyone.
14 -
cli/package.json
+2 -2
@@ -30,7 +30,7 @@
30 },
31 "devDependencies": {
32 "@npmcli/eslint-config": "^4.0.1",
33 - "@npmcli/template-oss": "4.11.0",
33 + "@npmcli/template-oss": "4.19.0",
34 "tap": "^16.3.2"
35 },
36 "author": "GitHub Inc.",
@@ -43,7 +43,7 @@
43 },
44 "templateOSS": {
45 "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
46 - "version": "4.11.0",
46 + "version": "4.19.0",
47 "content": "./scripts/template-oss"
48 },
49 "tap": {
package-lock.json
+344 -21
@@ -20,7 +20,7 @@
20 },
21 "devDependencies": {
22 "@npmcli/eslint-config": "^4.0.1",
23 - "@npmcli/template-oss": "4.11.0",
23 + "@npmcli/template-oss": "4.19.0",
24 "tap": "^16.3.2"
25 },
26 "engines": {
@@ -42,7 +42,7 @@
42 },
43 "devDependencies": {
44 "@npmcli/eslint-config": "^4.0.1",
45 - "@npmcli/template-oss": "4.11.0",
45 + "@npmcli/template-oss": "4.19.0",
46 "tap": "^16.3.2"
47 },
48 "engines": {
@@ -3159,6 +3159,96 @@
3159 "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==",
3160 "dev": true
3161 },
3162 + "node_modules/@isaacs/cliui": {
3163 + "version": "8.0.2",
3164 + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
3165 + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
3166 + "dev": true,
3167 + "dependencies": {
3168 + "string-width": "^5.1.2",
3169 + "string-width-cjs": "npm:string-width@^4.2.0",
3170 + "strip-ansi": "^7.0.1",
3171 + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
3172 + "wrap-ansi": "^8.1.0",
3173 + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
3174 + },
3175 + "engines": {
3176 + "node": ">=12"
3177 + }
3178 + },
3179 + "node_modules/@isaacs/cliui/node_modules/ansi-regex": {
3180 + "version": "6.0.1",
3181 + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
3182 + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
3183 + "dev": true,
3184 + "engines": {
3185 + "node": ">=12"
3186 + },
3187 + "funding": {
3188 + "url": "https://github.com/chalk/ansi-regex?sponsor=1"
3189 + }
3190 + },
3191 + "node_modules/@isaacs/cliui/node_modules/ansi-styles": {
3192 + "version": "6.2.1",
3193 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
3194 + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
3195 + "dev": true,
3196 + "engines": {
3197 + "node": ">=12"
3198 + },
3199 + "funding": {
3200 + "url": "https://github.com/chalk/ansi-styles?sponsor=1"
3201 + }
3202 + },
3203 + "node_modules/@isaacs/cliui/node_modules/string-width": {
3204 + "version": "5.1.2",
3205 + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
3206 + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
3207 + "dev": true,
3208 + "dependencies": {
3209 + "eastasianwidth": "^0.2.0",
3210 + "emoji-regex": "^9.2.2",
3211 + "strip-ansi": "^7.0.1"
3212 + },
3213 + "engines": {
3214 + "node": ">=12"
3215 + },
3216 + "funding": {
3217 + "url": "https://github.com/sponsors/sindresorhus"
3218 + }
3219 + },
3220 + "node_modules/@isaacs/cliui/node_modules/strip-ansi": {
3221 + "version": "7.1.0",
3222 + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
3223 + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
3224 + "dev": true,
3225 + "dependencies": {
3226 + "ansi-regex": "^6.0.1"
3227 + },
3228 + "engines": {
3229 + "node": ">=12"
3230 + },
3231 + "funding": {
3232 + "url": "https://github.com/chalk/strip-ansi?sponsor=1"
3233 + }
3234 + },
3235 + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": {
3236 + "version": "8.1.0",
3237 + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
3238 + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
3239 + "dev": true,
3240 + "dependencies": {
3241 + "ansi-styles": "^6.1.0",
3242 + "string-width": "^5.0.1",
3243 + "strip-ansi": "^7.0.1"
3244 + },
3245 + "engines": {
3246 + "node": ">=12"
3247 + },
3248 + "funding": {
3249 + "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
3250 + }
3251 + },
3252 "node_modules/@isaacs/string-locale-compare": {
3253 "version": "1.1.0",
3254 "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz",
@@ -4740,13 +4830,12 @@
4830 }
4831 },
4832 "node_modules/@npmcli/git": {
4743 - "version": "4.0.3",
4744 - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz",
4745 - "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==",
4833 + "version": "4.1.0",
4834 + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.1.0.tgz",
4835 + "integrity": "sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==",
4836 "dependencies": {
4837 "@npmcli/promise-spawn": "^6.0.0",
4838 "lru-cache": "^7.4.4",
4749 - "mkdirp": "^1.0.4",
4839 "npm-pick-manifest": "^8.0.0",
4840 "proc-log": "^3.0.0",
4841 "promise-inflight": "^1.0.1",
@@ -4898,9 +4987,9 @@
4987 }
4988 },
4989 "node_modules/@npmcli/template-oss": {
4901 - "version": "4.11.0",
4902 - "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.11.0.tgz",
4903 - "integrity": "sha512-nvZqRxT9AFf56Fj07v1yG9AQVOTNn82ysMVI67IzpktunKFHmZ5Tp8P/al5pPik/nYQ4AieEyh7XC2dMro4moA==",
4990 + "version": "4.19.0",
4991 + "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.19.0.tgz",
4992 + "integrity": "sha512-5WHCup9pCF3q8HYQ2Nja5+M/JKUUCObLc/iv+I5u/pVmfD/lHhMifdWAE8bopZeyOFb65rRW/1qI6E+g0U4QiA==",
4993 "dev": true,
4994 "hasInstallScript": true,
4995 "dependencies": {
@@ -4911,17 +5000,18 @@
5000 "@npmcli/arborist": "^6.0.0",
5001 "@npmcli/git": "^4.0.0",
5002 "@npmcli/map-workspaces": "^3.0.0",
4914 - "@npmcli/package-json": "^3.0.0",
5003 + "@npmcli/package-json": "^4.0.0",
5004 "@octokit/rest": "^19.0.4",
5005 "diff": "^5.0.0",
4917 - "glob": "^8.0.1",
5006 + "glob": "^10.1.0",
5007 "handlebars": "^4.7.7",
5008 "hosted-git-info": "^6.0.0",
4920 - "ini": "^3.0.1",
5009 + "ini": "^4.0.0",
5010 "json-parse-even-better-errors": "^3.0.0",
5011 "just-deep-map-values": "^1.1.1",
4923 - "just-diff": "^5.0.1",
5012 + "just-diff": "^6.0.0",
5013 "lodash": "^4.17.21",
5014 + "minimatch": "^9.0.2",
5015 "npm-package-arg": "^10.0.0",
5016 "proc-log": "^3.0.0",
5017 "release-please": "npm:@npmcli/release-please@^14.2.6",
@@ -4938,6 +5028,137 @@
5028 "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
5029 }
5030 },
5031 + "node_modules/@npmcli/template-oss/node_modules/@npmcli/package-json": {
5032 + "version": "4.0.1",
5033 + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-4.0.1.tgz",
5034 + "integrity": "sha512-lRCEGdHZomFsURroh522YvA/2cVb9oPIJrjHanCJZkiasz1BzcnLr3tBJhlV7S86MBJBuAQ33is2D60YitZL2Q==",
5035 + "dev": true,
5036 + "dependencies": {
5037 + "@npmcli/git": "^4.1.0",
5038 + "glob": "^10.2.2",
5039 + "hosted-git-info": "^6.1.1",
5040 + "json-parse-even-better-errors": "^3.0.0",
5041 + "normalize-package-data": "^5.0.0",
5042 + "proc-log": "^3.0.0",
5043 + "semver": "^7.5.3"
5044 + },
5045 + "engines": {
5046 + "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
5047 + }
5048 + },
5049 + "node_modules/@npmcli/template-oss/node_modules/foreground-child": {
5050 + "version": "3.1.1",
5051 + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
5052 + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
5053 + "dev": true,
5054 + "dependencies": {
5055 + "cross-spawn": "^7.0.0",
5056 + "signal-exit": "^4.0.1"
5057 + },
5058 + "engines": {
5059 + "node": ">=14"
5060 + },
5061 + "funding": {
5062 + "url": "https://github.com/sponsors/isaacs"
5063 + }
5064 + },
5065 + "node_modules/@npmcli/template-oss/node_modules/glob": {
5066 + "version": "10.3.6",
5067 + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.6.tgz",
5068 + "integrity": "sha512-mEfImdc/fiYHEcF6pHFfD2b/KrdFB1qH9mRe5vI5HROF8G51SWxQJ2V56Ezl6ZL9y86gsxQ1Lgo2S746KGUPSQ==",
5069 + "dev": true,
5070 + "dependencies": {
5071 + "foreground-child": "^3.1.0",
5072 + "jackspeak": "^2.0.3",
5073 + "minimatch": "^9.0.1",
5074 + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
5075 + "path-scurry": "^1.10.1"
5076 + },
5077 + "bin": {
5078 + "glob": "dist/cjs/src/bin.js"
5079 + },
5080 + "engines": {
5081 + "node": ">=16 || 14 >=14.17"
5082 + },
5083 + "funding": {
5084 + "url": "https://github.com/sponsors/isaacs"
5085 + }
5086 + },
5087 + "node_modules/@npmcli/template-oss/node_modules/jackspeak": {
5088 + "version": "2.3.3",
5089 + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz",
5090 + "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==",
5091 + "dev": true,
5092 + "dependencies": {
5093 + "@isaacs/cliui": "^8.0.2"
5094 + },
5095 + "engines": {
5096 + "node": ">=14"
5097 + },
5098 + "funding": {
5099 + "url": "https://github.com/sponsors/isaacs"
5100 + },
5101 + "optionalDependencies": {
5102 + "@pkgjs/parseargs": "^0.11.0"
5103 + }
5104 + },
5105 + "node_modules/@npmcli/template-oss/node_modules/just-diff": {
5106 + "version": "6.0.2",
5107 + "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-6.0.2.tgz",
5108 + "integrity": "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA==",
5109 + "dev": true
5110 + },
5111 + "node_modules/@npmcli/template-oss/node_modules/minimatch": {
5112 + "version": "9.0.3",
5113 + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
5114 + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
5115 + "dev": true,
5116 + "dependencies": {
5117 + "brace-expansion": "^2.0.1"
5118 + },
5119 + "engines": {
5120 + "node": ">=16 || 14 >=14.17"
5121 + },
5122 + "funding": {
5123 + "url": "https://github.com/sponsors/isaacs"
5124 + }
5125 + },
5126 + "node_modules/@npmcli/template-oss/node_modules/minipass": {
5127 + "version": "7.0.3",
5128 + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz",
5129 + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==",
5130 + "dev": true,
5131 + "engines": {
5132 + "node": ">=16 || 14 >=14.17"
5133 + }
5134 + },
5135 + "node_modules/@npmcli/template-oss/node_modules/normalize-package-data": {
5136 + "version": "5.0.0",
5137 + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz",
5138 + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==",
5139 + "dev": true,
5140 + "dependencies": {
5141 + "hosted-git-info": "^6.0.0",
5142 + "is-core-module": "^2.8.1",
5143 + "semver": "^7.3.5",
5144 + "validate-npm-package-license": "^3.0.4"
5145 + },
5146 + "engines": {
5147 + "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
5148 + }
5149 + },
5150 + "node_modules/@npmcli/template-oss/node_modules/signal-exit": {
5151 + "version": "4.1.0",
5152 + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
5153 + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
5154 + "dev": true,
5155 + "engines": {
5156 + "node": ">=14"
5157 + },
5158 + "funding": {
5159 + "url": "https://github.com/sponsors/isaacs"
5160 + }
5161 + },
5162 "node_modules/@octokit/auth-token": {
5163 "version": "3.0.2",
5164 "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.2.tgz",
@@ -5793,6 +6014,16 @@
6014 "@parcel/core": "^2.6.2"
6015 }
6016 },
6017 + "node_modules/@pkgjs/parseargs": {
6018 + "version": "0.11.0",
6019 + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
6020 + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
6021 + "dev": true,
6022 + "optional": true,
6023 + "engines": {
6024 + "node": ">=14"
6025 + }
6026 + },
6027 "node_modules/@pmmmwh/react-refresh-webpack-plugin": {
6028 "version": "0.5.10",
6029 "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz",
@@ -11657,6 +11888,12 @@
11888 "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz",
11889 "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA=="
11890 },
11891 + "node_modules/eastasianwidth": {
11892 + "version": "0.2.0",
11893 + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
11894 + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
11895 + "dev": true
11896 + },
11897 "node_modules/ee-first": {
11898 "version": "1.1.1",
11899 "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -17041,12 +17278,12 @@
17278 "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
17279 },
17280 "node_modules/ini": {
17044 - "version": "3.0.1",
17045 - "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz",
17046 - "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==",
17281 + "version": "4.1.1",
17282 + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz",
17283 + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==",
17284 "dev": true,
17285 "engines": {
17049 - "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
17286 + "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
17287 }
17288 },
17289 "node_modules/inline-style-parser": {
@@ -23572,6 +23809,40 @@
23809 "node": ">=0.10.0"
23810 }
23811 },
23812 + "node_modules/path-scurry": {
23813 + "version": "1.10.1",
23814 + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
23815 + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
23816 + "dev": true,
23817 + "dependencies": {
23818 + "lru-cache": "^9.1.1 || ^10.0.0",
23819 + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
23820 + },
23821 + "engines": {
23822 + "node": ">=16 || 14 >=14.17"
23823 + },
23824 + "funding": {
23825 + "url": "https://github.com/sponsors/isaacs"
23826 + }
23827 + },
23828 + "node_modules/path-scurry/node_modules/lru-cache": {
23829 + "version": "10.0.1",
23830 + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
23831 + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
23832 + "dev": true,
23833 + "engines": {
23834 + "node": "14 || >=16.14"
23835 + }
23836 + },
23837 + "node_modules/path-scurry/node_modules/minipass": {
23838 + "version": "7.0.3",
23839 + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz",
23840 + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==",
23841 + "dev": true,
23842 + "engines": {
23843 + "node": ">=16 || 14 >=14.17"
23844 + }
23845 + },
23846 "node_modules/path-to-regexp": {
23847 "version": "0.1.7",
23848 "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
@@ -26701,9 +26972,9 @@
26972 }
26973 },
26974 "node_modules/semver": {
26704 - "version": "7.3.8",
26705 - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
26706 - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
26975 + "version": "7.5.4",
26976 + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
26977 + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
26978 "dependencies": {
26979 "lru-cache": "^6.0.0"
26980 },
@@ -27647,6 +27918,27 @@
27918 "node": ">=8"
27919 }
27920 },
27921 + "node_modules/string-width-cjs": {
27922 + "name": "string-width",
27923 + "version": "4.2.3",
27924 + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
27925 + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
27926 + "dev": true,
27927 + "dependencies": {
27928 + "emoji-regex": "^8.0.0",
27929 + "is-fullwidth-code-point": "^3.0.0",
27930 + "strip-ansi": "^6.0.1"
27931 + },
27932 + "engines": {
27933 + "node": ">=8"
27934 + }
27935 + },
27936 + "node_modules/string-width-cjs/node_modules/emoji-regex": {
27937 + "version": "8.0.0",
27938 + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
27939 + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
27940 + "dev": true
27941 + },
27942 "node_modules/string-width/node_modules/emoji-regex": {
27943 "version": "8.0.0",
27944 "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -27718,6 +28010,19 @@
28010 "node": ">=8"
28011 }
28012 },
28013 + "node_modules/strip-ansi-cjs": {
28014 + "name": "strip-ansi",
28015 + "version": "6.0.1",
28016 + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
28017 + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
28018 + "dev": true,
28019 + "dependencies": {
28020 + "ansi-regex": "^5.0.1"
28021 + },
28022 + "engines": {
28023 + "node": ">=8"
28024 + }
28025 + },
28026 "node_modules/strip-bom": {
28027 "version": "4.0.0",
28028 "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
@@ -32035,6 +32340,24 @@
32340 "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
32341 }
32342 },
32343 + "node_modules/wrap-ansi-cjs": {
32344 + "name": "wrap-ansi",
32345 + "version": "7.0.0",
32346 + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
32347 + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
32348 + "dev": true,
32349 + "dependencies": {
32350 + "ansi-styles": "^4.0.0",
32351 + "string-width": "^4.1.0",
32352 + "strip-ansi": "^6.0.0"
32353 + },
32354 + "engines": {
32355 + "node": ">=10"
32356 + },
32357 + "funding": {
32358 + "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
32359 + }
32360 + },
32361 "node_modules/wrappy": {
32362 "version": "1.0.2",
32363 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -32550,7 +32873,7 @@
32873 },
32874 "devDependencies": {
32875 "@github/prettier-config": "^0.0.6",
32553 - "@npmcli/template-oss": "4.11.0",
32876 + "@npmcli/template-oss": "4.19.0",
32877 "@testing-library/jest-dom": "^5.16.5",
32878 "babel-jest": "^29.3.1",
32879 "eslint": "^8.33.0",
package.json
+2 -2
@@ -33,7 +33,7 @@
33 },
34 "devDependencies": {
35 "@npmcli/eslint-config": "^4.0.1",
36 - "@npmcli/template-oss": "4.11.0",
36 + "@npmcli/template-oss": "4.19.0",
37 "tap": "^16.3.2"
38 },
39 "author": "GitHub Inc.",
@@ -46,7 +46,7 @@
46 },
47 "templateOSS": {
48 "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
49 - "version": "4.11.0",
49 + "version": "4.19.0",
50 "content": "./scripts/template-oss"
51 },
52 "tap": {
scripts/template-oss/index.js
+6 -4
@@ -6,22 +6,22 @@ module.exports = {
6 '.github/CODEOWNERS': 'CODEOWNERS',
7 '.github/ISSUE_TEMPLATE/bug.yml': false,
8 '.commitlintrc.js': false,
9 - '.github/dependabot.yml': false,
10 - '.github/workflows/post-dependabot.yml': false,
9 + '.github/settings.yml': false,
10 },
11 },
12 rootModule: {
13 add: {
14 'CODE_OF_CONDUCT.md': false,
15 + 'CONTRIBUTING.md': false,
16 },
17 },
18 workspaceRepo: {
19 add: {
20 - '.github/dependabot.yml': false,
21 - '.github/workflows/post-dependabot.yml': false,
20 + '.github/settings.yml': false,
21 },
22 },
23 ciVersions: 'latest',
24 + latestCiVersion: 18,
25 macCI: false,
26 windowsCI: false,
27 lockfile: true,
@@ -33,5 +33,7 @@ module.exports = {
33 '/LICENSE*',
34 '/*.md',
35 '/gatsby-*.js',
36 + '/CONTRIBUTING.md',
37 + '/CONTENT-MODEL.md',
38 ],
39 }
scripts/template-oss/publish.yml
+3 -1
@@ -3,7 +3,9 @@ name: Publish
3 on:
4 push:
5 branches:
6 - - {{ defaultBranch }}
6 + {{#each branchPatterns}}
7 + - {{ . }}
8 + {{/each}}
9 pull_request:
10 workflow_dispatch:
11 workflow_call:
theme/.gitignore
+1
@@ -8,6 +8,7 @@
8 !/.eslintrc.js
9 !/.eslintrc.local.*
10 !/.gitignore
11 +!/.prettierIgnore
12 !/bin/
13 !/CHANGELOG*
14 !/docs/
theme/.prettierIgnore new
+2
@@ -0,0 +1,2 @@
1 +scripts/template-oss/*.json
2 +scripts/template-oss/*.yml
theme/package.json
+4 -3
@@ -17,7 +17,8 @@
17 "template-oss-apply": "template-oss-apply --force",
18 "lintfix": "npm run lint -- --fix",
19 "snap": "tap",
20 - "posttest": "npm run lint"
20 + "posttest": "npm run lint",
21 + "format": "prettier --write ."
22 },
23 "peerDependencies": {
24 "gatsby": "^4.19.0",
@@ -72,7 +73,7 @@
73 },
74 "devDependencies": {
75 "@github/prettier-config": "^0.0.6",
75 - "@npmcli/template-oss": "4.11.0",
76 + "@npmcli/template-oss": "4.19.0",
77 "@testing-library/jest-dom": "^5.16.5",
78 "babel-jest": "^29.3.1",
79 "eslint": "^8.33.0",
@@ -90,7 +91,7 @@
91 },
92 "templateOSS": {
93 "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
93 - "version": "4.11.0",
94 + "version": "4.19.0",
95 "content": "./scripts/template-oss"
96 },
97 "tap": {
theme/scripts/template-oss/index.js
+7 -2
@@ -1,12 +1,17 @@
1 module.exports = {
2 ...require('../../../scripts/template-oss'),
3 + workspaceRepo: {
4 + add: {
5 + '.github/settings.yml': false,
6 + },
7 + },
8 workspaceModule: {
9 add: {
5 - 'package.json': 'pkg.json',
10 + 'package.json': {file: 'pkg.json', overwrite: false},
11 '.eslintrc.js': false,
12 },
13 },
9 - allowPaths: ['/src', '/gatsby-*.js', '/jest*.js', '/index.js'],
14 + allowPaths: ['/src', '/gatsby-*.js', '/jest*.js', '/index.js', '/.prettierIgnore'],
15 requiredPackages: {
16 devDependencies: [],
17 },
theme/scripts/template-oss/pkg.json
+3 -14
@@ -1,18 +1,7 @@
1 {
2 "scripts": {
3 - "lint": "eslint \"**/*.js\"",
4 - "postlint": "template-oss-check",
5 - "template-oss-apply": "template-oss-apply --force",
6 - "lintfix": "{{ localNpmPath }} run lint -- --fix",
3 "test": "jest",
8 - "posttest": "{{ localNpmPath }} run lint"
4 + "format": "prettier --write ."
5 },
10 - "engines": {
11 - {{#if engines}}
12 - "node": {{{ json engines }}}
13 - {{/if}}
14 - },
15 - {{{ json __CONFIG_KEY__ }}}: {
16 - "version": {{{ json __VERSION__ }}}
17 - }
18 -}
\ No newline at end of file
6 + "files": {{{ del }}}
7 +}