@npmcli/template-oss 2.6.0 → 2.8.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/ci.yml +1 -1
- package/lib/content/codeql-analysis.yml +38 -0
- package/lib/content/commitlintrc.js +1 -1
- package/lib/content/dependabot.yml +2 -2
- package/lib/content/post-dependabot.yml +31 -0
- package/lib/content/release-please.yml +1 -1
- package/lib/postinstall/copy-content.js +2 -0
- package/lib/postinstall/update-package.js +8 -0
- package/lib/postlint/check-package.js +1 -0
- package/package.json +4 -4
package/lib/content/ci.yml
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This file is automatically added by @npmcli/template-oss. Do not edit.
|
|
2
|
+
|
|
3
|
+
name: "CodeQL"
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
pull_request:
|
|
9
|
+
# The branches below must be a subset of the branches above
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
schedule:
|
|
12
|
+
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1
|
|
13
|
+
- cron: "0 3 * * 1"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
analyze:
|
|
17
|
+
name: Analyze
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
permissions:
|
|
20
|
+
actions: read
|
|
21
|
+
contents: read
|
|
22
|
+
security-events: write
|
|
23
|
+
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
language: [ 'javascript' ]
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- name: Checkout repository
|
|
31
|
+
uses: actions/checkout@v2
|
|
32
|
+
|
|
33
|
+
- name: Initialize CodeQL
|
|
34
|
+
uses: github/codeql-action/init@v1
|
|
35
|
+
with:
|
|
36
|
+
languages: ${{ matrix.language }}
|
|
37
|
+
- name: Perform CodeQL Analysis
|
|
38
|
+
uses: github/codeql-action/analyze@v1
|
|
@@ -6,6 +6,6 @@ module.exports = {
|
|
|
6
6
|
rules: {
|
|
7
7
|
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'chore', 'deps']],
|
|
8
8
|
'header-max-length': [2, 'always', 80],
|
|
9
|
-
'subject-case': [
|
|
9
|
+
'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']],
|
|
10
10
|
},
|
|
11
11
|
}
|
|
@@ -8,9 +8,9 @@ updates:
|
|
|
8
8
|
interval: daily
|
|
9
9
|
allow:
|
|
10
10
|
- dependency-type: direct
|
|
11
|
-
versioning-strategy: increase
|
|
11
|
+
versioning-strategy: increase
|
|
12
12
|
commit-message:
|
|
13
13
|
prefix: deps
|
|
14
14
|
prefix-development: chore
|
|
15
15
|
labels:
|
|
16
|
-
- "
|
|
16
|
+
- "Dependencies"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file is automatically added by @npmcli/template-oss. Do not edit.
|
|
2
|
+
|
|
3
|
+
name: "Post Dependabot Actions"
|
|
4
|
+
on: pull_request
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
Install:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
- uses: actions/setup-node@v2
|
|
13
|
+
with:
|
|
14
|
+
node-version: '16'
|
|
15
|
+
- name: Dependabot metadata
|
|
16
|
+
id: metadata
|
|
17
|
+
uses: dependabot/fetch-metadata@v1.1.1
|
|
18
|
+
with:
|
|
19
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
20
|
+
- name: npm install and commit
|
|
21
|
+
if: ${{contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')}}
|
|
22
|
+
env:
|
|
23
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
+
run: |
|
|
25
|
+
git config --local user.email "ops+npm-cli@npmjs.com"
|
|
26
|
+
git config --local user.name "npm cli ops bot"
|
|
27
|
+
gh pr checkout ${{ github.event.pull_request.number }}
|
|
28
|
+
npm install
|
|
29
|
+
git add .
|
|
30
|
+
git commit -am "chore: postinstall for dependabot template-oss PR"
|
|
31
|
+
git push origin ${{github.ref_name}}
|
|
@@ -21,5 +21,5 @@ jobs:
|
|
|
21
21
|
[{"type":"feat","section":"Features","hidden":false},
|
|
22
22
|
{"type":"fix","section":"Bug Fixes","hidden":false},
|
|
23
23
|
{"type":"docs","section":"Documentation","hidden":false},
|
|
24
|
-
{"type":"deps","section":"
|
|
24
|
+
{"type":"deps","section":"Dependencies","hidden":false},
|
|
25
25
|
{"type":"chore","hidden":true}]
|
|
@@ -21,6 +21,8 @@ const repoFiles = {
|
|
|
21
21
|
'.github/CODEOWNERS': './CODEOWNERS',
|
|
22
22
|
'.github/dependabot.yml': './dependabot.yml',
|
|
23
23
|
'.github/workflows/audit.yml': './audit.yml',
|
|
24
|
+
'.github/workflows/codeql-analysis.yml': './codeql-analysis.yml',
|
|
25
|
+
'.github/workflows/post-dependabot.yml': './post-dependabot.yml',
|
|
24
26
|
'.github/workflows/pull-request.yml': './pull-request.yml',
|
|
25
27
|
'.github/workflows/release-please.yml': './release-please.yml',
|
|
26
28
|
}
|
|
@@ -79,6 +79,14 @@ const patchPackage = async (path, root, config) => {
|
|
|
79
79
|
if (pkg.content.templateVersion) {
|
|
80
80
|
update.templateVersion = undefined
|
|
81
81
|
}
|
|
82
|
+
if (pkg.content.scripts && pkg.content.scripts['lint:fix']) {
|
|
83
|
+
// some old packages using standard had a lint:fix script
|
|
84
|
+
delete update.scripts['lint:fix']
|
|
85
|
+
}
|
|
86
|
+
if (pkg.content.standard) {
|
|
87
|
+
// remove standard configuration if it exists
|
|
88
|
+
update.standard = undefined
|
|
89
|
+
}
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
pkg.update(update)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/template-oss",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "templated files used in npm CLI team oss projects",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"author": "GitHub Inc.",
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@npmcli/fs": "^1.
|
|
35
|
-
"@npmcli/map-workspaces": "^2.0.
|
|
34
|
+
"@npmcli/fs": "^1.1.1",
|
|
35
|
+
"@npmcli/map-workspaces": "^2.0.1",
|
|
36
36
|
"@npmcli/package-json": "^1.0.1",
|
|
37
37
|
"json-parse-even-better-errors": "^2.3.1",
|
|
38
38
|
"which": "^2.0.2"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@npmcli/eslint-config": "*",
|
|
46
46
|
"@npmcli/promise-spawn": "^2.0.0",
|
|
47
47
|
"@npmcli/template-oss": "file:./",
|
|
48
|
-
"eslint": "^8.
|
|
48
|
+
"eslint": "^8.9.0",
|
|
49
49
|
"eslint-plugin-node": "^11.1.0",
|
|
50
50
|
"tap": "*"
|
|
51
51
|
},
|