Skip to content

Commit ecfb69d

Browse files
dependabot[bot]wraithgar
andauthoredMar 28, 2022
chore: bump @npmcli/template-oss from 2.9.2 to 3.2.0 (#38)
* chore: bump @npmcli/template-oss from 2.9.2 to 3.2.0 Bumps [@npmcli/template-oss](https://github.com/npm/template-oss) from 2.9.2 to 3.2.0. - [Release notes](https://github.com/npm/template-oss/releases) - [Changelog](https://github.com/npm/template-oss/blob/main/CHANGELOG.md) - [Commits](npm/template-oss@v2.9.2...v3.2.0) --- updated-dependencies: - dependency-name: "@npmcli/template-oss" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: postinstall for dependabot template-oss PR Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gar <gar+gh@danger.computer>
1 parent 0c87a6e commit ecfb69d

14 files changed

+209
-146
lines changed
 

‎.commitlintrc.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
// This file is automatically added by @npmcli/template-oss. Do not edit.
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
22

33
module.exports = {
44
extends: ['@commitlint/config-conventional'],
5-
// If you change rules be sure to also update release-please.yml
65
rules: {
7-
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'chore', 'deps']],
6+
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'deps', 'chore']],
87
'header-max-length': [2, 'always', 80],
98
'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']],
109
},

‎.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is automatically added by @npmcli/template-oss. Do not edit.
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
22

33
const { readdirSync: readdir } = require('fs')
44

‎.github/CODEOWNERS

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
* @npm/cli-team
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
* @npm/cli-team

‎.github/ISSUE_TEMPLATE/bug.yml

+44-44
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,52 @@
33
name: Bug
44
description: File a bug/issue
55
title: "[BUG] <title>"
6-
labels: [Bug, Needs Triage]
6+
labels: [ Bug, Needs Triage ]
7+
78
body:
8-
- type: checkboxes
9-
attributes:
10-
label: Is there an existing issue for this?
11-
description: Please [search here](./issues) to see if an issue already exists for your problem.
12-
options:
13-
- label: I have searched the existing issues
14-
required: true
15-
- type: textarea
16-
attributes:
17-
label: Current Behavior
18-
description: A clear & concise description of what you're experiencing.
19-
validations:
20-
required: false
21-
- type: textarea
22-
attributes:
23-
label: Expected Behavior
24-
description: A clear & concise description of what you expected to happen.
25-
validations:
26-
required: false
27-
- type: textarea
28-
attributes:
29-
label: Steps To Reproduce
30-
description: Steps to reproduce the behavior.
31-
value: |
32-
1. In this environment...
33-
2. With this config...
34-
3. Run '...'
35-
4. See error...
36-
validations:
37-
required: false
38-
- type: textarea
39-
attributes:
40-
label: Environment
41-
description: |
42-
examples:
43-
- **npm**: 7.6.3
44-
- **Node**: 13.14.0
45-
- **OS**: Ubuntu 20.04
46-
- **platform**: Macbook Pro
47-
value: |
9+
- type: checkboxes
10+
attributes:
11+
label: Is there an existing issue for this?
12+
description: Please [search here](./issues) to see if an issue already exists for your problem.
13+
options:
14+
- label: I have searched the existing issues
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Current Behavior
19+
description: A clear & concise description of what you're experiencing.
20+
validations:
21+
required: false
22+
- type: textarea
23+
attributes:
24+
label: Expected Behavior
25+
description: A clear & concise description of what you expected to happen.
26+
validations:
27+
required: false
28+
- type: textarea
29+
attributes:
30+
label: Steps To Reproduce
31+
description: Steps to reproduce the behavior.
32+
value: |
33+
1. In this environment...
34+
2. With this config...
35+
3. Run '...'
36+
4. See error...
37+
validations:
38+
required: false
39+
- type: textarea
40+
attributes:
41+
label: Environment
42+
description: |
43+
examples:
44+
- **npm**: 7.6.3
45+
- **Node**: 13.14.0
46+
- **OS**: Ubuntu 20.04
47+
- **platform**: Macbook Pro
48+
value: |
4849
- npm:
4950
- Node:
5051
- OS:
5152
- platform:
52-
validations:
53-
required: false
54-
53+
validations:
54+
required: false

‎.github/dependabot.yml

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# This file is automatically added by @npmcli/template-oss. Do not edit.
22

