Skip to content

Commit 6df246f

Browse files
fritzywraithgar
authored andcommitted
chore: bring in @npmcli/config as a workspace
1 parent c09abca commit 6df246f

39 files changed

+5945
-25
lines changed
+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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+
lint:
22+
name: Lint
23+
if: github.repository_owner == 'npm'
24+
runs-on: ubuntu-latest
25+
defaults:
26+
run:
27+
shell: bash
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
- name: Setup Git User
32+
run: |
33+
git config --global user.email "npm-cli+bot@github.com"
34+
git config --global user.name "npm CLI robot"
35+
- name: Setup Node
36+
uses: actions/setup-node@v3
37+
with:
38+
node-version: 18.x
39+
cache: npm
40+
- name: Reset Deps
41+
run: node . run resetdeps
42+
- name: Lint
43+
run: node . run lint --ignore-scripts -w @npmcli/config
44+
- name: Post Lint
45+
run: node . run postlint --ignore-scripts -w @npmcli/config
46+
47+
test:
48+
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
49+
if: github.repository_owner == 'npm'
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
platform:
54+
- name: Linux
55+
os: ubuntu-latest
56+
shell: bash
57+
- name: macOS
58+
os: macos-latest
59+
shell: bash
60+
- name: Windows
61+
os: windows-latest
62+
shell: cmd
63+
node-version:
64+
- 14.17.0
65+
- 14.x
66+
- 16.13.0
67+
- 16.x
68+
- 18.0.0
69+
- 18.x
70+
runs-on: ${{ matrix.platform.os }}
71+
defaults:
72+
run:
73+
shell: ${{ matrix.platform.shell }}
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v3
77+
- name: Setup Git User
78+
run: |
79+
git config --global user.email "npm-cli+bot@github.com"
80+
git config --global user.name "npm CLI robot"
81+
- name: Setup Node
82+
uses: actions/setup-node@v3
83+
with:
84+
node-version: ${{ matrix.node-version }}
85+
cache: npm
86+
- name: Reset Deps
87+
run: node . run resetdeps
88+
- name: Add Problem Matcher
89+
run: echo "::add-matcher::.github/matchers/tap.json"
90+
- name: Test
91+
run: node . test --ignore-scripts -w @npmcli/config
92+
- name: Check Git Status
93+
if: matrix && matrix.platform.os != 'windows-latest'
94+
run: node scripts/git-dirty.js

.gitignore

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

+2-1
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

+6-1
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;
@@ -613,10 +615,13 @@ graph LR;
613615
npmcli-arborist-->walk-up-path;
614616
npmcli-config-->ini;
615617
npmcli-config-->nopt;
618+
npmcli-config-->npmcli-eslint-config["@npmcli/eslint-config"];
616619
npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"];
620+
npmcli-config-->npmcli-template-oss["@npmcli/template-oss"];
617621
npmcli-config-->proc-log;
618622
npmcli-config-->read-package-json-fast;
619623
npmcli-config-->semver;
624+
npmcli-config-->tap;
620625
npmcli-config-->walk-up-path;
621626
npmcli-disparity-colors-->ansi-styles;
622627
npmcli-docs-->cmark-gfm;
@@ -763,4 +768,4 @@ packages higher up the chain.
763768
- @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json
764769
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, readdir-scoped-modules, promzard
765770
- @npmcli/docs, npm-bundled, read-package-json-fast, @npmcli/fs, unique-filename, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, dezalgo, read
766-
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, semver, @npmcli/move-file, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, minify-registry-metadata, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate
771+
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, semver, @npmcli/move-file, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, minify-registry-metadata, ini, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, npm-audit-report, npm-user-validate

node_modules/@npmcli/config

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../workspaces/config

package-lock.json

