Skip to content

Commit

Permalink
Upgrade minimum node support on analytics-node to 14.x (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky authored Nov 14, 2022
1 parent 12a1a4c commit 67c92cb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
5 changes: 3 additions & 2 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
'@segment/analytics-next',
'@segment/analytics-node',
'@segment/analytics-core',
'@internal/config'
'@internal/config',
'@types/node'
]).

% Enforces that a dependency doesn't appear in both `dependencies` and `devDependencies`
Expand Down Expand Up @@ -68,4 +69,4 @@ gen_enforced_field(WorkspaceCwd, 'repository', null) :-
% Do not allow a `dependencies` field in root workspace -- we only want to share devDependencies
gen_enforced_field(WorkspaceCwd, 'dependencies', null) :-
member(WorkspaceCwd, ['.']),
workspace_field(WorkspaceCwd, 'dependencies', _).
workspace_field(WorkspaceCwd, 'dependencies', _).
2 changes: 2 additions & 0 deletions packages/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
## Warning: Until 1.x release, use this library at your own risk!
While the API is very similar, the documentation for the legacy SDK (`analytics-node`) is here: https://segment.com/docs/connections/sources/catalog/libraries/server/node/

## Requirements
- NodeJS >= 14.x

## Quick Start
### Install library
Expand Down
4 changes: 2 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"!*.tsbuildinfo"
],
"engines": {
"node": ">=12"
"node": ">=14"
},
"scripts": {
"test": "yarn jest",
Expand All @@ -39,7 +39,7 @@
},
"devDependencies": {
"@internal/config": "0.0.0",
"@types/node": "^12.12.14"
"@types/node": "^14"
},
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions packages/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"compilerOptions": {
"resolveJsonModule": true,
"module": "esnext",
"target": "ES5",
"target": "es2020", // node 14
"moduleResolution": "node",
"lib": ["es2020"] // TODO: https://www.npmjs.com/package/@tsconfig/node12?
"lib": ["es2020"] // TODO: https://www.npmjs.com/package/@tsconfig/node14
}
}
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ __metadata:
dependencies:
"@internal/config": 0.0.0
"@segment/analytics-core": 1.1.1
"@types/node": ^12.12.14
"@types/node": ^14
node-fetch: ^2.6.7
tslib: ^2.4.0
languageName: unknown
Expand Down Expand Up @@ -3574,6 +3574,13 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^14":
version: 14.18.33
resolution: "@types/node@npm:14.18.33"
checksum: 4e23f95186d8ae1d38c999bc6b46fe94e790da88744b0a3bfeedcbd0d9ffe2cb0ff39e85f43014f6739e5270292c1a1f6f97a1fc606fd573a0c17fda9a1d42de
languageName: node
linkType: hard

"@types/normalize-package-data@npm:^2.4.0":
version: 2.4.1
resolution: "@types/normalize-package-data@npm:2.4.1"
Expand Down

0 comments on commit 67c92cb

Please sign in to comment.