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!: upgrade to node 18 #627

Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b8252a1
chore: ensure we are upgrading to the latest version of image to avoi…
gcf-owl-bot[bot] Oct 4, 2024
1e7a173
Merge branch 'main' into owl-bot-update-lock-54d3915b7c06c51f4339072d…
sofisl Nov 4, 2024
a17d36c
chore: complete migrating to node 18
sofisl Nov 8, 2024
de6b2d0
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Nov 8, 2024
032da76
update all dependencies to newest version
sofisl Nov 8, 2024
c08a4e6
Merge branch 'owl-bot-update-lock-54d3915b7c06c51f4339072d9ae9ddec43f…
sofisl Nov 8, 2024
bd03d16
add any typings
sofisl Nov 12, 2024
4d75b30
fix broken test
sofisl Nov 12, 2024
6feb71d
Update samples-test.sh
sofisl Nov 12, 2024
a84f415
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Nov 12, 2024
362d21a
Update samples-test.sh
sofisl Nov 12, 2024
6170f9e
Update owlbot.py
sofisl Nov 12, 2024
9b6a68b
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Nov 12, 2024
845266a
Merge branch 'owl-bot-update-lock-54d3915b7c06c51f4339072d9ae9ddec43f…
gcf-owl-bot[bot] Nov 12, 2024
cbdc877
Update owlbot.py
sofisl Nov 12, 2024
c4f05a9
Update samples-test.sh
sofisl Nov 12, 2024
9673139
Update samples-test.sh
sofisl Nov 12, 2024
facc6f7
Update samples-test.sh
sofisl Nov 12, 2024
b8ecf14
Update samples-test.sh
sofisl Nov 12, 2024
2f4d73e
Update samples-test.sh
sofisl Nov 12, 2024
706989c
Update samples-test.sh
sofisl Nov 12, 2024
ee42194
Update samples-test.sh
sofisl Nov 12, 2024
1c61f32
Update samples-test.sh
sofisl Nov 13, 2024
d51949f
Update package.json
sofisl Nov 13, 2024
499535c
Update package.json
sofisl Nov 13, 2024
a0c0bf1
Update samples-test.sh
sofisl Nov 13, 2024
314127a
Update package.json
sofisl Nov 13, 2024
0e49b9f
Update .OwlBot.lock.yaml
sofisl Nov 22, 2024
f47b9a6
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Nov 22, 2024
ed7f645
Update .OwlBot.lock.yaml
sofisl Dec 11, 2024
668cd8e
update samples test
sofisl Dec 11, 2024
5e9bd38
Merge branch 'owl-bot-update-lock-54d3915b7c06c51f4339072d9ae9ddec43f…
sofisl Dec 11, 2024
9224b47
run lint
sofisl Dec 11, 2024
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
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
digest: sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429
# created: 2024-10-01T19:34:30.797530443Z
digest: sha256:54d3915b7c06c51f4339072d9ae9ddec43fe3197d5dd45122ca6ab7a02168765
# created: 2024-10-04T20:16:11.598831243Z
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ body:
description: >
Screenshots can be provided in the issue body below.
placeholder: |
1. Start the application in development (run `npm run start`)
2. Click X
3. Y will happen
validations:
Expand Down
56 changes: 56 additions & 0 deletions .github/scripts/close-invalid-link.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

