Skip to content

Commit f11b6a3

Browse files
authored
chore: onboard @npmcli/template-oss (npm#7)
1 parent 0d42518 commit f11b6a3

File tree

13 files changed

+545
-1941
lines changed

13 files changed

+545
-1941
lines changed

.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/workflows/ci.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
13
name: CI
24

35
on:
@@ -8,11 +10,23 @@ on:
810
- latest
911

1012
jobs:
11-
build:
13+
lint:
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+
cache: npm
21+
- run: npm i --prefer-online -g npm@latest
22+
- run: npm ci
23+
- run: npm run lint
24+
25+
test:
1226
strategy:
1327
fail-fast: false
1428
matrix:
15-
node-version: [10.0.x, 10.x, 12.0.x, 12.x, 14.0.x, 14.x, 15.x, 16.x]
29+
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
1630
platform:
1731
- os: ubuntu-latest
1832
shell: bash
@@ -24,30 +38,16 @@ jobs:
2438
shell: cmd
2539
- os: windows-latest
2640
shell: powershell
27-
2841
runs-on: ${{ matrix.platform.os }}
2942
defaults:
3043
run:
3144
shell: ${{ matrix.platform.shell }}
32-
3345
steps:
34-
- name: Checkout Repository
35-
uses: actions/[email protected]
36-
37-
- name: Use Nodejs ${{ matrix.node-version }}
38-
uses: actions/setup-node@v2
46+
- uses: actions/checkout@v2
47+
- uses: actions/setup-node@v2
3948
with:
4049
node-version: ${{ matrix.node-version }}
4150
cache: npm
42-
43-
- name: Update npm
44-
run: npm i --prefer-online -g npm@latest
45-
46-
- name: Install dependencies
47-
run: npm ci
48-
49-
- name: Run Tap Tests
50-
run: npm test
51-
52-
- name: List dependencies
53-
run: npm ls -a
51+
- run: npm i --prefer-online -g npm@latest
52+
- run: npm ci
53+
- run: npm test --ignore-scripts

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
13
# ignore everything in the root
24
/*
35

46
# keep these
7+
!/.eslintrc*
58
!/.github
69
!**/.gitignore
710
!/package.json
811
!/package-lock.json
12+
!/docs
913
!/bin
1014
!/lib
1115
!/map.js
1216
!/tap-snapshots
1317
!/test
18+
!/scripts
1419
!/README*
1520
!/LICENSE*
21+
!/SECURITY*
22+
!/CHANGELOG*

LICENSE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file is automatically added by @npmcli/template-oss. Do not edit. -->
2+
13
ISC License
24

35
Copyright npm, Inc.

SECURITY.md

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+
Please send vulnerability reports through [hackerone](https://hackerone.com/github).

lib/common/file-url-to-path/polyfill.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class ERR_INVALID_FILE_URL_PATH extends TypeError {
2929

3030
class ERR_INVALID_ARG_TYPE extends TypeError {
3131
constructor (name, actual) {
32-
super(`The "${name}" argument must be one of type string or an instance of URL. Received type ${typeof actual} ${actual}`)
32+
super(`The "${name}" argument must be one of type string or an instance ` +
33+
`of URL. Received type ${typeof actual} ${actual}`)
3334
this.code = 'ERR_INVALID_ARG_TYPE'
3435
}
3536

lib/rm/polyfill.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class ERR_FS_EISDIR extends Error {
5656
this.errno = errnos.EISDIR
5757
this.syscall = 'rm'
5858
this.path = path
59-
this.message = `Path is a directory: ${this.syscall} returned ${this.info.code} (is a directory) ${path}`
59+
this.message = `Path is a directory: ${this.syscall} returned ` +
60+
`${this.info.code} (is a directory) ${path}`
6061
}
6162

6263
toString () {

0 commit comments

Comments
 (0)