-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: @npmcli/template-oss@2.7.1 (#39)
BREAKING CHANGE: this drops support for node10 and non-LTS versions of node12 and node14. * chore: linting * chore: set git user email and name in all tests Co-authored-by: Luke Karrys <luke@lukekarrys.com>
- Loading branch information
1 parent
f283490
commit 2f4154a
Showing
37 changed files
with
450 additions
and
12,786 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
// If you change rules be sure to also update release-please.yml | ||
rules: { | ||
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'chore', 'deps']], | ||
'header-max-length': [2, 'always', 80], | ||
'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']], | ||
}, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
const { readdirSync: readdir } = require('fs') | ||
|
||
const localConfigs = readdir(__dirname) | ||
.filter((file) => file.startsWith('.eslintrc.local.')) | ||
.map((file) => `./${file}`) | ||
|
||
module.exports = { | ||
extends: [ | ||
'@npmcli', | ||
...localConfigs, | ||
], | ||
} |
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* @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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: Bug | ||
description: File a bug/issue | ||
title: "[BUG] <title>" | ||
labels: [Bug, Needs Triage] | ||
body: | ||
- type: checkboxes | ||
attributes: | ||
label: Is there an existing issue for this? | ||
description: Please [search here](./issues) to see if an issue already exists for your problem. | ||
options: | ||
- label: I have searched the existing issues | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Current Behavior | ||
description: A clear & concise description of what you're experiencing. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Expected Behavior | ||
description: A clear & concise description of what you expected to happen. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Steps To Reproduce | ||
description: Steps to reproduce the behavior. | ||
value: | | ||
1. In this environment... | ||
2. With this config... | ||
3. Run '...' | ||
4. See error... | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Environment | ||
description: | | ||
examples: | ||
- **npm**: 7.6.3 | ||
- **Node**: 13.14.0 | ||
- **OS**: Ubuntu 20.04 | ||
- **platform**: Macbook Pro | ||
value: | | ||
- npm: | ||
- Node: | ||
- OS: | ||
- platform: | ||
validations: | ||
required: false | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
blank_issues_enabled: true |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# 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" |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: Audit | ||
|
||
on: | ||
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 | ||
with: | ||
node-version: '16' | ||
- name: Install deps | ||
run: npm i --package-lock | ||
- name: Audit | ||
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 |
---|---|---|
@@ -1,84 +1,48 @@ | ||
--- | ||
################################################################################ | ||
# Template - Node CI | ||
# | ||
# Description: | ||
# This contains the basic information to: install dependencies, run tests, | ||
# get coverage, and run linting on a nodejs project. This template will run | ||
# over the MxN matrix of all operating systems, and all current LTS versions | ||
# of NodeJS. | ||
# | ||
# Dependencies: | ||
# This template assumes that your project is using the `tap` module for | ||
# testing. If you're not using this module, then the step that runs your | ||
# coverage will need to be adjusted. | ||
# | ||
################################################################################ | ||
name: Node CI | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
on: [push, pull_request] | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- latest | ||
schedule: | ||
# "At 02:00 on Monday" https://crontab.guru/#0_1_*_*_1 | ||
- cron: "0 2 * * 1" | ||
|
||
jobs: | ||
build: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- run: npm i --prefer-online -g npm@latest | ||
- run: npm i | ||
- run: npm run lint | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [10.x, 12.x, 14.x, 16.x] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] | ||
platform: | ||
- os: ubuntu-latest | ||
shell: bash | ||
- os: macos-latest | ||
shell: bash | ||
runs-on: ${{ matrix.platform.os }} | ||
defaults: | ||
run: | ||
shell: ${{ matrix.platform.shell }} | ||
steps: | ||
# Checkout the repository | ||
- uses: actions/checkout@v2 | ||
# Installs the specific version of Node.js | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
################################################################################ | ||
# Install Dependencies | ||
# | ||
# ASSUMPTIONS: | ||
# - The project has a package-lock.json file | ||
# | ||
# Simply run the tests for the project. | ||
################################################################################ | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
################################################################################ | ||
# Run Testing | ||
# | ||
# ASSUMPTIONS: | ||
# - The project has `tap` as a devDependency | ||
# - There is a script called "test" in the package.json | ||
# | ||
# Simply run the tests for the project. | ||
################################################################################ | ||
|
||
- name: Run tests | ||
run: | | ||
git config --global user.email "you@example.com" | ||
git config --global user.name "Your Name" | ||
npm test -- --no-coverage --timeout 60 | ||
################################################################################ | ||
# Run coverage check | ||
# | ||
# ASSUMPTIONS: | ||
# - The project has `tap` as a devDependency | ||
# - There is a script called "coverage" in the package.json | ||
# | ||
# Coverage should only be posted once, we are choosing the latest LTS of | ||
# node, and ubuntu as the matrix point to post coverage from. We limit | ||
# to the 'push' event so that coverage ins't posted twice from the | ||
# pull-request event, and push event (line 3). | ||
################################################################################ | ||
- name: Run coverage report | ||
if: github.event_name == 'push' && matrix.node-version == '12.x' && matrix.os == 'ubuntu-latest' | ||
run: npm test | ||
env: | ||
# The environment variable name is leveraged by `tap` | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
- run: npm i --prefer-online -g npm@latest | ||
- run: npm i | ||
- run: npm test --ignore-scripts |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1 | ||
- cron: "0 3 * * 1" | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
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 |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: "Post Dependabot Actions" | ||
on: pull_request | ||
|
||
jobs: | ||
Install: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1.1.1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: npm install and commit | ||
if: ${{contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --local user.email "ops+npm-cli@npmjs.com" | ||
git config --local user.name "npm cli ops bot" | ||
gh pr checkout ${{ github.event.pull_request.number }} | ||
npm install | ||
git add . | ||
git commit -am "chore: postinstall for dependabot template-oss PR" | ||
git push origin ${{github.ref_name}} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: Pull Request Linting | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
|
||
jobs: | ||
check: | ||
name: Check PR Title or Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Install deps | ||
run: | | ||
npm i -D @commitlint/cli @commitlint/config-conventional | ||
- name: Check commits OR PR title | ||
env: | ||
PR_TITLE: ${{ github.event.pull_request.title }} | ||
run: | | ||
npx commitlint -x @commitlint/config-conventional -V --from origin/main --to ${{ github.event.pull_request.head.sha }} || echo $PR_TITLE | npx commitlint -x @commitlint/config-conventional -V |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: Release Please | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v2 | ||
id: release | ||
with: | ||
package-name: conventional-test | ||
release-type: node | ||
# If you change changelog-types be sure to also update commitlintrc.js | ||
changelog-types: > | ||
[{"type":"feat","section":"Features","hidden":false}, | ||
{"type":"fix","section":"Bug Fixes","hidden":false}, | ||
{"type":"docs","section":"Documentation","hidden":false}, | ||
{"type":"deps","section":"Dependencies","hidden":false}, | ||
{"type":"chore","hidden":true}] |
Oops, something went wrong.