Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
deps: @npmcli/template-oss@2.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Feb 9, 2022
1 parent 3c116fc commit 5e7b9f4
Show file tree
Hide file tree
Showing 12 changed files with 671 additions and 474 deletions.
11 changes: 11 additions & 0 deletions .commitlintrc.js
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']],
},
}
16 changes: 16 additions & 0 deletions .github/dependabot.yml
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"
23 changes: 23 additions & 0 deletions .github/workflows/audit.yml
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
28 changes: 18 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- main
- latest
schedule:
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
- cron: "0 2 * * 1"

jobs:
lint:
Expand All @@ -17,9 +20,8 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: npm
- run: npm i --prefer-online -g npm@latest
- run: npm ci
- run: npm i
- run: npm run lint

test:
Expand All @@ -32,12 +34,8 @@ jobs:
shell: bash
- os: macos-latest
shell: bash
- os: windows-latest
shell: bash
- os: windows-latest
shell: cmd
- os: windows-latest
shell: powershell
runs-on: ${{ matrix.platform.os }}
defaults:
run:
Expand All @@ -47,8 +45,18 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm i --prefer-online -g npm@latest
- run: npm ci
# 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'))
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
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i
- run: npm test --ignore-scripts
- run: npm ls -a
38 changes: 38 additions & 0 deletions .github/workflows/codeql-analysis.yml
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
31 changes: 31 additions & 0 deletions .github/workflows/post-dependabot.yml
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}}
27 changes: 27 additions & 0 deletions .github/workflows/pull-request.yml
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
25 changes: 25 additions & 0 deletions .github/workflows/release-please.yml
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}]
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
/*

# keep these
!/.commitlintrc.js
!/.npmrc
!/.eslintrc*
!/.github
!**/.gitignore
!/package.json
!/package-lock.json
!/docs
!/bin
!/lib
Expand Down
3 changes: 3 additions & 0 deletions .npmrc
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.

package-lock=false
Loading

0 comments on commit 5e7b9f4

Please sign in to comment.