async function closeIssue(github, owner, repo, number) {
await github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: number,
body: 'Issue was opened with an invalid reproduction link. Please make sure the repository is a valid, publicly-accessible github repository, and make sure the url is complete (example: https://github.com/googleapis/google-cloud-node)'
});
await github.rest.issues.update({
owner: owner,
repo: repo,
issue_number: number,
state: 'closed'
});
}
module.exports = async ({github, context}) => {
const owner = context.repo.owner;
const repo = context.repo.repo;
const number = context.issue.number;

const issue = await github.rest.issues.get({
owner: owner,
repo: repo,
issue_number: number,
});

const isBugTemplate = issue.data.body.includes('Link to the code that reproduces this issue');

if (isBugTemplate) {
console.log(`Issue ${number} is a bug template`)
try {
const link = issue.data.body.split('\n')[18].match(/(https?:\/\/(gist\.)?github.com\/.*)/)[0];
console.log(`Issue ${number} contains this link: ${link}`)
const isValidLink = (await fetch(link)).ok;
console.log(`Issue ${number} has a ${isValidLink ? 'valid' : 'invalid'} link`)
if (!isValidLink) {
await closeIssue(github, owner, repo, number);
}
} catch (err) {
await closeIssue(github, owner, repo, number);
}
}
};
4 changes: 2 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ branchProtectionRules:
- "ci/kokoro: Samples test"
- "ci/kokoro: System test"
- lint
- test (14)
- test (16)
- test (18)
- test (20)
- test (22)
- cla/google
- windows
- OwlBot Post Processor
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ 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
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: node --version
Expand All @@ -29,30 +29,30 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install --engine-strict
- run: npm test
env:
MOCHA_THROW_DEPRECATION: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm run lint
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm run docs
- uses: JustinBeckwith/linkinator-action@v1
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/issues-no-repro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: invalid_link
on:
issues:
types: [opened, reopened]

jobs:
close:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
const script = require('./.github/scripts/close-invalid-link.cjs')
await script({github, context})
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.

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/docs.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/release/publish.cfg

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

6 changes: 5 additions & 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.bat

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.

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

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

2 changes: 1 addition & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

common_templates = gcp.CommonTemplates()
templates = common_templates.node_library()
s.copy(sources=templates, excludes=[".github/ISSUE_TEMPLATE", ".github/scripts", ".github/workflows/issues-no-repro.yaml"])
s.copy(sources=templates, excludes=[".github/ISSUE_TEMPLATE", ".github/scripts", ".github/workflows/issues-no-repro.yaml", ".kokoro/samples-test.sh"])
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,36 @@
"author": "Google LLC",
"license": "Apache-2.0",
"dependencies": {
"gaxios": "^6.1.1",
"json-bigint": "^1.0.0"
"json-bigint": "^1.0.0",
"gaxios": "^6.7.1"
},
"devDependencies": {
"@google-cloud/functions": "^3.0.0",
"@types/json-bigint": "^1.0.0",
"@types/mocha": "^9.0.0",
"@types/ncp": "^2.0.1",
"@types/node": "^20.0.0",
"@types/sinon": "^17.0.0",
"@types/tmp": "0.2.6",
"@types/uuid": "^9.0.0",
"c8": "^9.0.0",
"@google-cloud/functions": "^3.6.0",
"@types/json-bigint": "^1.0.4",
"@types/mocha": "^10.0.9",
"@types/ncp": "^2.0.8",
"@types/node": "^22.9.0",
"@types/sinon": "^17.0.3",
"@types/tmp": "^0.2.6",
"@types/uuid": "^10.0.0",
"c8": "^10.1.2",
"cross-env": "^7.0.3",
"gcbuild": "^1.3.4",
"gcbuild": "^1.3.39",
"gcx": "^1.0.0",
"gts": "^5.0.0",
"linkinator": "^3.0.0",
"jsdoc": "^4.0.0",
"gts": "^6.0.2",
"jsdoc": "^4.0.4",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"mocha": "^8.0.0",
"linkinator": "^6.1.2",
"mocha": "^10.8.2",
"ncp": "^2.0.0",
"nock": "^13.0.0",
"sinon": "^17.0.0",
"tmp": "^0.2.0",
"typescript": "^5.1.6",
"uuid": "^9.0.0"
"nock": "^13.5.5",
"sinon": "^19.0.2",
"tmp": "^0.2.3",
"typescript": "^5.6.3",
"uuid": "^11.0.2"
},
"engines": {
"node": ">=14"
"node": ">=18"
}
}
4 changes: 2 additions & 2 deletions samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"*.js"
Expand All @@ -20,4 +20,4 @@
"chai": "^4.2.0",
"mocha": "^8.0.0"
}
}
}
1 change: 1 addition & 0 deletions system-test/any.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '*';
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"include": [
"src/*.ts",
"test/*.ts",
"system-test/*.ts"
"system-test/*.ts",
"test/**/*.ts"
],
"exclude": [
"test/fixtures"
Expand Down