Skip to content

Commit 6540f05

Browse files
author
Nathan Fritz
committed
chore: bring in @npmcli/config as a workspace
1 parent 2293fb2 commit 6540f05

39 files changed

Lines changed: 5982 additions & 24 deletions
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: CI - @npmcli/config
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
paths:
9+
- workspaces/config/**
10+
push:
11+
branches:
12+
- main
13+
- latest
14+
paths:
15+
- workspaces/config/**
16+
schedule:
17+
# "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1
18+
- cron: "0 9 * * 1"
19+
20+
jobs:
21+
engines:
22+
name: Engines - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
23+
if: github.repository_owner == 'npm'
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
platform:
28+
- name: Linux
29+
os: ubuntu-latest
30+
shell: bash
31+
node-version:
32+
- 14.17.0
33+
- 16.13.0
34+
- 18.0.0
35+
runs-on: ${{ matrix.platform.os }}
36+
defaults:
37+
run:
38+
shell: ${{ matrix.platform.shell }}
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v3
42+
- name: Setup Git User
43+
run: |
44+
git config --global user.email "npm-cli+bot@github.com"
45+
git config --global user.name "npm CLI robot"
46+
- name: Setup Node
47+
uses: actions/setup-node@v3
48+
with:
49+
node-version: ${{ matrix.node-version }}
50+
cache: npm
51+
- name: Reset Deps
52+
run: node . run resetdeps -- --engines-strict
53+
54+
lint:
55+
name: Lint
56+
if: github.repository_owner == 'npm'
57+
runs-on: ubuntu-latest
58+
defaults:
59+
run:
60+
shell: bash
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v3
64+
- name: Setup Git User
65+
run: |
66+
git config --global user.email "npm-cli+bot@github.com"
67+
git config --global user.name "npm CLI robot"
68+
- name: Setup Node
69+
uses: actions/setup-node@v3
70+
with:
71+
node-version: 18.x
72+
cache: npm
73+
- name: Reset Deps
74+
run: node . run resetdeps
75+
- name: Lint
76+
run: node . run lint --ignore-scripts -w @npmcli/config
77+
- name: Post Lint
78+
run: node . run postlint --ignore-scripts -w @npmcli/config
79+
80+
test:
81+
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
82+
if: github.repository_owner == 'npm'
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
platform:
87+
- name: Linux
88+
os: ubuntu-latest
89+
shell: bash
90+
- name: macOS
91+
os: macos-latest
92+
shell: bash
93+
- name: Windows
94+
os: windows-latest
95+
shell: cmd
96+
node-version:
97+
- 14.17.0
98+
- 14.x
99+
- 16.13.0
100+
- 16.x
101+
- 18.0.0
102+
- 18.x
103+
runs-on: ${{ matrix.platform.os }}
104+
defaults:
105+
run:
106+
shell: ${{ matrix.platform.shell }}
107+
steps:
108+
- name: Checkout
109+
uses: actions/checkout@v3
110+
- name: Setup Git User
111+
run: |
112+
git config --global user.email "npm-cli+bot@github.com"
113+
git config --global user.name "npm CLI robot"
114+
- name: Setup Node
115+
uses: actions/setup-node@v3
116+
with:
117+
node-version: ${{ matrix.node-version }}
118+
cache: npm
119+
- name: Reset Deps
120+
run: node . run resetdeps
121+
- name: Link
122+
if: matrix
123+
run: node . link -f --ignore-scripts
124+
- name: Rebuild cmark-gfm
125+
run: node . rebuild cmark-gfm
126+
- name: Add Problem Matcher
127+
run: echo "::add-matcher::.github/matchers/tap.json"
128+
- name: Test
129+
run: node . test --ignore-scripts -w @npmcli/config
130+
- name: Check Git Status
131+
if: matrix && matrix.platform.os != 'windows-latest'
132+
run: node scripts/git-dirty.js

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
!/workspaces/
4444
/workspaces/*
4545
!/workspaces/arborist/
46+
!/workspaces/config/
4647
!/workspaces/libnpmaccess/
4748
!/workspaces/libnpmdiff/
4849
!/workspaces/libnpmexec/

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"workspaces/libnpmpublish": "7.0.1",
1212
"workspaces/libnpmsearch": "6.0.0",
1313
"workspaces/libnpmteam": "5.0.0",
14-
"workspaces/libnpmversion": "4.0.0"
14+
"workspaces/libnpmversion": "4.0.0",
15+
"workspaces/config": "6.0.1"
1516
}

DEPENDENCIES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ graph LR;
188188
npmcli-arborist-->treeverse;
189189
npmcli-config-->ini;
190190
npmcli-config-->nopt;
191+
npmcli-config-->npmcli-eslint-config["@npmcli/eslint-config"];
191192
npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"];
193+
npmcli-config-->npmcli-template-oss["@npmcli/template-oss"];
192194
npmcli-config-->proc-log;
193195
npmcli-config-->read-package-json-fast;
194196
npmcli-config-->semver;
@@ -832,10 +834,13 @@ graph LR;
832834
npmcli-arborist-->walk-up-path;
833835
npmcli-config-->ini;
834836
npmcli-config-->nopt;
837+
npmcli-config-->npmcli-eslint-config["@npmcli/eslint-config"];
835838
npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"];
839+
npmcli-config-->npmcli-template-oss["@npmcli/template-oss"];
836840
npmcli-config-->proc-log;
837841
npmcli-config-->read-package-json-fast;
838842
npmcli-config-->semver;
843+
npmcli-config-->tap;
839844
npmcli-config-->walk-up-path;
840845
npmcli-disparity-colors-->ansi-styles;
841846
npmcli-docs-->cmark-gfm;

node_modules/@npmcli/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../workspaces/config

package-lock.json

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,22 +2159,8 @@
21592159
}
21602160
},
21612161
"node_modules/@npmcli/config": {
2162-
"version": "6.0.1",
2163-
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-6.0.1.tgz",
2164-
"integrity": "sha512-f8PGjhM7kKbMfEMmE8n1dW+m/7XFuvatLXqItO89ZKJwYl9Zs5d7CmsIe8n8i+4YmGYL3HqR26/mVb4oK2b6Zw==",
2165-
"inBundle": true,
2166-
"dependencies": {
2167-
"@npmcli/map-workspaces": "^3.0.0",
2168-
"ini": "^3.0.0",
2169-
"nopt": "^6.0.0",
2170-
"proc-log": "^3.0.0",
2171-
"read-package-json-fast": "^3.0.0",
2172-
"semver": "^7.3.5",
2173-
"walk-up-path": "^1.0.0"
2174-
},
2175-
"engines": {
2176-
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
2177-
}
2162+
"resolved": "workspaces/config",
2163+
"link": true
21782164
},
21792165
"node_modules/@npmcli/disparity-colors": {
21802166
"version": "3.0.0",
@@ -13636,7 +13622,6 @@
1363613622
},
1363713623
"node_modules/walk-up-path": {
1363813624
"version": "1.0.0",
13639-
"inBundle": true,
1364013625
"license": "ISC"
1364113626
},
1364213627
"node_modules/wcwidth": {
@@ -14091,6 +14076,28 @@
1409114076
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
1409214077
}
1409314078
},
14079+
"workspaces/config": {
14080+
"name": "@npmcli/config",
14081+
"version": "6.0.1",
14082+
"license": "ISC",
14083+
"dependencies": {
14084+
"@npmcli/map-workspaces": "^3.0.0",
14085+
"ini": "^3.0.0",
14086+
"nopt": "^6.0.0",
14087+
"proc-log": "^3.0.0",
14088+
"read-package-json-fast": "^3.0.0",
14089+
"semver": "^7.3.5",
14090+
"walk-up-path": "^1.0.0"
14091+
},
14092+
"devDependencies": {
14093+
"@npmcli/eslint-config": "^4.0.0",
14094+
"@npmcli/template-oss": "4.6.2",
14095+
"tap": "^16.0.1"
14096+
},
14097+
"engines": {
14098+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
14099+
}
14100+
},
1409414101
"workspaces/libnpmaccess": {
1409514102
"version": "7.0.0",
1409614103
"license": "ISC",

release-please-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
},
7070
"workspaces/libnpmversion": {
7171
"prerelease": false
72-
}
72+
},
73+
"workspaces/config": {}
7374
},
7475
"exclude-packages-from-root": true,
7576
"group-pull-request-title-pattern": "chore: release ${version}",

workspaces/config/.eslintrc.js

Lines changed: 17 additions & 0 deletions
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+
}

workspaces/config/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
# ignore everything in the root
4+
/*
5+
6+
# keep these
7+
!**/.gitignore
8+
!/.eslintrc.js
9+
!/.eslintrc.local.*
10+
!/.gitignore
11+
!/bin/
12+
!/CHANGELOG*
13+
!/docs/
14+
!/lib/
15+
!/LICENSE*
16+
!/map.js
17+
!/package.json
18+
!/README*
19+
!/scripts/
20+
!/tap-snapshots/
21+
!/test/

0 commit comments

Comments
 (0)