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

feat: adding support for node 18, dropping node 12 #406

Merged
merged 6 commits into from
Apr 21, 2022
Merged
Changes from 1 commit
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
Next Next commit
feat: adding support for node 18, dropping node 12
erunion committed Apr 20, 2022
commit 0c86245ba553a93916957bcc012271fba18b165c
20 changes: 7 additions & 13 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -14,23 +14,17 @@ jobs:
# node 16.14.2 ships with a buggy version of npm 🤷‍♂️
# https://github.com/nodejs/node/issues/42397
# TODO revert this back to 16.x when node pushes a new version
node-version: [12.x, 14.x, 16.14.0]
node-version:
- 12
- 14
- 16.14.0
- 18

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install npm@7
run: npm install -g npm@7

- name: Install deps
run: npm ci

- name: Run tests
run: npm test

env:
CI: true
- run: npm ci
- run: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"url": "https://github.com/readmeio/metrics-sdks.git"
},
"engines": {
"node": "^12 || ^14 || ^16"
"node": ">=14"
},
"workspaces": [
"./packages/node"
1,131 changes: 361 additions & 770 deletions packages/node/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
"readme"
],
"engines": {
"node": "^12 || ^14 || ^16"
"node": ">=14"
},
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@@ -34,7 +34,7 @@
"uuid": "^8.2.0"
},
"devDependencies": {
"@readme/eslint-config": "^8.4.4",
"@readme/eslint-config": "^8.7.0",
"@types/har-format": "^1.2.7",
"@types/jest": "^27.4.1",
"@types/multer": "^1.4.7",
2 changes: 1 addition & 1 deletion packages/node/src/lib/express-middleware.ts
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ export function expressMiddleware(readmeApiKey: string, group: GroupingFunction,
queue.push(payload);
if (queue.length >= bufferLength) doSend();

cleanup(); // eslint-disable-line no-use-before-define
cleanup(); // eslint-disable-line @typescript-eslint/no-use-before-define
}

function cleanup() {