Skip to content

Commit

Permalink
chore: bring in @npmcli/config as a workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzy committed Nov 1, 2022
1 parent 2293fb2 commit 80f9d19
Show file tree
Hide file tree
Showing 39 changed files with 5,983 additions and 25 deletions.
132 changes: 132 additions & 0 deletions .github/workflows/ci-npmcli-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CI - @npmcli/config

on:
workflow_dispatch:
pull_request:
paths:
- workspaces/config/**
push:
branches:
- main
- latest
paths:
- workspaces/config/**
schedule:
# "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1
- cron: "0 9 * * 1"

jobs:
engines:
name: Engines - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
if: github.repository_owner == 'npm'
strategy:
fail-fast: false
matrix:
platform:
- name: Linux
os: ubuntu-latest
shell: bash
node-version:
- 14.17.0
- 16.13.0
- 18.0.0
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Reset Deps
run: node . run resetdeps -- --engines-strict

lint:
name: Lint
if: github.repository_owner == 'npm'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Reset Deps
run: node . run resetdeps
- name: Lint
run: node . run lint --ignore-scripts -w @npmcli/config
- name: Post Lint
run: node . run postlint --ignore-scripts -w @npmcli/config

test:
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
if: github.repository_owner == 'npm'
strategy:
fail-fast: false
matrix:
platform:
- name: Linux
os: ubuntu-latest
shell: bash
- name: macOS
os: macos-latest
shell: bash
- name: Windows
os: windows-latest
shell: cmd
node-version:
- 14.17.0
- 14.x
- 16.13.0
- 16.x
- 18.0.0
- 18.x
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Reset Deps
run: node . run resetdeps
- name: Link
if: matrix
run: node . link -f --ignore-scripts
- name: Rebuild cmark-gfm
run: node . rebuild cmark-gfm
- name: Add Problem Matcher
run: echo "::add-matcher::.github/matchers/tap.json"
- name: Test
run: node . test --ignore-scripts -w @npmcli/config
- name: Check Git Status
if: matrix && matrix.platform.os != 'windows-latest'
run: node scripts/git-dirty.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
!/workspaces/
/workspaces/*
!/workspaces/arborist/
!/workspaces/config/
!/workspaces/libnpmaccess/
!/workspaces/libnpmdiff/
!/workspaces/libnpmexec/
Expand Down
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"workspaces/libnpmpublish": "7.0.1",
"workspaces/libnpmsearch": "6.0.0",
"workspaces/libnpmteam": "5.0.0",
"workspaces/libnpmversion": "4.0.0"
"workspaces/libnpmversion": "4.0.0",
"workspaces/config": "6.0.1"
}
7 changes: 6 additions & 1 deletion DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ graph LR;
npmcli-arborist-->treeverse;
npmcli-config-->ini;
npmcli-config-->nopt;
npmcli-config-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"];
npmcli-config-->npmcli-template-oss["@npmcli/template-oss"];
npmcli-config-->proc-log;
npmcli-config-->read-package-json-fast;
npmcli-config-->semver;
Expand Down Expand Up @@ -832,10 +834,13 @@ graph LR;
npmcli-arborist-->walk-up-path;
npmcli-config-->ini;
npmcli-config-->nopt;
npmcli-config-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"];
npmcli-config-->npmcli-template-oss["@npmcli/template-oss"];
npmcli-config-->proc-log;
npmcli-config-->read-package-json-fast;
npmcli-config-->semver;
npmcli-config-->tap;
npmcli-config-->walk-up-path;
npmcli-disparity-colors-->ansi-styles;
npmcli-docs-->cmark-gfm;
Expand Down Expand Up @@ -1105,4 +1110,4 @@ packages higher up the chain.
- @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, readdir-scoped-modules, promzard
- @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
- ignore-walk, @npmcli/eslint-config, @npmcli/template-oss, 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
- ignore-walk, @npmcli/eslint-config, @npmcli/template-oss, 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
1 change: 1 addition & 0 deletions node_modules/@npmcli/config
41 changes: 24 additions & 17 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2159,22 +2159,8 @@
}
},
"node_modules/@npmcli/config": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/config/-/config-6.0.1.tgz",
"integrity": "sha512-f8PGjhM7kKbMfEMmE8n1dW+m/7XFuvatLXqItO89ZKJwYl9Zs5d7CmsIe8n8i+4YmGYL3HqR26/mVb4oK2b6Zw==",
"inBundle": true,
"dependencies": {
"@npmcli/map-workspaces": "^3.0.0",
"ini": "^3.0.0",
"nopt": "^6.0.0",
"proc-log": "^3.0.0",
"read-package-json-fast": "^3.0.0",
"semver": "^7.3.5",
"walk-up-path": "^1.0.0"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
"resolved": "workspaces/config",
"link": true
},
"node_modules/@npmcli/disparity-colors": {
"version": "3.0.0",
Expand Down Expand Up @@ -13636,7 +13622,6 @@
},
"node_modules/walk-up-path": {
"version": "1.0.0",
"inBundle": true,
"license": "ISC"
},
"node_modules/wcwidth": {
Expand Down Expand Up @@ -14091,6 +14076,28 @@
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"workspaces/config": {
"name": "@npmcli/config",
"version": "6.0.1",
"license": "ISC",
"dependencies": {
"@npmcli/map-workspaces": "^3.0.0",
"ini": "^3.0.0",
"nopt": "^6.0.0",
"proc-log": "^3.0.0",
"read-package-json-fast": "^3.0.0",
"semver": "^7.3.5",
"walk-up-path": "^1.0.0"
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.6.2",
"tap": "^16.0.1"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"workspaces/libnpmaccess": {
"version": "7.0.0",
"license": "ISC",
Expand Down
3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
},
"workspaces/libnpmversion": {
"prerelease": false
}
},
"workspaces/config": {}
},
"exclude-packages-from-root": true,
"group-pull-request-title-pattern": "chore: release ${version}",
Expand Down
17 changes: 17 additions & 0 deletions workspaces/config/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

'use strict'

const { readdirSync: readdir } = require('fs')

const localConfigs = readdir(__dirname)
.filter((file) => file.startsWith('.eslintrc.local.'))
.map((file) => `./${file}`)

module.exports = {
root: true,
extends: [
'@npmcli',
...localConfigs,
],
}
21 changes: 21 additions & 0 deletions workspaces/config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

# ignore everything in the root
/*

# keep these
!**/.gitignore
!/.eslintrc.js
!/.eslintrc.local.*
!/.gitignore
!/bin/
!/CHANGELOG*
!/docs/
!/lib/
!/LICENSE*
!/map.js
!/package.json
!/README*
!/scripts/
!/tap-snapshots/
!/test/
Loading

0 comments on commit 80f9d19

Please sign in to comment.