Skip to content

Commit

Permalink
Chore/up node (#304)
Browse files Browse the repository at this point in the history
* Up build system to cover current Node versions

* Disable prettier on one line that varies by node version
  • Loading branch information
mrseanryan authored May 24, 2024
1 parent 4253e7f commit 90e7217
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node.js.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
strategy:
# using matrix here as env variables did not work
matrix:
# use node 14 because 16+ uses package-lock.json version 2
node-version: [14.x]
# use node 20 as is longer term (note: 16+ uses package-lock.json version 2)
node-version: [20.x]
# use the usual TypeScript version, slightly older for more compatibility
typescript-version: [4.0.5]
steps:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [10.x, 12.x, 14.x, 16.x, 18.x]
# TODO - add 20.x when it is released
node_version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x]
typescript_version: [4]
# To avoid too many builds, only test for extra TypeScript versions, for a subset of the Node versions:
# use node 20 as is longer term
include:
- node_version: 14.x
typescript_version: 3
# the 'deploy' config, with deliberately older TypeScript version:
- node_version: 14.x
- node_version: 20.x
typescript_version: 4.0.5
- node_version: 16.x
# the 'deploy' config, with deliberately older TypeScript version:
- node_version: 20.x
typescript_version: 3
- node_version: 22.x
typescript_version: 3
steps:
- uses: actions/checkout@v3
Expand All @@ -45,5 +45,5 @@ jobs:
- run: npm install --development typescript@${{ matrix.typescript_version }}
- run: npm test
# - name: Report Code Coverage
# if: matrix.node_version == '16.x' && matrix.typescript_version == 4
# if: matrix.node_version == '20.x' && matrix.typescript_version == 4
# run: npm run report-coverage-to-coveralls
5 changes: 4 additions & 1 deletion src/parser/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ export const extractExportNames = (path: string, node: ts.Node): string[] => {
switch (node.kind) {
case ts.SyntaxKind.VariableStatement:
return parseExportNames(
(node as ts.VariableStatement).declarationList.declarations[0].name.getText(),
// prettier-ignore
(
node as ts.VariableStatement
).declarationList.declarations[0].name.getText(),
);
case ts.SyntaxKind.FunctionDeclaration:
const { name } = node as ts.FunctionDeclaration;
Expand Down

0 comments on commit 90e7217

Please sign in to comment.