33
version: 2
4+
45
updates:
5-
- package-ecosystem: npm
6-
directory: "/"
7-
schedule:
8-
interval: daily
9-
allow:
10-
- dependency-type: direct
11-
versioning-strategy: increase
12-
commit-message:
13-
prefix: deps
14-
prefix-development: chore
15-
labels:
16-
- "Dependencies"
6+
- package-ecosystem: npm
7+
directory: "/"
8+
schedule:
9+
interval: daily
10+
allow:
11+
- dependency-type: direct
12+
versioning-strategy: increase-if-necessary
13+
commit-message:
14+
prefix: deps
15+
prefix-development: chore
16+
labels:
17+
- "Dependencies"

‎.github/workflows/audit.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
33
name: Audit
44

55
on:
6+
workflow_dispatch:
67
schedule:
78
# "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1
89
- cron: "0 1 * * 1"
9-
workflow_dispatch:
1010

1111
jobs:
1212
audit:
13-
name: npm audit
1413
runs-on: ubuntu-latest
1514
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
15+
- uses: actions/checkout@v3
16+
- name: Setup git user
17+
run: |
18+
git config --global user.email "ops+npm-cli@npmjs.com"
19+
git config --global user.name "npm cli ops bot"
20+
- uses: actions/setup-node@v3
1821
with:
19-
node-version: '16'
20-
- name: Install deps
21-
run: npm i --package-lock
22-
- name: Audit
23-
run: npm audit
22+
node-version: 16.x
23+
- name: Update npm to latest
24+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
25+
- run: npm -v
26+
- run: npm i --ignore-scripts --package-lock
27+
- run: npm audit

‎.github/workflows/ci.yml

+42-18
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
name: CI
44

55
on:
6+
workflow_dispatch:
67
pull_request:
8+
branches:
9+
- '*'
710
push:
811
branches:
912
- main
@@ -16,47 +19,68 @@ jobs:
1619
lint:
1720
runs-on: ubuntu-latest
1821
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-node@v2
22+
- uses: actions/checkout@v3
23+
- name: Setup git user
24+
run: |
25+
git config --global user.email "ops+npm-cli@npmjs.com"
26+
git config --global user.name "npm cli ops bot"
27+
- uses: actions/setup-node@v3
2128
with:
22-
node-version: '16'
23-
- run: npm i --prefer-online -g npm@latest
24-
- run: npm i
29+
node-version: 16.x
30+
- name: Update npm to latest
31+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
32+
- run: npm -v
33+
- run: npm i --ignore-scripts
2534
- run: npm run lint
2635

2736
test:
2837
strategy:
2938
fail-fast: false
3039
matrix:
31-
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
40+
node-version:
41+
- 12.13.0
42+
- 12.x
43+
- 14.15.0
44+
- 14.x
45+
- 16.0.0
46+
- 16.x
3247
platform:
33-
- os: ubuntu-latest
34-
shell: bash
35-
- os: macos-latest
36-
shell: bash
37-
- os: windows-latest
38-
shell: cmd
48+
- os: ubuntu-latest
49+
shell: bash
50+
- os: macos-latest
51+
shell: bash
52+
- os: windows-latest
53+
shell: cmd
3954
runs-on: ${{ matrix.platform.os }}
4055
defaults:
4156
run:
4257
shell: ${{ matrix.platform.shell }}
4358
steps:
44-
- uses: actions/checkout@v2
45-
- uses: actions/setup-node@v2
59+
- uses: actions/checkout@v3
60+
- name: Setup git user
61+
run: |
62+
git config --global user.email "ops+npm-cli@npmjs.com"
63+
git config --global user.name "npm cli ops bot"
64+
- uses: actions/setup-node@v3
4665
with:
4766
node-version: ${{ matrix.node-version }}
48-
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
4967
- name: Update to workable npm (windows)
50-
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
68+
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
69+
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
5170
run: |
5271
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
5372
tar xf npm-7.5.4.tgz
5473
cd package
5574
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
5675
cd ..
5776
rmdir /s /q package
58-
- name: Update npm
77+
- name: Update npm to 7
78+
# If we do test on npm 10 it needs npm7
79+
if: startsWith(matrix.node-version, '10.')
80+
run: npm i --prefer-online --no-fund --no-audit -g npm@7
81+
- name: Update npm to latest
82+
if: ${{ !startsWith(matrix.node-version, '10.') }}
5983
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
6084
- run: npm -v
61-
- run: npm i
85+
- run: npm i --ignore-scripts
6286
- run: npm test --ignore-scripts

