Skip to content

Commit

Permalink
Update to Typescript 5.1, drop Node 16 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlansley authored Jul 5, 2023
1 parent 3d77ce4 commit 43e50fb
Show file tree
Hide file tree
Showing 11 changed files with 800 additions and 763 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/check-pr-reviews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check Pull Request Reviews

on:
pull_request_review:
types: [submitted]

jobs:
checkPrReviews:
runs-on: ubuntu-latest
name: Check PR Reviews
strategy:
matrix:
node-version: [18.x]
steps:
- name: Perform Check of PR Reviews
uses: checkdigit/github-actions/check-pr-reviews@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches:
- 'main'

env:
CI: true

jobs:
pullRequestBuild:
name: Pull Request Build
Expand All @@ -23,7 +20,9 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Compile
run: npm run ci:compile
- name: Check Code Style
Expand All @@ -49,7 +48,9 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Compile
run: npm run ci:compile
- name: Check Code Style
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
analyze:
name: Analyze
name: CodeQL analysis
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ on:
branches:
- 'main'

env:
CI: true
NODE_OPTIONS: --experimental-vm-modules

jobs:
comment:
publishBeta:
runs-on: ubuntu-latest
name: Publish Beta
strategy:
matrix:
node-version: [18.x]
Expand All @@ -23,13 +20,23 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Run Test
run: npm test
- name: perform beta publish
uses: checkdigit/github-actions/publish-beta@main
run: npm run test
- name: Prepare Beta
id: prepare-beta
uses: checkdigit/github-actions/prepare-beta@main
- name: Publish Beta
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH }}
- name: Comment
uses: checkdigit/github-actions/comment-npm-publish@main
with:
betaPackage: ${{ steps.prepare-beta.outputs.betaPackage }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
name: Publish to NPM
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Run Test
run: npm run test
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This module contains the standard Check Digit Typescript configuration, along wi

### Typescript Configuration

- currently requires Node 16 or above.
- currently requires Node 18 or above.
- emits `esnext`, with the default libraries, to avoid down-leveling. It is intended that application spec tests pick
up any issues with using newer features unavailable in a particular environment. Browsers and NodeJS are fast moving
targets, and can add language features at any time.
Expand All @@ -19,7 +19,7 @@ This module contains the standard Check Digit Typescript configuration, along wi

### Builder

`builder` is a command line tool that generates either commonjs or esm modules, from Typescript source. It is intended
`builder` is a command line tool that generates either CommonJS or ESM modules, from Typescript source. It is intended
to be used when publishing a package to NPM, or to bundle a package for deployment. It uses `tsc` for generating
types, and `esbuild` for generating code.

Expand Down
Loading

0 comments on commit 43e50fb

Please sign in to comment.