Skip to content

Commit 1dc7657

Browse files
authored
chore!: make node 18 the minimum version (#2562)
* Adds support for the restore token feature * description fix * lint fix * upgrade to node 18 upgrade to node 18 * lint fix phase 1 lint fix phase 1 * lint fix phase 2 lint fix phase 2 * bug fix * test case error fix * test case error fix * chore: upgrade to Node 18 chore: upgrade to Node 18 * Removed unnecessary dependency. Removed unnecessary dependency.
1 parent 740d30d commit 1dc7657

File tree

162 files changed

+1553
-1507
lines changed

Some content is hidden

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

162 files changed

+1553
-1507
lines changed

Diff for: .github/sync-repo-settings.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ branchProtectionRules:
1414
- "ci/kokoro: System test"
1515
- docs
1616
- lint
17-
- test (14)
18-
- test (16)
1917
- test (18)
18+
- test (20)
2019
- cla/google
2120
- windows
2221
- OwlBot Post Processor

Diff for: .github/workflows/ci.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
node: [14, 16, 18, 20]
12+
node: [18, 20, 22]
1313
steps:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-node@v3
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/checkout@v3
3333
- uses: actions/setup-node@v3
3434
with:
35-
node-version: 14
35+
node-version: 18
3636
- run: npm install --engine-strict
3737
- run: npm test
3838
env:
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/checkout@v3
4444
- uses: actions/setup-node@v3
4545
with:
46-
node-version: 14
46+
node-version: 18
4747
- run: npm install
4848
- run: npm run lint
4949
docs:
@@ -52,7 +52,7 @@ jobs:
5252
- uses: actions/checkout@v3
5353
- uses: actions/setup-node@v3
5454
with:
55-
node-version: 14
55+
node-version: 18
5656
- run: npm install
5757
- run: npm run docs
5858
- uses: JustinBeckwith/linkinator-action@v1

Diff for: .github/workflows/conformance-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- uses: actions/setup-node@v4
1313
with:
14-
node-version: 14
14+
node-version: 18
1515
- run: node --version
1616
- run: npm install
1717
- run: npm run conformance-test

Diff for: .kokoro/common.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .kokoro/presubmit/node14/common.cfg renamed to .kokoro/continuous/node18/common.cfg

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .kokoro/continuous/node14/lint.cfg renamed to .kokoro/continuous/node18/lint.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

Diff for: .kokoro/continuous/node14/common.cfg renamed to .kokoro/presubmit/node18/common.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.

Diff for: .kokoro/release/docs-devsite.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .kokoro/release/docs.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .kokoro/release/publish.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .kokoro/samples-test.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .kokoro/system-test.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .kokoro/test.sh

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: conformance-test/conformanceCommon.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interface ConformanceTestResult {
5050

5151
type LibraryMethodsModuleType = typeof import('./libraryMethods');
5252
const methodMap: Map<String, String[]> = new Map(
53-
Object.entries(jsonToNodeApiMapping)
53+
Object.entries(jsonToNodeApiMapping),
5454
);
5555

5656
const DURATION_SECONDS = 600; // 10 mins.
@@ -94,36 +94,36 @@ export function executeScenario(testCase: RetryTestCase) {
9494
});
9595
creationResult = await createTestBenchRetryTest(
9696
instructionSet.instructions,
97-
jsonMethod?.name.toString()
97+
jsonMethod?.name.toString(),
9898
);
9999
if (storageMethodString.includes('InstancePrecondition')) {
100100
bucket = await createBucketForTest(
101101
storage,
102102
testCase.preconditionProvided,
103-
storageMethodString
103+
storageMethodString,
104104
);
105105
file = await createFileForTest(
106106
testCase.preconditionProvided,
107107
storageMethodString,
108-
bucket
108+
bucket,
109109
);
110110
} else {
111111
bucket = await createBucketForTest(
112112
storage,
113113
false,
114-
storageMethodString
114+
storageMethodString,
115115
);
116116
file = await createFileForTest(
117117
false,
118118
storageMethodString,
119-
bucket
119+
bucket,
120120
);
121121
}
122122
notification = bucket.notification(`${TESTS_PREFIX}`);
123123
await notification.create();
124124

125125
[hmacKey] = await storage.createHmacKey(
126-
`${TESTS_PREFIX}@email.com`
126+
`${TESTS_PREFIX}@email.com`,
127127
);
128128

129129
storage.interceptors.push({
@@ -154,7 +154,7 @@ export function executeScenario(testCase: RetryTestCase) {
154154
await assert.rejects(storageMethodObject(methodParameters));
155155
}
156156
const testBenchResult = await getTestBenchRetryTest(
157-
creationResult.id
157+
creationResult.id,
158158
);
159159
assert.strictEqual(testBenchResult.completed, true);
160160
}).timeout(TIMEOUT_FOR_INDIVIDUAL_TEST);
@@ -167,7 +167,7 @@ export function executeScenario(testCase: RetryTestCase) {
167167
async function createBucketForTest(
168168
storage: Storage,
169169
preconditionShouldBeOnInstance: boolean,
170-
storageMethodString: String
170+
storageMethodString: String,
171171
) {
172172
const name = generateName(storageMethodString, 'bucket');
173173
const bucket = storage.bucket(name);
@@ -187,7 +187,7 @@ async function createBucketForTest(
187187
async function createFileForTest(
188188
preconditionShouldBeOnInstance: boolean,
189189
storageMethodString: String,
190-
bucket: Bucket
190+
bucket: Bucket,
191191
) {
192192
const name = generateName(storageMethodString, 'file');
193193
const file = bucket.file(name);
@@ -209,7 +209,7 @@ function generateName(storageMethodString: String, bucketOrFile: string) {
209209

210210
async function createTestBenchRetryTest(
211211
instructions: String[],
212-
methodName: string
212+
methodName: string,
213213
): Promise<ConformanceTestCreationResult> {
214214
const requestBody = {instructions: {[methodName]: instructions}};
215215
const response = await fetch(`${TESTBENCH_HOST}retry_test`, {
@@ -221,7 +221,7 @@ async function createTestBenchRetryTest(
221221
}
222222

223223
async function getTestBenchRetryTest(
224-
testId: string
224+
testId: string,
225225
): Promise<ConformanceTestResult> {
226226
const response = await fetch(`${TESTBENCH_HOST}retry_test/${testId}`, {
227227
method: 'GET',

Diff for: conformance-test/globalHooks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function mochaGlobalSetup(this: any) {
2929
await getTestBenchDockerImage();
3030
await runTestBenchDockerImage();
3131
await new Promise(resolve =>
32-
setTimeout(resolve, TIME_TO_WAIT_FOR_CONTAINER_READY)
32+
setTimeout(resolve, TIME_TO_WAIT_FOR_CONTAINER_READY),
3333
);
3434
}
3535

0 commit comments

Comments
 (0)