Skip to content

Commit

Permalink
deps: @npmcli/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Mar 29, 2022
1 parent b48a2bf commit df7120e
Show file tree
Hide file tree
Showing 113 changed files with 2,455 additions and 4,153 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { readdirSync: readdir } = require('fs')

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

module.exports = {
extends: [
'@npmcli',
...localConfigs,
],
}
15 changes: 0 additions & 15 deletions .eslintrc.json

This file was deleted.

21 changes: 21 additions & 0 deletions .eslintrc.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"ignorePatterns": [
"docs/",
"workspaces/*"
],
"rules": {
"no-shadow": "off",
"no-console": "error"
},
"overrides": [{
"files": [
"scripts/**",
"smoke-tests/**",
"bin/**",
"test/**"
],
"rules": {
"no-console": "off"
}
}]
}
41 changes: 18 additions & 23 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,45 @@
name: Node CI docs
name: CI - docs

on:
workflow_dispatch:
pull_request:
paths:
- docs/**
branches:
- '*'
push:
paths:
- docs/**
push:
branches:
- release-next
- main
- latest
workflow_dispatch:
paths:
- docs/**
schedule:
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
- cron: "0 2 * * 1"

jobs:
lint:
runs-on: ubuntu-latest
steps:
# Checkout the npm/cli repo
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
cache: npm
- name: Install dependencies
run: |
node-version: 16.x
- run: |
node ./bin/npm-cli.js install --ignore-scripts --no-audit
node ./bin/npm-cli.js rebuild
- name: Run linting
run: node ./bin/npm-cli.js run lint -w docs
- run: node ./bin/npm-cli.js run lint -w docs
env:
DEPLOY_VERSION: testing

check_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
cache: npm
- name: Install dependencies
run: |
node-version: 16.x
- run: |
node ./bin/npm-cli.js install --ignore-scripts --no-audit
- name: Rebuild the docs
run: make freshdocs
Expand Down
67 changes: 47 additions & 20 deletions .github/workflows/ci-libnpmaccess.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
name: Node Workspace CI libnpmaccess
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CI - libnpmaccess

on:
workflow_dispatch:
pull_request:
branches:
- '*'
paths:
- workspaces/libnpmaccess/**
push:
paths:
- workspaces/libnpmaccess/**
branches:
- release-next
- main
- latest
workflow_dispatch:
paths:
- workspaces/libnpmaccess/**
schedule:
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
- cron: "0 2 * * 1"

jobs:
lint:
runs-on: ubuntu-latest
steps:
# Checkout the npm/cli repo
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm i --prefer-online -g npm@latest
- run: npm i
- run: npm run lint -w workspaces/libnpmaccess
node-version: 16.x
- name: Update npm to latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i --ignore-scripts
- run: npm run lint -w libnpmaccess

test:
strategy:
fail-fast: false
matrix:
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
node-version:
- 12.13.0
- 12.x
- 14.15.0
- 14.x
- 16.0.0
- 16.x
platform:
- os: ubuntu-latest
shell: bash
Expand All @@ -42,22 +60,31 @@ jobs:
run:
shell: ${{ matrix.platform.shell }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
- name: Update to workable npm (windows)
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
run: |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
tar xf npm-7.5.4.tgz
cd package
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
cd ..
rmdir /s /q package
- name: Update npm
- name: Update npm to 7
# If we do test on npm 10 it needs npm7
if: startsWith(matrix.node-version, '10.')
run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Update npm to latest
if: ${{ !startsWith(matrix.node-version, '10.') }}
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i
- run: npm test --ignore-scripts -w workspaces/libnpmaccess
- run: npm i --ignore-scripts
- run: npm test --ignore-scripts -w libnpmaccess
67 changes: 47 additions & 20 deletions .github/workflows/ci-libnpmdiff.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
name: Node Workspace CI libnpmdiff
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CI - libnpmdiff

on:
workflow_dispatch:
pull_request:
branches:
- '*'
paths:
- workspaces/libnpmdiff/**
push:
paths:
- workspaces/libnpmdiff/**
branches:
- release-next
- main
- latest
workflow_dispatch:
paths:
- workspaces/libnpmdiff/**
schedule:
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
- cron: "0 2 * * 1"

jobs:
lint:
runs-on: ubuntu-latest
steps:
# Checkout the npm/cli repo
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm i --prefer-online -g npm@latest
- run: npm i
- run: npm run lint -w workspaces/libnpmdiff
node-version: 16.x
- name: Update npm to latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i --ignore-scripts
- run: npm run lint -w libnpmdiff

test:
strategy:
fail-fast: false
matrix:
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
node-version:
- 12.13.0
- 12.x
- 14.15.0
- 14.x
- 16.0.0
- 16.x
platform:
- os: ubuntu-latest
shell: bash
Expand All @@ -42,22 +60,31 @@ jobs:
run:
shell: ${{ matrix.platform.shell }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- name: Setup git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
- name: Update to workable npm (windows)
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
run: |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
tar xf npm-7.5.4.tgz
cd package
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
cd ..
rmdir /s /q package
- name: Update npm
- name: Update npm to 7
# If we do test on npm 10 it needs npm7
if: startsWith(matrix.node-version, '10.')
run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Update npm to latest
if: ${{ !startsWith(matrix.node-version, '10.') }}
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i
- run: npm test --ignore-scripts -w workspaces/libnpmdiff
- run: npm i --ignore-scripts
- run: npm test --ignore-scripts -w libnpmdiff
Loading

0 comments on commit df7120e

Please sign in to comment.