Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: make node 18 the minimum version #2562

Merged
merged 19 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ branchProtectionRules:
- "ci/kokoro: System test"
- docs
- lint
- test (14)
- test (16)
- test (18)
- test (20)
- cla/google
- windows
- OwlBot Post Processor
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18, 20]
node: [18, 20, 22]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- run: npm install --engine-strict
- run: npm test
env:
Expand All @@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm run lint
docs:
Expand All @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm run docs
- uses: JustinBeckwith/linkinator-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: node --version
- run: npm install
- run: npm run conformance-test
2 changes: 1 addition & 1 deletion .kokoro/common.cfg

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

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

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

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

File renamed without changes.
2 changes: 1 addition & 1 deletion .kokoro/release/docs-devsite.cfg

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

2 changes: 1 addition & 1 deletion .kokoro/release/docs.cfg

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

2 changes: 1 addition & 1 deletion .kokoro/release/publish.cfg

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

2 changes: 1 addition & 1 deletion .kokoro/samples-test.sh

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

2 changes: 1 addition & 1 deletion .kokoro/system-test.sh

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

2 changes: 1 addition & 1 deletion .kokoro/test.sh

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

24 changes: 12 additions & 12 deletions conformance-test/conformanceCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ interface ConformanceTestResult {

type LibraryMethodsModuleType = typeof import('./libraryMethods');
const methodMap: Map<String, String[]> = new Map(
Object.entries(jsonToNodeApiMapping)
Object.entries(jsonToNodeApiMapping),
);

const DURATION_SECONDS = 600; // 10 mins.
Expand Down Expand Up @@ -94,36 +94,36 @@ export function executeScenario(testCase: RetryTestCase) {
});
creationResult = await createTestBenchRetryTest(
instructionSet.instructions,
jsonMethod?.name.toString()
jsonMethod?.name.toString(),
);
if (storageMethodString.includes('InstancePrecondition')) {
bucket = await createBucketForTest(
storage,
testCase.preconditionProvided,
storageMethodString
storageMethodString,
);
file = await createFileForTest(
testCase.preconditionProvided,
storageMethodString,
bucket
bucket,
);
} else {
bucket = await createBucketForTest(
storage,
false,
storageMethodString
storageMethodString,
);
file = await createFileForTest(
false,
storageMethodString,
bucket
bucket,
);
}
notification = bucket.notification(`${TESTS_PREFIX}`);
await notification.create();

[hmacKey] = await storage.createHmacKey(
`${TESTS_PREFIX}@email.com`
`${TESTS_PREFIX}@email.com`,
);

storage.interceptors.push({
Expand Down Expand Up @@ -154,7 +154,7 @@ export function executeScenario(testCase: RetryTestCase) {
await assert.rejects(storageMethodObject(methodParameters));
}
const testBenchResult = await getTestBenchRetryTest(
creationResult.id
creationResult.id,
);
assert.strictEqual(testBenchResult.completed, true);
}).timeout(TIMEOUT_FOR_INDIVIDUAL_TEST);
Expand All @@ -167,7 +167,7 @@ export function executeScenario(testCase: RetryTestCase) {
async function createBucketForTest(
storage: Storage,
preconditionShouldBeOnInstance: boolean,
storageMethodString: String
storageMethodString: String,
) {
const name = generateName(storageMethodString, 'bucket');
const bucket = storage.bucket(name);
Expand All @@ -187,7 +187,7 @@ async function createBucketForTest(
async function createFileForTest(
preconditionShouldBeOnInstance: boolean,
storageMethodString: String,
bucket: Bucket
bucket: Bucket,
) {
const name = generateName(storageMethodString, 'file');
const file = bucket.file(name);
Expand All @@ -209,7 +209,7 @@ function generateName(storageMethodString: String, bucketOrFile: string) {

async function createTestBenchRetryTest(
instructions: String[],
methodName: string
methodName: string,
): Promise<ConformanceTestCreationResult> {
const requestBody = {instructions: {[methodName]: instructions}};
const response = await fetch(`${TESTBENCH_HOST}retry_test`, {
Expand All @@ -221,7 +221,7 @@ async function createTestBenchRetryTest(
}

async function getTestBenchRetryTest(
testId: string
testId: string,
): Promise<ConformanceTestResult> {
const response = await fetch(`${TESTBENCH_HOST}retry_test/${testId}`, {
method: 'GET',
Expand Down
2 changes: 1 addition & 1 deletion conformance-test/globalHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function mochaGlobalSetup(this: any) {
await getTestBenchDockerImage();
await runTestBenchDockerImage();
await new Promise(resolve =>
setTimeout(resolve, TIME_TO_WAIT_FOR_CONTAINER_READY)
setTimeout(resolve, TIME_TO_WAIT_FOR_CONTAINER_READY),
);
}

Expand Down
Loading
Loading