Skip to content
Permalink
Browse files
deps: @npmcli/template-oss@3.2.1
- `no-shadow` was disabled for the cli and arborist due to the amount
of changes required. These should be fixed later.
- Manually updated linting in the cli root to match closer to what
template-oss does
- Included docs to be managed with template-oss. This required adding
an empty test for now, with the plan to add real tests later.
  • Loading branch information
lukekarrys committed Mar 29, 2022
1 parent b48a2bf commit aac01b89caf6336a2eb34d696296303cdadd5c08
Showing 114 changed files with 2,451 additions and 4,139 deletions.
@@ -0,0 +1,13 @@
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,
],
}

This file was deleted.

@@ -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"
}
}]
}
@@ -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
@@ -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 "ops+npm-cli@npmjs.com"
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
@@ -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 "ops+npm-cli@npmjs.com"
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
@@ -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 "ops+npm-cli@npmjs.com"
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
@@ -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 "ops+npm-cli@npmjs.com"
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

0 comments on commit aac01b8

Please sign in to comment.