+24-17
Original file line numberDiff line numberDiff line change
@@ -2052,22 +2052,8 @@
20522052
}
20532053
},
20542054
"node_modules/@npmcli/config": {
2055-
"version": "6.0.1",
2056-
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-6.0.1.tgz",
2057-
"integrity": "sha512-f8PGjhM7kKbMfEMmE8n1dW+m/7XFuvatLXqItO89ZKJwYl9Zs5d7CmsIe8n8i+4YmGYL3HqR26/mVb4oK2b6Zw==",
2058-
"inBundle": true,
2059-
"dependencies": {
2060-
"@npmcli/map-workspaces": "^3.0.0",
2061-
"ini": "^3.0.0",
2062-
"nopt": "^6.0.0",
2063-
"proc-log": "^3.0.0",
2064-
"read-package-json-fast": "^3.0.0",
2065-
"semver": "^7.3.5",
2066-
"walk-up-path": "^1.0.0"
2067-
},
2068-
"engines": {
2069-
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
2070-
}
2055+
"resolved": "workspaces/config",
2056+
"link": true
20712057
},
20722058
"node_modules/@npmcli/disparity-colors": {
20732059
"version": "3.0.0",
@@ -13488,7 +13474,6 @@
1348813474
},
1348913475
"node_modules/walk-up-path": {
1349013476
"version": "1.0.0",
13491-
"inBundle": true,
1349213477
"license": "ISC"
1349313478
},
1349413479
"node_modules/wcwidth": {
@@ -13925,6 +13910,28 @@
1392513910
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
1392613911
}
1392713912
},
13913+
"workspaces/config": {
13914+
"name": "@npmcli/config",
13915+
"version": "6.0.1",
13916+
"license": "ISC",
13917+
"dependencies": {
13918+
"@npmcli/map-workspaces": "^3.0.0",
13919+
"ini": "^3.0.0",
13920+
"nopt": "^6.0.0",
13921+
"proc-log": "^3.0.0",
13922+
"read-package-json-fast": "^3.0.0",
13923+
"semver": "^7.3.5",
13924+
"walk-up-path": "^1.0.0"
13925+
},
13926+
"devDependencies": {
13927+
"@npmcli/eslint-config": "^4.0.0",
13928+
"@npmcli/template-oss": "4.8.0",
13929+
"tap": "^16.0.1"
13930+
},
13931+
"engines": {
13932+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
13933+
}
13934+
},
1392813935
"workspaces/libnpmaccess": {
1392913936
"version": "7.0.0",
1393013937
"license": "ISC",

release-please-config.json

+2-1
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

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

workspaces/config/.gitignore

+21
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/

workspaces/config/CHANGELOG.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Changelog
2+
3+
## [6.0.1](https://github.com/npm/config/compare/v6.0.0...v6.0.1) (2022-10-17)
4+
5+
### Dependencies
6+
7+
* [`dca20cc`](https://github.com/npm/config/commit/dca20cc00c0cbebd9d1a1cf1962e32e99057ea8e) [#99](https://github.com/npm/config/pull/99) bump @npmcli/map-workspaces from 2.0.4 to 3.0.0
8+
* [`fc42456`](https://github.com/npm/config/commit/fc424565014cc155e902940221b6283cbb40faf4) [#100](https://github.com/npm/config/pull/100) bump proc-log from 2.0.1 to 3.0.0
9+
10+
## [6.0.0](https://github.com/npm/config/compare/v5.0.0...v6.0.0) (2022-10-13)
11+
12+
### ⚠️ BREAKING CHANGES
13+
14+
* this module no longer attempts to change file ownership automatically
15+
16+
### Features
17+
18+
* [`805535f`](https://github.com/npm/config/commit/805535ff6b7255a3a2fb5e7da392f53b1c2f3c04) [#96](https://github.com/npm/config/pull/96) do not alter file ownership (#96) (@nlf)
19+
20+
### Dependencies
21+
22+
* [`c62c19c`](https://github.com/npm/config/commit/c62c19cffc65a8b6e89cbd071bd7578f246312a9) [#95](https://github.com/npm/config/pull/95) bump read-package-json-fast from 2.0.3 to 3.0.0
23+
24+
## [5.0.0](https://github.com/npm/config/compare/v4.2.2...v5.0.0) (2022-10-06)
25+
26+
### ⚠️ BREAKING CHANGES
27+
28+
* unscoped auth configuration is no longer automatically scoped to a registry. the `validate` method is no longer called automatically. the `_auth` configuration key is no longer split into `username` and `_password`. errors will be thrown by `validate()` if problems are found.
29+
* `@npmcli/config` is now compatible with the following semver range for node: `^14.17.0 || ^16.13.0 || >=18.0.0`
30+
31+
### Features
32+
33+
* [`344ccd3`](https://github.com/npm/config/commit/344ccd3d07979d0cb36dad8a7fe2e9cbbdbdbc9e) [#92](https://github.com/npm/config/pull/92) throw errors for invalid auth configuration (#92) (@nlf)
34+
* [`aa25682`](https://github.com/npm/config/commit/aa256827d76ec9b1aea06eb3ebdd033067a5e604) [#87](https://github.com/npm/config/pull/87) postinstall for dependabot template-oss PR (@lukekarrys)
35+
36+
## [4.2.2](https://github.com/npm/config/compare/v4.2.1...v4.2.2) (2022-08-25)
37+
38+
39+
### Bug Fixes
40+
41+
* warn on bare auth related configs ([#78](https://github.com/npm/config/issues/78)) ([d4e582a](https://github.com/npm/config/commit/d4e582ab7d8d9f4a8615619bb7d3263df5de66e6))
42+
43+
## [4.2.1](https://github.com/npm/config/compare/v4.2.0...v4.2.1) (2022-08-09)
44+
45+
46+
### Bug Fixes
47+
48+
* correctly handle nerf-darted env vars ([#74](https://github.com/npm/config/issues/74)) ([71f559b](https://github.com/npm/config/commit/71f559b08e01616b53f61e1cf385fc44162e2d66))
49+
* linting ([#75](https://github.com/npm/config/issues/75)) ([deb1001](https://github.com/npm/config/commit/deb10011d1b5e3df84b7d13284ea55b07dd62b63))
50+
51+
52+
### Dependencies
53+
54+
* bump nopt from 5.0.0 to 6.0.0 ([#72](https://github.com/npm/config/issues/72)) ([d825726](https://github.com/npm/config/commit/d825726049644f5bbe0edf27b5600cc60ae14ee5))
55+
56+
## [4.2.0](https://github.com/npm/config/compare/v4.1.0...v4.2.0) (2022-07-18)
57+
58+
59+
### Features
60+
61+
* detect registry-scoped certfile and keyfile options ([#69](https://github.com/npm/config/issues/69)) ([e58a4f1](https://github.com/npm/config/commit/e58a4f18f0ec0820fe57ccaff34c4135ece12558))
62+
63+
## [4.1.0](https://github.com/npm/config/compare/v4.0.2...v4.1.0) (2022-04-13)
64+
65+
66+
### Features
67+
68+
* warn on deprecated config ([#62](https://github.com/npm/config/issues/62)) ([190065e](https://github.com/npm/config/commit/190065ef53d39a1e09486639c710dabdd73d8a7c))
69+
70+
### [4.0.2](https://github.com/npm/config/compare/v4.0.1...v4.0.2) (2022-04-05)
71+
72+
73+
### Bug Fixes
74+
75+
* replace deprecated String.prototype.substr() ([#59](https://github.com/npm/config/issues/59)) ([43893b6](https://github.com/npm/config/commit/43893b638f82ade945cba27fe9e483b32eea99ae))
76+
77+
78+
### Dependencies
79+
80+
* bump ini from 2.0.0 to 3.0.0 ([#60](https://github.com/npm/config/issues/60)) ([965e2a4](https://github.com/npm/config/commit/965e2a40c7649ffd6e84fb83823a2b751bcda294))
81+
* update @npmcli/map-workspaces requirement from ^2.0.1 to ^2.0.2 ([#49](https://github.com/npm/config/issues/49)) ([9a0f182](https://github.com/npm/config/commit/9a0f182c4fa46dadccc631a244678a3c469ad63a))
82+
83+
### [4.0.1](https://www.github.com/npm/config/compare/v4.0.0...v4.0.1) (2022-03-02)
84+
85+
86+
### Bug Fixes
87+
88+
* skip workspace detection when in global mode ([#47](https://www.github.com/npm/config/issues/47)) ([bedff61](https://www.github.com/npm/config/commit/bedff61c6f074f21c1586afe391dc2cb6e821619))
89+
90+
91+
### Dependencies
92+
93+
* update @npmcli/map-workspaces requirement from ^2.0.0 to ^2.0.1 ([#43](https://www.github.com/npm/config/issues/43)) ([c397ab8](https://www.github.com/npm/config/commit/c397ab88c459fc477ae9094ec0ee0b571e6bb8ed))
94+
95+
## [4.0.0](https://www.github.com/npm/config/compare/v3.0.1...v4.0.0) (2022-02-14)
96+
97+
98+
### ⚠ BREAKING CHANGES
99+
100+
* drop support for the `log` option
101+
102+
### Features
103+
104+
* remove `log` option ([#40](https://www.github.com/npm/config/issues/40)) ([bbf5128](https://www.github.com/npm/config/commit/bbf512818f30d0764e3951449c8f07856d70991e))
105+
106+
107+
### Bug Fixes
108+
109+
* correct a polynomial regex ([#39](https://www.github.com/npm/config/issues/39)) ([9af098f](https://www.github.com/npm/config/commit/9af098fb874c1a8122ab7a5e009235a1f7df72f5))
110+
111+
### [3.0.1](https://www.github.com/npm/config/compare/v3.0.0...v3.0.1) (2022-02-10)
112+
113+
114+
### Dependencies
115+
116+
* update semver requirement from ^7.3.4 to ^7.3.5 ([2cb225a](https://www.github.com/npm/config/commit/2cb225a907180a3b569c8c9baf23da1a989a2f1f))
117+
* use proc-log instead of process.emit ([fd4cd42](https://www.github.com/npm/config/commit/fd4cd429ef875ce68aa0be9bba329cae4e7adfe3))
118+
119+
## [3.0.0](https://www.github.com/npm/config/compare/v2.4.0...v3.0.0) (2022-02-01)
120+
121+
122+
### ⚠ BREAKING CHANGES
123+
124+
* this drops support for node10 and non-LTS versions of node12 and node14
125+
126+
### Features
127+
128+
* automatically detect workspace roots ([#28](https://www.github.com/npm/config/issues/28)) ([a3dc623](https://www.github.com/npm/config/commit/a3dc6234d57c7c80c66a8c33e17cf1d97f86f8d9))
129+
130+
131+
### Bug Fixes
132+
133+
* template-oss ([#29](https://www.github.com/npm/config/issues/29)) ([6440fba](https://www.github.com/npm/config/commit/6440fba6e04b1f87e57b4c2ccc5ea84d8a69b823))
File renamed without changes.

0 commit comments

Comments
 (0)