Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 3dae4eb

Browse files
committed
chore: initial commit
0 parents  commit 3dae4eb

31 files changed

+943
-0
lines changed

.commitlintrc.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
2+
3+
module.exports = {
4+
extends: ['@commitlint/config-conventional'],
5+
rules: {
6+
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'deps', 'chore']],
7+
'header-max-length': [2, 'always', 80],
8+
'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']],
9+
},
10+
}

.eslintrc.js

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

.github/CODEOWNERS

+3
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+
* @npm/cli-team

.github/ISSUE_TEMPLATE/bug.yml

+54
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+
8+
body:
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: |
49+
- npm:
50+
- Node:
51+
- OS:
52+
- platform:
53+
validations:
54+
required: false

.github/ISSUE_TEMPLATE/config.yml

+3
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

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
version: 2
4+
5+
updates:
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/matchers/tap.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"//@npmcli/template-oss": "This file is automatically added by @npmcli/template-oss. Do not edit.",
3+
"problemMatcher": [
4+
{
5+
"owner": "tap",
6+
"pattern": [
7+
{
8+
"regexp": "^\\s*not ok \\d+ - (.*)",
9+
"message": 1
10+
},
11+
{
12+
"regexp": "^\\s*---"
13+
},
14+
{
15+
"regexp": "^\\s*at:"
16+
},
17+
{
18+
"regexp": "^\\s*line:\\s*(\\d+)",
19+
"line": 1
20+
},
21+
{
22+
"regexp": "^\\s*column:\\s*(\\d+)",
23+
"column": 1
24+
},
25+
{
26+
"regexp": "^\\s*file:\\s*(.*)",
27+
"file": 1
28+
}
29+
]
30+
}
31+
]
32+
}

.github/workflows/audit.yml

+27
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: Audit
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
# "At 08:00 UTC (01:00 PT) on Monday" https://crontab.guru/#0_8_*_*_1
9+
- cron: "0 8 * * 1"
10+
11+
jobs:
12+
audit:
13+
runs-on: ubuntu-latest
14+
steps:
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 robot"
20+
- uses: actions/setup-node@v3
21+
with:
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 --no-audit --no-fund --package-lock
27+
- run: npm audit

.github/workflows/ci-pkg1.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: CI - pkg1
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
branches:
9+
- '*'
10+
paths:
11+
- pkg1/**
12+
push:
13+
branches:
14+
- main
15+
- latest
16+
paths:
17+
- pkg1/**
18+
schedule:
19+
# "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1
20+
- cron: "0 9 * * 1"
21+
22+
jobs:
23+
lint:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Setup git user
28+
run: |
29+
git config --global user.email "[email protected]"
30+
git config --global user.name "npm CLI robot"
31+
- uses: actions/setup-node@v3
32+
with:
33+
node-version: 16.x
34+
- name: Update npm to latest
35+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
36+
- run: npm -v
37+
- run: npm i --ignore-scripts --no-audit --no-fund
38+
- run: npm run lint -w pkg1
39+
40+
test:
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
node-version:
45+
- 12.13.0
46+
- 12.x
47+
- 14.15.0
48+
- 14.x
49+
- 16.0.0
50+
- 16.x
51+
platform:
52+
- os: ubuntu-latest
53+
shell: bash
54+
- os: macos-latest
55+
shell: bash
56+
- os: windows-latest
57+
shell: cmd
58+
runs-on: ${{ matrix.platform.os }}
59+
defaults:
60+
run:
61+
shell: ${{ matrix.platform.shell }}
62+
steps:
63+
- uses: actions/checkout@v3
64+
- name: Setup git user
65+
run: |
66+
git config --global user.email "[email protected]"
67+
git config --global user.name "npm CLI robot"
68+
- uses: actions/setup-node@v3
69+
with:
70+
node-version: ${{ matrix.node-version }}
71+
- name: Update to workable npm (windows)
72+
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
73+
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
74+
run: |
75+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
76+
tar xf npm-7.5.4.tgz
77+
cd package
78+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
79+
cd ..
80+
rmdir /s /q package
81+
- name: Update npm to 7
82+
# If we do test on npm 10 it needs npm7
83+
if: startsWith(matrix.node-version, '10.')
84+
run: npm i --prefer-online --no-fund --no-audit -g npm@7
85+
- name: Update npm to latest
86+
if: ${{ !startsWith(matrix.node-version, '10.') }}
87+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
88+
- run: npm -v
89+
- name: add tap problem matcher
90+
run: echo "::add-matcher::.github/matchers/tap.json"
91+
- run: npm i --ignore-scripts --no-audit --no-fund
92+
- run: npm test --ignore-scripts -w pkg1

.github/workflows/ci-pkg2.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: CI - pkg2
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
branches:
9+
- '*'
10+
paths:
11+
- pkg2/**
12+
push:
13+
branches:
14+
- main
15+
- latest
16+
paths:
17+
- pkg2/**
18+
schedule:
19+
# "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1
20+
- cron: "0 9 * * 1"
21+
22+
jobs:
23+
lint:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Setup git user
28+
run: |
29+
git config --global user.email "[email protected]"
30+
git config --global user.name "npm CLI robot"
31+
- uses: actions/setup-node@v3
32+
with:
33+
node-version: 16.x
34+
- name: Update npm to latest
35+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
36+
- run: npm -v
37+
- run: npm i --ignore-scripts --no-audit --no-fund
38+
- run: npm run lint -w pkg2
39+
40+
test:
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
node-version:
45+
- 12.13.0
46+
- 12.x
47+
- 14.15.0
48+
- 14.x
49+
- 16.0.0
50+
- 16.x
51+
platform:
52+
- os: ubuntu-latest
53+
shell: bash
54+
- os: macos-latest
55+
shell: bash
56+
- os: windows-latest
57+
shell: cmd
58+
runs-on: ${{ matrix.platform.os }}
59+
defaults:
60+
run:
61+
shell: ${{ matrix.platform.shell }}
62+
steps:
63+
- uses: actions/checkout@v3
64+
- name: Setup git user
65+
run: |
66+
git config --global user.email "[email protected]"
67+
git config --global user.name "npm CLI robot"
68+
- uses: actions/setup-node@v3
69+
with:
70+
node-version: ${{ matrix.node-version }}
71+
- name: Update to workable npm (windows)
72+
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
73+
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
74+
run: |
75+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
76+
tar xf npm-7.5.4.tgz
77+
cd package
78+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
79+
cd ..
80+
rmdir /s /q package
81+
- name: Update npm to 7
82+
# If we do test on npm 10 it needs npm7
83+
if: startsWith(matrix.node-version, '10.')
84+
run: npm i --prefer-online --no-fund --no-audit -g npm@7
85+
- name: Update npm to latest
86+
if: ${{ !startsWith(matrix.node-version, '10.') }}
87+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
88+
- run: npm -v
89+
- name: add tap problem matcher
90+
run: echo "::add-matcher::.github/matchers/tap.json"
91+
- run: npm i --ignore-scripts --no-audit --no-fund
92+
- run: npm test --ignore-scripts -w pkg2

0 commit comments

Comments
 (0)