Skip to content

Commit ec049cd

Browse files
chore: bump @npmcli/template-oss from 2.9.2 to 3.1.2 (#108)
* chore: bump @npmcli/template-oss from 2.9.2 to 3.1.2 Bumps [@npmcli/template-oss](https://github.com/npm/template-oss) from 2.9.2 to 3.1.2. - [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.1.2) --- updated-dependencies: - dependency-name: "@npmcli/template-oss" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fixup! fix conflicts Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Luke Karrys <[email protected]>
1 parent 9894911 commit ec049cd

16 files changed

+215
-151
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 "[email protected]"
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 --package-lock
27+
- run: npm audit

.github/workflows/ci.yml

+40-16
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,46 +19,67 @@ 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 "[email protected]"
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
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
2433
- run: npm i
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 "[email protected]"
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
6185
- run: npm i

.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 "[email protected]"
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 "[email protected]"
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/[email protected]
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 "[email protected]"
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 --no-scripts
40+
npm run template-oss-apply
3341
git add .
3442
git commit -am "chore: postinstall for dependabot template-oss PR"
3543
git push

0 commit comments

Comments
 (0)