Skip to content

Commit 3a50664

Browse files
authored
fix: template-oss (npm#30)
BREAKING CHANGE: This drops support for node10 and non-LTS versions of node12 and node14
1 parent f650662 commit 3a50664

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+443
-8859
lines changed

.commitlintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
module.exports = {
4+
extends: ['@commitlint/config-conventional'],
5+
// If you change rules be sure to also update release-please.yml
6+
rules: {
7+
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'chore', 'deps']],
8+
'header-max-length': [2, 'always', 80],
9+
'subject-case': [2, 'always', ['lower-case', 'sentence-case', 'start-case']],
10+
},
11+
}

.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
const { readdirSync: readdir } = require('fs')
4+
5+
const localConfigs = readdir(__dirname)
6+
.filter((file) => file.startsWith('.eslintrc.local.'))
7+
.map((file) => `./${file}`)
8+
9+
module.exports = {
10+
extends: [
11+
'@npmcli',
12+
...localConfigs,
13+
],
14+
}

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @npm/cli-team

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Bug
4+
description: File a bug/issue
5+
title: "[BUG] <title>"
6+
labels: [Bug, Needs Triage]
7+
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: |
48+
- npm:
49+
- Node:
50+
- OS:
51+
- platform:
52+
validations:
53+
required: false
54+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
blank_issues_enabled: true

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: npm
6+
directory: "/"
7+
schedule:
8+
interval: daily
9+
allow:
10+
- dependency-type: direct
11+
versioning-strategy: increase-if-necessary
12+
commit-message:
13+
prefix: deps
14+
prefix-development: chore
15+
labels:
16+
- "dependencies"

.github/workflows/audit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Audit
4+
5+
on:
6+
schedule:
7+
# "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1
8+
- cron: "0 1 * * 1"
9+
workflow_dispatch:
10+
11+
jobs:
12+
audit:
13+
name: npm audit
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: '16'
20+
- name: Install deps
21+
run: npm i --package-lock
22+
- name: Audit
23+
run: npm audit

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: CI
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
- latest
11+
schedule:
12+
# "At 02:00 on Monday" https://crontab.guru/#0_1_*_*_1
13+
- cron: "0 2 * * 1"
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-node@v2
21+
with:
22+
node-version: '16'
23+
- run: npm i --prefer-online -g npm@latest
24+
- run: npm i
25+
- run: npm run lint
26+
27+
test:
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
32+
platform:
33+
- os: ubuntu-latest
34+
shell: bash
35+
- os: macos-latest
36+
shell: bash
37+
runs-on: ${{ matrix.platform.os }}
38+
defaults:
39+
run:
40+
shell: ${{ matrix.platform.shell }}
41+
steps:
42+
- uses: actions/checkout@v2
43+
- uses: actions/setup-node@v2
44+
with:
45+
node-version: ${{ matrix.node-version }}
46+
- run: npm i --prefer-online -g npm@latest
47+
- run: npm i
48+
- run: npm test --ignore-scripts

.github/workflows/pull-request.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Pull Request Linting
4+
5+
on:
6+
pull_request:
7+
types: [opened, reopened, edited, synchronize]
8+
9+
jobs:
10+
check:
11+
name: Check PR Title or Commits
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: '16'
20+
- name: Install deps
21+
run: |
22+
npm i -D @commitlint/cli @commitlint/config-conventional
23+
- name: Check commits OR PR title
24+
env:
25+
PR_TITLE: ${{ github.event.pull_request.title }}
26+
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

.github/workflows/release-please.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Release Please
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
release-please:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: google-github-actions/release-please-action@v2
15+
id: release
16+
with:
17+
package-name: conventional-test
18+
release-type: node
19+
# If you change changelog-types be sure to also update commitlintrc.js
20+
changelog-types: >
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}]

0 commit comments

Comments
 (0)