@npmcli/template-oss 3.2.2 → 3.3.0
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/lib/content/audit.yml
CHANGED
package/lib/content/ci.yml
CHANGED
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
steps:
|
|
29
29
|
{{> setupGit}}
|
|
30
30
|
{{> setupNode}}
|
|
31
|
-
- run: npm i --ignore-scripts
|
|
31
|
+
- run: npm i --ignore-scripts --no-audit --no-fund
|
|
32
32
|
- run: npm run lint {{~#if isWorkspace}} -w {{pkgName}}{{/if}}
|
|
33
33
|
|
|
34
34
|
test:
|
|
@@ -55,5 +55,5 @@ jobs:
|
|
|
55
55
|
steps:
|
|
56
56
|
{{> setupGit}}
|
|
57
57
|
{{> setupNode useMatrix=true}}
|
|
58
|
-
- run: npm i --ignore-scripts
|
|
58
|
+
- run: npm i --ignore-scripts --no-audit --no-fund
|
|
59
59
|
- run: npm test --ignore-scripts {{~#if isWorkspace}} -w {{pkgName}}{{/if}}
|
package/lib/content/index.js
CHANGED
package/lib/content/npmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
package-lock=
|
|
1
|
+
package-lock={{lockfile}}
|
|
@@ -3,13 +3,12 @@ name: Post Dependabot Actions
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request
|
|
5
5
|
|
|
6
|
-
# https://docs.github.com/en/
|
|
6
|
+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
|
7
7
|
permissions:
|
|
8
|
-
actions: write
|
|
9
8
|
contents: write
|
|
10
9
|
|
|
11
10
|
jobs:
|
|
12
|
-
|
|
11
|
+
template-oss-apply:
|
|
13
12
|
runs-on: ubuntu-latest
|
|
14
13
|
if: github.actor == 'dependabot[bot]'
|
|
15
14
|
steps:
|
|
@@ -26,7 +25,7 @@ jobs:
|
|
|
26
25
|
GITHUB_TOKEN: $\{{ secrets.GITHUB_TOKEN }}
|
|
27
26
|
run: |
|
|
28
27
|
gh pr checkout $\{{ github.event.pull_request.number }}
|
|
29
|
-
npm install --ignore-scripts
|
|
28
|
+
npm install --ignore-scripts --no-audit --no-fund
|
|
30
29
|
npm run template-oss-apply
|
|
31
30
|
git add .
|
|
32
31
|
git commit -am "chore: postinstall for dependabot template-oss PR"
|
|
@@ -11,6 +11,11 @@ on:
|
|
|
11
11
|
- {{.}}
|
|
12
12
|
{{/each}}
|
|
13
13
|
|
|
14
|
+
{{~#if isWorkspace}}
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
{{/if}}
|
|
18
|
+
|
|
14
19
|
jobs:
|
|
15
20
|
release-please:
|
|
16
21
|
runs-on: ubuntu-latest
|
|
@@ -22,6 +27,9 @@ jobs:
|
|
|
22
27
|
{{#if pkgRelPath}}
|
|
23
28
|
monorepo-tags: true
|
|
24
29
|
path: {{pkgRelPath}}
|
|
30
|
+
# name can be removed after this is merged
|
|
31
|
+
# https://github.com/google-github-actions/release-please-action/pull/459
|
|
32
|
+
package-name: "{{pkgName}}"
|
|
25
33
|
{{/if}}
|
|
26
34
|
changelog-types: >
|
|
27
35
|
[
|
|
@@ -29,3 +37,19 @@ jobs:
|
|
|
29
37
|
{{{json .}}}{{#unless @last}},{{/unless}}
|
|
30
38
|
{{/each}}
|
|
31
39
|
]
|
|
40
|
+
{{~#if isWorkspace}}
|
|
41
|
+
{{> setupGit}}
|
|
42
|
+
{{> setupNode}}
|
|
43
|
+
- name: Update package-lock.json and commit
|
|
44
|
+
if: steps.release.outputs.pr
|
|
45
|
+
env:
|
|
46
|
+
GITHUB_TOKEN: $\{{ secrets.GITHUB_TOKEN }}
|
|
47
|
+
run: |
|
|
48
|
+
gh pr checkout $\{{ fromJSON(steps.release.outputs.pr).number }}
|
|
49
|
+
npm run resetdeps
|
|
50
|
+
title="$\{{ fromJSON(steps.release.outputs.pr).title }}"
|
|
51
|
+
# get the version from the pr title
|
|
52
|
+
# get everything after the last space
|
|
53
|
+
git commit -am "deps: {{pkgName}}@${title##* }"
|
|
54
|
+
git push
|
|
55
|
+
{{/if}}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
- uses: actions/setup-node@v3
|
|
2
2
|
with:
|
|
3
3
|
node-version: {{#if useMatrix}}$\{{ matrix.node-version }}{{else}}{{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}{{/if}}
|
|
4
|
+
{{#if lockfile}}
|
|
5
|
+
cache: npm
|
|
6
|
+
{{/if}}
|
|
4
7
|
{{#if useMatrix}}
|
|
5
8
|
- name: Update to workable npm (windows)
|
|
6
9
|
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/template-oss",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "templated files used in npm CLI team oss projects",
|
|
5
5
|
"main": "lib/content/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@npmcli/fs": "^2.0.1",
|
|
35
35
|
"@npmcli/git": "^3.0.0",
|
|
36
36
|
"@npmcli/map-workspaces": "^2.0.2",
|
|
37
|
-
"@npmcli/package-json": "^
|
|
37
|
+
"@npmcli/package-json": "^2.0.0",
|
|
38
38
|
"diff": "^5.0.0",
|
|
39
39
|
"handlebars": "^4.7.7",
|
|
40
40
|
"hosted-git-info": "^5.0.0",
|