Skip to content

Commit

Permalink
feat(HII-9538): Use node 20 (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbash authored Jun 10, 2024
1 parent 0dae364 commit d225d3e
Show file tree
Hide file tree
Showing 60 changed files with 3,787 additions and 3,570 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
with:
fetch-depth: 0

- name: Install Node 16
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: .nvmrc
cache: npm
cache-dependency-path: '**/package-lock.json'

Expand All @@ -37,13 +37,6 @@ jobs:
distribution: temurin
java-version: 17

- name: Install Node 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
cache-dependency-path: '**/package-lock.json'

- name: Analyze with SonarCloud
uses: ./sonar-scanner
with:
Expand All @@ -55,10 +48,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install Node 16
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: .nvmrc
cache: npm
cache-dependency-path: '**/package-lock.json'

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ before running actions.

Development tools needed are:

* Latest Node 16 LTS release
* Latest Node 20 LTS release
* Docker
* Pre-commit

Expand Down
120 changes: 60 additions & 60 deletions binary-auth-attestation/dist/index.js

Large diffs are not rendered by default.

392 changes: 196 additions & 196 deletions cloud-deploy/dist/index.js

Large diffs are not rendered by default.

120 changes: 60 additions & 60 deletions cloud-run-traffic/dist/index.js

Large diffs are not rendered by default.

342 changes: 171 additions & 171 deletions cloud-run/dist/index.js

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions cloud-run/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cloud-run/test/wait-revision.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe('Wait for revision', () => {
clusterInput,
canarySpec,
10,
)).rejects.toEqual(new Error('Invalid JSON: Failed to load status for revision "xxxxxxx-00013-loc". Reason: Unexpected token E in JSON at position 0'));
)).rejects.toEqual(new Error('Invalid JSON: Failed to load status for revision "xxxxxxx-00013-loc". Reason: Unexpected token \'E\', "ERROR: No JSON" is not valid JSON'));
expect(exec.exec).toHaveBeenCalled();
});

Expand Down
96 changes: 48 additions & 48 deletions component-tests/dist/index.js

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions conventional-release/dist/index.js

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions conventional-version/dist/index.js

Large diffs are not rendered by default.

276 changes: 138 additions & 138 deletions customer-config/dist/index.js

Large diffs are not rendered by default.

130 changes: 65 additions & 65 deletions dataflow-deploy/dist/index.js

Large diffs are not rendered by default.

120 changes: 60 additions & 60 deletions dataflow-template-build/dist/index.js

Large diffs are not rendered by default.

124 changes: 62 additions & 62 deletions dora-metrics/dist/index.js

Large diffs are not rendered by default.

282 changes: 141 additions & 141 deletions external-events/dist/index.js

Large diffs are not rendered by default.

206 changes: 103 additions & 103 deletions gcp-secret-manager/dist/index.js

Large diffs are not rendered by default.

226 changes: 113 additions & 113 deletions iam-test-token/dist/index.js

Large diffs are not rendered by default.

334 changes: 167 additions & 167 deletions iam/dist/index.js

Large diffs are not rendered by default.

120 changes: 60 additions & 60 deletions identity-token/dist/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ module.exports = {
rootDir: process.cwd(),
testEnvironment: 'node',
maxWorkers: '50%',
setupFiles: ['./jest.setup.js'],
};
20 changes: 20 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const mock = { fs: jest.requireActual('fs') };

/**
* Calling require("mock-fs") will make jest
* return memfs.fs for further calls to require("fs")
*/
jest.mock('mock-fs', () => {
const memfs = jest.requireActual('memfs');

mock.fs = memfs.fs;

return Object.assign((volume = { }) => {
memfs.vol.reset();
memfs.vol.fromNestedJSON(volume);
memfs.vol.mkdirSync('.', { recursive: true });
memfs.vol.mkdirSync('/tmp', { recursive: true });
}, { restore: () => {} });
});

jest.mock('fs', () => mock.fs);
322 changes: 161 additions & 161 deletions jira-release/dist/index.js

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions jira-releasenotes/dist/index.js

Large diffs are not rendered by default.

302 changes: 151 additions & 151 deletions kubernetes/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion kubernetes/test/apply-kubectl.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const exec = require('@actions/exec');
const mockFs = require('mock-fs');
const exec = require('@actions/exec');
const applyKubectl = require('../src/apply-kubectl');

jest.mock('@actions/exec');
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/test/autoscale.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const exec = require('@actions/exec');
const mockFs = require('mock-fs');
const exec = require('@actions/exec');
const fs = require('fs');
const applyAutoscale = require('../src/autoscale');

Expand Down
2 changes: 1 addition & 1 deletion kubernetes/test/check-namespace-exists.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const mockFs = require('mock-fs');
const exec = require('@actions/exec');

jest.mock('@actions/exec');

const mockFs = require('mock-fs');
const checkNamespaceExists = require('../src/check-namespace-exists');

const mockOutput = (data, opts) => {
Expand Down
3 changes: 1 addition & 2 deletions kubernetes/test/check-number-of-pods-running.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const mockFs = require('mock-fs');
const exec = require('@actions/exec');

jest.mock('@actions/exec');

const mockFs = require('mock-fs');

const checkRequiredNumberOfPodsIsRunning = require('../src/check-number-of-pods-running');

const mockErrorOutput = (data, opts) => {
Expand Down
6 changes: 2 additions & 4 deletions kubernetes/test/create-base-kustomize.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
let fs = require('fs');

const mockFs = require('mock-fs');
const createBaseKustomize = require('../src/create-base-kustomize');
const fs = require('fs');

fs = require('fs');
const createBaseKustomize = require('../src/create-base-kustomize');

describe('Creates base kustomize yaml files', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/test/run-deploy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jest.mock('../../utils', () => ({
getImageDigest: jest.fn(),
}));

const exec = require('@actions/exec');
const mockFs = require('mock-fs');
const exec = require('@actions/exec');
const { getClusterInfo } = require('../../cloud-run/src/cluster-info');
const { setupGcloud } = require('../../setup-gcloud');
const patchDeployment = require('../src/patch-deployment-yaml');
Expand Down
266 changes: 133 additions & 133 deletions maven/dist/index.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions maven/test/mvn.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const mockFs = require('mock-fs');
const path = require('path');
let fs = require('fs');

const mockFs = require('mock-fs');

const os = require('os');

// Make sure we get a mocked FS.
Expand Down
216 changes: 108 additions & 108 deletions nexus-auth-npm/dist/index.js

Large diffs are not rendered by default.

248 changes: 124 additions & 124 deletions opa-policy-test/dist/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit d225d3e

Please sign in to comment.