‎.github/workflows/codeql-analysis.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ name: "CodeQL"
44

55
on:
66
push:
7-
branches: [ main ]
7+
branches:
8+
- main
9+
- latest
810
pull_request:
911
# The branches below must be a subset of the branches above
10-
branches: [ main ]
12+
branches:
13+
- main
14+
- latest
1115
schedule:
1216
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1
1317
- cron: "0 3 * * 1"
@@ -24,15 +28,17 @@ jobs:
2428
strategy:
2529
fail-fast: false
2630
matrix:
27-
language: [ 'javascript' ]
31+
language: [ javascript ]
2832

2933
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
34+
- uses: actions/checkout@v3
35+
- name: Setup git user
36+
run: |
37+
git config --global user.email "ops+npm-cli@npmjs.com"
38+
git config --global user.name "npm cli ops bot"
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v1
41+
with:
42+
languages: ${{ matrix.language }}
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v1

‎.github/workflows/post-dependabot.yml

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,43 @@
11
# This file is automatically added by @npmcli/template-oss. Do not edit.
22

3-
name: "Post Dependabot Actions"
3+
name: Post Dependabot Actions
4+
45
on: pull_request
56

67
# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps
78
permissions:
9+
actions: write
810
contents: write
911

1012
jobs:
1113
Install:
1214
runs-on: ubuntu-latest
13-
if: ${{ github.actor == 'dependabot[bot]' }}
15+
if: github.actor == 'dependabot[bot]'
1416
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
17+
- uses: actions/checkout@v3
18+
- name: Setup git user
19+
run: |
20+
git config --global user.email "ops+npm-cli@npmjs.com"
21+
git config --global user.name "npm cli ops bot"
22+
- uses: actions/setup-node@v3
1723
with:
18-
node-version: '16'
24+
node-version: 16.x
25+
- name: Update npm to latest
26+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
27+
- run: npm -v
1928
- name: Dependabot metadata
2029
id: metadata
2130
uses: dependabot/fetch-metadata@v1.1.1
2231
with:
2332
github-token: "${{ secrets.GITHUB_TOKEN }}"
2433
- name: npm install and commit
25-
if: ${{contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')}}
34+
if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')
2635
env:
2736
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2837
run: |
29-
git config --local user.email "ops+npm-cli@npmjs.com"
30-
git config --local user.name "npm cli ops bot"
3138
gh pr checkout ${{ github.event.pull_request.number }}
32-
npm install
39+
npm install --ignore-scripts
40+
npm run template-oss-apply
3341
git add .
3442
git commit -am "chore: postinstall for dependabot template-oss PR"
3543
git push

‎.github/workflows/pull-request.yml

+18-7
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,35 @@ name: Pull Request Linting
44

55
on:
66
pull_request:
7-
types: [opened, reopened, edited, synchronize]
7+
types:
8+
- opened
9+
- reopened
10+
- edited
11+
- synchronize
812

913
jobs:
1014
check:
1115
name: Check PR Title or Commits
1216
runs-on: ubuntu-latest
1317
steps:
14-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1519
with:
1620
fetch-depth: 0
17-
- uses: actions/setup-node@v2
21+
- name: Setup git user
22+
run: |
23+
git config --global user.email "ops+npm-cli@npmjs.com"
24+
git config --global user.name "npm cli ops bot"
25+
- uses: actions/setup-node@v3
1826
with:
19-
node-version: '16'
27+
node-version: 16.x
28+
- name: Update npm to latest
29+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
30+
- run: npm -v
2031
- name: Install deps
21-
run: |
22-
npm i -D @commitlint/cli @commitlint/config-conventional
32+
run: npm i -D @commitlint/cli @commitlint/config-conventional
2333
- name: Check commits OR PR title
2434
env:
2535
PR_TITLE: ${{ github.event.pull_request.title }}
2636
run: |
27-
npx commitlint -x @commitlint/config-conventional -V --from origin/main --to ${{ github.event.pull_request.head.sha }} || echo $PR_TITLE | npx commitlint -x @commitlint/config-conventional -V
37+
npx --offline commitlint -V --from origin/main --to ${{ github.event.pull_request.head.sha }} \
38+
|| echo $PR_TITLE | npx --offline commitlint -V

‎.github/workflows/release-please.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ on:
66
push:
77
branches:
88
- main
9+
- latest
910

1011
jobs:
1112
release-please:
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses: google-github-actions/release-please-action@v2
15+
- uses: google-github-actions/release-please-action@v3
1516
id: release
1617
with:
1718
release-type: node
18-
# If you change changelog-types be sure to also update commitlintrc.js
1919
changelog-types: >
20-
[{"type":"feat","section":"Features","hidden":false},
21-
{"type":"fix","section":"Bug Fixes","hidden":false},
22-
{"type":"docs","section":"Documentation","hidden":false},
23-
{"type":"deps","section":"Dependencies","hidden":false},
24-
{"type":"chore","hidden":true}]
20+
[
21+
{"type":"feat","section":"Features","hidden":false},
22+
{"type":"fix","section":"Bug Fixes","hidden":false},
23+
{"type":"docs","section":"Documentation","hidden":false},
24+
{"type":"deps","section":"Dependencies","hidden":false},
25+
{"type":"chore","hidden":true}
26+
]

‎.gitignore

+14-12
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@
44
/*
55

66
# keep these
7-
!/.commitlintrc.js
8-
!/.npmrc
9-
!/.eslintrc*
10-
!/.github
7+
!/.eslintrc.local.*
118
!**/.gitignore
12-
!/package.json
13-
!/docs
14-
!/bin
15-
!/lib
9+
!/docs/
10+
!/tap-snapshots/
11+
!/test/
1612
!/map.js
17-
!/tap-snapshots
18-
!/test
19-
!/scripts
13+
!/scripts/
2014
!/README*
2115
!/LICENSE*
22-
!/SECURITY*
2316
!/CHANGELOG*
17+
!/.commitlintrc.js
18+
!/.eslintrc.js
19+
!/.github/
20+
!/.gitignore
21+
!/.npmrc
22+
!/SECURITY.md
23+
!/bin/
24+
!/lib/
25+
!/package.json

‎.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
;This file is automatically added by @npmcli/template-oss. Do not edit.
1+
; This file is automatically added by @npmcli/template-oss. Do not edit.
22

33
package-lock=false

‎package.json

+14-10
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
"version": "2.0.2",
44
"main": "lib/index.js",
55
"files": [
6-
"bin",
7-
"lib"
6+
"bin/",
7+
"lib/"
88
],
99
"engines": {
10-
"node": "^12.13.0 || ^14.15.0 || >=16"
10+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
1111
},
1212
"description": "Retrieves a name:pathname Map for a given workspaces config",
13-
"repository": "https://github.com/npm/map-workspaces",
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/npm/map-workspaces.git"
16+
},
1417
"keywords": [
1518
"npm",
1619
"npmcli",
@@ -22,24 +25,24 @@
2225
"author": "GitHub Inc.",
2326
"license": "ISC",
2427
"scripts": {
25-
"lint": "eslint '**/*.js'",
28+
"lint": "eslint \"**/*.js\"",
2629
"pretest": "npm run lint",
2730
"test": "tap",
2831
"snap": "tap",
2932
"preversion": "npm test",
3033
"postversion": "npm publish",
3134
"prepublishOnly": "git push origin --follow-tags",
32-
"postlint": "npm-template-check",
35+
"postlint": "template-oss-check",
3336
"lintfix": "npm run lint -- --fix",
3437
"posttest": "npm run lint",
35-
"template-copy": "npm-template-copy --force"
38+
"template-oss-apply": "template-oss-apply --force"
3639
},
3740
"tap": {
3841
"check-coverage": true
3942
},
4043
"devDependencies": {
41-
"@npmcli/template-oss": "^2.9.2",
42-
"eslint": "^8.11.0",
44+
"@npmcli/eslint-config": "^3.0.1",
45+
"@npmcli/template-oss": "3.2.0",
4346
"tap": "^15.1.6"
4447
},
4548
"dependencies": {
@@ -49,6 +52,7 @@
4952
"read-package-json-fast": "^2.0.3"
5053
},
5154
"templateOSS": {
52-
"version": "2.9.2"
55+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
56+
"version": "3.2.0"
5357
}
5458
}

0 commit comments

Comments
 (0)
Please sign in to comment.