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 14 #1517

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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:0527a86c10b67742c409dc726ba9a31ec4e69b0006e3d7a49b0e6686c59cdaa9
# created: 2023-05-24T20:32:43.844586914Z
digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430
# created: 2023-08-03T18:46:14.719706948Z
2 changes: 1 addition & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ branchProtectionRules:
- "ci/kokoro: System test"
- docs
- lint
- test (12)
- test (14)
- test (16)
- test (18)
- cla/google
- windows
- OwlBot Post Processor
Expand Down
10 changes: 5 additions & 5 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: [12, 14, 16]
node: [14, 16, 18, 20]
# Docker containers to run for database RPC tracing integration tests.
services:
mongo:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 10
node-version: 14
- run: npm install
- run: npm test
- name: coverage
Expand All @@ -72,7 +72,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 14
- run: npm install
- run: npm run lint
docs:
Expand All @@ -81,7 +81,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 14
- run: npm install
- run: npm run docs-test
license:
Expand All @@ -90,6 +90,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 14
- run: npm install
- run: npm run license-check
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.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.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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ also contains samples.

## Supported Node.js Versions

Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
Libraries are compatible with all current _active_ and _maintenance_ versions of
Node.js.
If you are using an end-of-life version of Node.js, we recommend that you update
Expand Down
2 changes: 1 addition & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'.eslintignore',
'.github/workflows/ci.yaml',
'.nycrc',
'.prettierignore'
'.prettierignore',
])

### SUPPORT DATABASE PLUGINS ###
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"author": "Google Inc.",
"license": "Apache-2.0",
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
},
"devDependencies": {
"@compodoc/compodoc": "1.1.19",
Expand All @@ -55,12 +55,12 @@
"@types/console-log-level": "^1.4.0",
"@types/continuation-local-storage": "^3.2.1",
"@types/extend": "^3.0.0",
"@types/glob": "^8.0.0",
"@types/is": "0.0.21",
"@types/glob": "^8.1.0",
"@types/is": "0.0.22",
"@types/knex": "^0.15.1",
"@types/methods": "^1.1.0",
"@types/mocha": "^9.0.0",
"@types/node": "^18.0.0",
"@types/node": "^20.4.9",
"@types/node-fetch": "^2.5.0",
"@types/once": "^1.4.0",
"@types/proxyquire": "^1.3.28",
Expand All @@ -70,34 +70,34 @@
"@types/tmp": "0.2.3",
"@types/uuid": "^9.0.0",
"axios": "^0.27.0",
"c8": "^7.0.0",
"c8": "^8.0.1",
"cpy": "^8.0.0",
"express": "^4.15.2",
"gaxios": "^4.0.0",
"gaxios": "^6.0.0",
"glob": "^8.0.0",
"grpc": "1.24.11",
"gts": "^3.1.0",
"gts": "^5.0.0",
"js-green-licenses": "^4.0.0",
"linkinator": "^2.0.0",
"mocha": "^9.2.2",
"nock": "^13.0.0",
"once": "^1.4.0",
"retry-axios": "^2.0.0",
"teeny-request": "^8.0.0",
"teeny-request": "^9.0.0",
"timekeeper": "^2.0.0",
"tmp": "0.2.1",
"ts-node": "^10.7.0",
"typescript": "~4.7"
"typescript": "^5.1.6"
},
"dependencies": {
"@google-cloud/common": "^4.0.0",
"@google-cloud/common": "^5.0.0",
"@opencensus/propagation-stackdriver": "0.1.0",
"builtin-modules": "^3.0.0",
"console-log-level": "^1.4.0",
"continuation-local-storage": "^3.2.1",
"extend": "^3.0.2",
"gcp-metadata": "^5.0.0",
"google-auth-library": "^8.0.2",
"gcp-metadata": "^6.0.0",
"google-auth-library": "^9.0.0",
"hex2dec": "^1.0.1",
"is": "^3.2.0",
"methods": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"*.js"
],
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
},
"scripts": {
"deploy": "gcloud app deploy",
Expand Down
5 changes: 4 additions & 1 deletion src/cls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ export class TraceCLS implements CLS<RootContext> {
*/
readonly rootSpanStackOffset: number;

constructor(config: TraceCLSConfig, private readonly logger: Logger) {
constructor(
config: TraceCLSConfig,
private readonly logger: Logger
) {
switch (config.mechanism) {
case TraceCLSMechanism.ASYNC_HOOKS:
this.CLSClass = AsyncHooksCLS;
Expand Down
2 changes: 1 addition & 1 deletion src/cls/null.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {CLS, Func} from './base';
* A trivial implementation of continuation-local storage where context takes on
* a default, immutable value.
*/
export class NullCLS<Context> implements CLS<Context> {
export class NullCLS<Context extends {}> implements CLS<Context> {
private enabled = false;

constructor(private readonly defaultContext: Context) {}
Expand Down
2 changes: 1 addition & 1 deletion src/cls/singular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {CLS, Func} from './base';
* in the same continuation. Therefore, only one unique value can be stored at
* a time.
*/
export class SingularCLS<Context> implements CLS<Context> {
export class SingularCLS<Context extends {}> implements CLS<Context> {
private enabled = false;
private currentContext: Context;

Expand Down
1 change: 1 addition & 0 deletions test/test-modules-loaded-before-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('modules loaded before agent', () => {
class CaptureTestLogger extends TestLogger {
constructor() {
super();
// eslint-disable-next-line @typescript-eslint/no-this-alias
logger = this;
}
}
Expand Down