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

**BREAKING**: Drop support to node < 18 #1387

Merged
merged 1 commit into from
Oct 16, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module.exports = {
project: 'tsconfig.dev.json',
sourceType: 'module',
},
env: {
jest: true,
},
root: true,
rules: {
'no-restricted-imports': ['error', 'date-fns', 'lodash'],
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
runs:
using: "composite"
steps:
- name: Setup Node.js 16
- name: Setup Node.js 18
if: ${{ env.os_value == 'ubuntu-20.04' }}
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $ npm install --save balena-sdk

## Platforms

We currently support NodeJS (16+) and the browser.
We currently support NodeJS (18+) and the browser.

The following features are node-only:
- OS image streaming download (`balena.models.os.download`),
Expand Down
1 change: 0 additions & 1 deletion mjs_tests/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'mjs-mocha';
import chai from 'chai';
const { expect } = chai;

// TODO: Make `npm run test:mjs-imports` part of `npm test` once we bump to node 16.
describe('mjs imports', function () {
it('should support using default imports', async function () {
await import('./import_default.mjs');
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"clean": "rimraf es2015 es2018",
"test:fast": "npm run lint:fix && npm run build-es2015:fast && npm run test:node",
"test": "([ \"$GITHUB_WORKFLOW\" = 'Flowzone' ] && [ \"$GITHUB_JOB\" = 'npm_test' ] && echo \"Skipping 'npm test' in flowzone in favor of the custom test action!\") || (npm run build && npm run test:all)",
"test:all": "npm run test:ts-compatibility && npm run test:dev && npm run test:ts-js && npm run test:typings && npm run test:node && npm run test:browser",
"test:all": "npm run test:ts-compatibility && npm run test:dev && npm run test:ts-js && npm run test:typings && npm run test:mjs-imports && npm run test:node && npm run test:browser",
"test:node": "gulp test",
"test:browser": "mockttp -c karma start",
"test:dev": "tsc --noEmit --project ./tsconfig.dev.json",
Expand All @@ -61,7 +61,7 @@
"author": "Juan Cruz Viotti <[email protected]>",
"license": "Apache-2.0",
"engines": {
"node": ">=16.0"
"node": ">=18.0"
},
"devDependencies": {
"@balena/lint": "^7.2.0",
Expand Down Expand Up @@ -119,13 +119,13 @@
"dependencies": {
"@balena/es-version": "^1.0.0",
"@types/json-schema": "^7.0.9",
"@types/node": "^16.0.0",
"@types/node": "^18.0.0",
"abortcontroller-polyfill": "^1.7.1",
"balena-auth": "^5.1.0",
"balena-errors": "^4.8.0",
"balena-hup-action-utils": "~5.0.0",
"balena-register-device": "^8.0.7",
"balena-request": "^12.0.4",
"balena-register-device": "^9.0.1",
"balena-request": "^13.0.0",
"balena-semver": "^2.3.0",
"balena-settings-client": "^5.0.0",
"date-fns": "^2.29.3",
Expand Down