Skip to content

Commit 0c60330

Browse files
authored
Merge branch 'main' into garethgeorge/typed
2 parents 5265cb6 + 73ffcbd commit 0c60330

66 files changed

Lines changed: 1655 additions & 119 deletions

Some content is hidden

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Note: Before submitting a pull request, please open an issue for discussion if y
1010
- [ ] **Lint** pass: `npm run lint` (see [Style](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/CONTRIBUTING.md#style))
1111
- [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones)
1212
- [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones)
13+
- [ ] This pull request is from a branch created directly off of `GoogleCloudPlatform/nodejs-docs-samples`. Not a fork.
1314
- [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/CODEOWNERS) with the codeowners for this sample
1415
- [ ] This sample adds a new sample directory, and I created [GitHub Actions workflow](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/CONTRIBUTING.md#adding-new-samples) for this sample
1516
- [ ] This sample adds a new **Product API**, and I updated the [Blunderbuss issue/PR auto-assigner](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/.github/blunderbuss.yml) with the codeowners for this sample

.kokoro/run/websockets.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ env_vars: {
1616
# Override common.cfg to include puppeteer
1717
env_vars: {
1818
key: "TRAMPOLINE_IMAGE"
19-
value: "gcr.io/cloud-devrel-kokoro-resources/node:14-puppeteer"
19+
value: "gcr.io/cloud-devrel-kokoro-resources/node:16-puppeteer"
2020
}

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ Console](https://console.cloud.google.com/apis/library).
3232
## Adding new samples
3333

3434
All samples must have tests. We use `mocha` as testing framework. The
35-
package.json file within your sample directory must contain a test script that
35+
`package.json` file within your sample directory must contain a test script that
3636
executes the `mocha` tests via `npm test`
3737
([example](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/batch/package.json#L13)).
3838

3939
For new samples, a GitHub Actions workflow should be created to run your tests
4040
on the CI system:
4141

42+
1. Check that your new samples and sample tests are on a branch created directly from this repo `GoogleCloudPlatform/nodejs-docs-samples`. Not a fork.
43+
4244
1. Add an entry to
4345
[.github/workflows/utils/workflows.json](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/.github/workflows/utils/workflows.json)
4446
matching the directory with your sample code.

cloud-sql/mysql/mysql2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"test": "npm run system-test && npm run system-test-tcp && npm run system-test-unix"
2020
},
2121
"dependencies": {
22-
"@google-cloud/cloud-sql-connector": "^0.4.0",
22+
"@google-cloud/cloud-sql-connector": "^0.5.0",
2323
"@google-cloud/functions-framework": "^3.0.0",
2424
"@google-cloud/logging-winston": "^5.0.0",
2525
"@google-cloud/secret-manager": "^4.0.0",

cloud-sql/postgres/knex/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"test": "c8 mocha test/*.test.js --timeout=60000 --exit"
1919
},
2020
"dependencies": {
21-
"@google-cloud/cloud-sql-connector": "^0.4.0",
21+
"@google-cloud/cloud-sql-connector": "^0.5.0",
2222
"@google-cloud/functions-framework": "^3.0.0",
2323
"@google-cloud/logging-winston": "^5.0.0",
2424
"@google-cloud/secret-manager": "^4.0.0",
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Use the official lightweight Node.js image.
16+
17+
# https://hub.docker.com/_/node
18+
FROM node:18-slim
19+
20+
# Create and change to the app directory.
21+
WORKDIR /app
22+
23+
# Copy application dependency manifests to the container image.
24+
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
25+
# Copying this separately prevents re-running npm install on every code change.
26+
COPY package*.json ./
27+
28+
# Install dependencies.
29+
# If you add a package-lock.json speed your build by switching to 'npm ci'.
30+
# RUN npm ci --only=production
31+
RUN npm install --production
32+
33+
# Copy local code to the container image.
34+
COPY . ./
35+
36+
# Run the web service on container startup.
37+
CMD [ "npm", "start" ]

0 commit comments

Comments
 (0)