-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rewrite to make it more extensible
BREAKING CHANGE: bin scripts are now `template-oss-apply` and `template-oss-check` BREAKING CHANGE: renamed apply props `rootRepo`, `rootModule`, `workspaceRepo`, `workspaceModule`
- Loading branch information
1 parent
666ac23
commit 86bec1c
Showing
100 changed files
with
5,185 additions
and
2,066 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
* @npm/cli-team | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
* @npm/cli-team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
allow: | ||
- dependency-type: direct | ||
versioning-strategy: increase | ||
commit-message: | ||
prefix: deps | ||
prefix-development: chore | ||
labels: | ||
- "Dependencies" | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
allow: | ||
- dependency-type: direct | ||
versioning-strategy: increase | ||
commit-message: | ||
prefix: deps | ||
prefix-development: chore | ||
labels: | ||
- "Dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,40 @@ | |
name: Audit | ||
|
||
on: | ||
workflow_dispatch: null | ||
schedule: | ||
# "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1 | ||
- cron: "0 1 * * 1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
audit: | ||
name: npm audit | ||
runs-on: ubuntu-latest | ||
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: '16' | ||
- name: Install deps | ||
run: npm i --package-lock | ||
- name: Audit | ||
run: npm audit | ||
node-version: 16.x | ||
- name: Update to workable npm (windows) | ||
# 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 to 7 | ||
# If we do test on npm 10 it needs npm7 | ||
if: matrix.node-version <= 10 | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@7 | ||
- name: Update npm to latest | ||
if: matrix.node-version > 10 | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i --package-lock | ||
- run: npm audit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,15 @@ | |
name: CI | ||
|
||
on: | ||
workflow_dispatch: null | ||
pull_request: | ||
branches: | ||
- '*' | ||
push: | ||
branches: | ||
- main | ||
- latest | ||
- release-next | ||
schedule: | ||
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1 | ||
- cron: "0 2 * * 1" | ||
|
@@ -16,37 +20,68 @@ jobs: | |
lint: | ||
runs-on: ubuntu-latest | ||
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: '16' | ||
- run: npm i --prefer-online -g npm@latest | ||
node-version: 16.x | ||
- name: Update to workable npm (windows) | ||
# 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 to 7 | ||
# If we do test on npm 10 it needs npm7 | ||
if: matrix.node-version <= 10 | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@7 | ||
- name: Update npm to latest | ||
if: matrix.node-version > 10 | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i | ||
- run: npm run lint | ||
|
||
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 | ||
- os: macos-latest | ||
shell: bash | ||
- os: windows-latest | ||
shell: cmd | ||
- os: ubuntu-latest | ||
shell: bash | ||
- os: macos-latest | ||
shell: bash | ||
- os: windows-latest | ||
shell: cmd | ||
runs-on: ${{ matrix.platform.os }} | ||
defaults: | ||
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 | ||
node-version: 16.x | ||
- name: Update to workable npm (windows) | ||
# 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 | ||
|
@@ -55,7 +90,12 @@ jobs: | |
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: matrix.node-version <= 10 | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@7 | ||
- name: Update npm to latest | ||
if: matrix.node-version > 10 | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,16 @@ name: "CodeQL" | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
- latest | ||
- release-next | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
branches: | ||
- main | ||
- latest | ||
- release-next | ||
schedule: | ||
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1 | ||
- cron: "0 3 * * 1" | ||
|
@@ -24,15 +30,17 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
language: [ javascript ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 | ||
- 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" | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
Oops, something went wrong.