Skip to content

Commit 0730e5f

Browse files
committed
Merge branch 'ts-and-esm-refactor-db-module' into refactor-proxy-module-ts-and-esm
2 parents 9c81ae3 + 7b67b00 commit 0730e5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+10075
-1506
lines changed

.eslintrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@
1515
"prettier",
1616
"plugin:json/recommended"
1717
],
18-
"overrides": [],
18+
"overrides": [
19+
{
20+
"files": ["test/**/*.js", "**/*.json"],
21+
"parser": "espree",
22+
"rules": {
23+
"@typescript-eslint/no-unused-expressions": "off"
24+
}
25+
}
26+
],
1927
"parserOptions": {
28+
"project": "./tsconfig.json",
2029
"requireConfigFile": false,
2130
"ecmaVersion": 12,
2231
"sourceType": "module",

.github/workflows/ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@ jobs:
2323
mongodb-version: [4.4]
2424

2525
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
28+
with:
29+
egress-policy: audit
30+
2631
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2732
with:
2833
fetch-depth: 0
2934

3035
- name: Use Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v4
36+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
3237
with:
3338
node-version: ${{ matrix.node-version }}
3439

3540
- name: Start MongoDB
36-
uses: supercharge/mongodb-github-action@1.11.0
41+
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
3742
with:
3843
mongodb-version: ${{ matrix.mongodb-version }}
3944

@@ -47,7 +52,7 @@ jobs:
4752
npm run test-coverage-ci --workspaces --if-present
4853
4954
- name: Upload test coverage report
50-
uses: codecov/codecov-action@v5.1.2
55+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
5156
with:
5257
files: ./coverage/lcov.info
5358
token: ${{ secrets.CODECOV_TOKEN }}
@@ -59,20 +64,20 @@ jobs:
5964
run: npm run build
6065

6166
- name: Save build folder
62-
uses: actions/upload-artifact@v4
67+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
6368
with:
6469
name: build
6570
if-no-files-found: error
6671
path: build
6772

6873
- name: Download the build folders
69-
uses: actions/download-artifact@v4
74+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4
7075
with:
7176
name: build
7277
path: build
7378

7479
- name: Run cypress test
75-
uses: cypress-io/github-action@v6
80+
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
7681
with:
7782
start: npm start &
7883
wait-on: "http://localhost:3000"

.github/workflows/codeql.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
schedule:
2020
- cron: '25 10 * * 1'
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
analyze:
2427
name: Analyze
@@ -47,12 +50,17 @@ jobs:
4750
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
4851

4952
steps:
53+
- name: Harden Runner
54+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2
55+
with:
56+
egress-policy: audit
57+
5058
- name: Checkout repository
51-
uses: actions/checkout@v4
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
5260

5361
# Initializes the CodeQL tools for scanning.
5462
- name: Initialize CodeQL
55-
uses: github/codeql-action/init@v3
63+
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3
5664
with:
5765
languages: ${{ matrix.language }}
5866
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -66,7 +74,7 @@ jobs:
6674
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6775
# If this step fails, then you should remove it and run the build manually (see below)
6876
- name: Autobuild
69-
uses: github/codeql-action/autobuild@v3
77+
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3
7078

7179
# ℹ️ Command-line programs to run using the OS shell.
7280
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -79,6 +87,6 @@ jobs:
7987
# ./location_of_script_within_repo/buildscript.sh
8088

8189
- name: Perform CodeQL Analysis
82-
uses: github/codeql-action/analyze@v3
90+
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3
8391
with:
8492
category: "/language:${{matrix.language}}"

.github/workflows/dependency-review.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ jobs:
99
dependency-review:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Harden Runner
13+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2
14+
with:
15+
egress-policy: audit
16+
1217
- name: 'Checkout Repository'
13-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1419
- name: Dependency Review
15-
uses: actions/dependency-review-action@v4
20+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4
1621
with:
1722
comment-summary-in-pr: always
1823
fail-on-severity: high
19-
allow-licenses: MIT, Apache-2.0, BSD-3-Clause, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, Zlib
24+
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, Zlib
2025
fail-on-scopes: development, runtime
2126
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'

.github/workflows/experimental-inventory-ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@ jobs:
2323
mongodb-version: [4.4]
2424

2525
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
28+
with:
29+
egress-policy: audit
30+
2631
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2732
with:
2833
fetch-depth: 0
2934

3035
- name: Use Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v4
36+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
3237
with:
3338
node-version: ${{ matrix.node-version }}
3439

3540
- name: Start MongoDB
36-
uses: supercharge/mongodb-github-action@1.11.0
41+
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
3742
with:
3843
mongodb-version: ${{ matrix.mongodb-version }}
3944

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: experimental-inventory-cli - Publish to NPM
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'release version without v prefix'
7+
required: true
8+
type: string
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Harden Runner
17+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
18+
with:
19+
egress-policy: audit
20+
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22+
23+
# Setup .npmrc file to publish to npm
24+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
25+
with:
26+
node-version: '22.x'
27+
registry-url: 'https://registry.npmjs.org'
28+
29+
- name: check version matches input
30+
run: |
31+
grep "\"version\": \"${{ github.event.inputs.version }}\"," package.json
32+
working-directory: ./experimental/li-cli
33+
34+
- run: npm ci
35+
working-directory: ./experimental/li-cli
36+
37+
- run: npm run build
38+
working-directory: ./experimental/li-cli
39+
40+
- run: npm publish --access=public
41+
working-directory: ./experimental/li-cli
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/experimental-inventory-publish.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
11
name: experimental-inventory - Publish to NPM
22
on:
3-
push:
4-
tags:
5-
- 'license-inventory-*'
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'release version without v prefix'
7+
required: true
8+
type: string
9+
permissions:
10+
contents: read
11+
612
jobs:
713
build:
814
runs-on: ubuntu-latest
915
steps:
16+
- name: Harden Runner
17+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
18+
with:
19+
egress-policy: audit
20+
1021
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1122

1223
# Setup .npmrc file to publish to npm
13-
- uses: actions/setup-node@v4
24+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
1425
with:
15-
node-version: '18.x'
26+
node-version: '22.x'
1627
registry-url: 'https://registry.npmjs.org'
1728

29+
- name: check version matches input
30+
run: |
31+
grep "\"version\": \"${{ github.event.inputs.version }}\"," package.json
32+
working-directory: ./experimental/license-inventory
33+
1834
- run: npm ci
1935
working-directory: ./experimental/license-inventory
2036

.github/workflows/lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@ on: [pull_request]
55
env: # environment variables (available in any part of the action)
66
NODE_VERSION: 18
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
linting:
1013
name: Linting
1114
runs-on: ubuntu-latest
1215
steps: # list of steps
16+
- name: Harden Runner
17+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2
18+
with:
19+
egress-policy: audit
20+
1321
- name: Install NodeJS
14-
uses: actions/setup-node@v4
22+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
1523
with:
1624
node-version: ${{ env.NODE_VERSION }}
1725

.github/workflows/npm.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@ name: Publish to NPM
22
on:
33
release:
44
types: [published]
5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710
runs-on: ubuntu-latest
811
steps:
12+
- name: Harden Runner
13+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
14+
with:
15+
egress-policy: audit
16+
917
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1018
# Setup .npmrc file to publish to npm
11-
- uses: actions/setup-node@v4
19+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
1220
with:
1321
node-version: '18.x'
1422
registry-url: 'https://registry.npmjs.org'

.github/workflows/pr-lint.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ jobs:
2121
name: Validate & Label PR
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: amannn/action-semantic-pull-request@v5
24+
- name: Harden Runner
25+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
26+
with:
27+
egress-policy: audit
28+
29+
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2732
with:
@@ -39,6 +44,6 @@ jobs:
3944
revert
4045
test
4146
break
42-
- uses: release-drafter/release-drafter@v6
47+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6
4348
env:
4449
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)