Skip to content

Commit

Permalink
Merge pull request #459 from Shopify/remove_node_14_support
Browse files Browse the repository at this point in the history
Remove node 14 support
  • Loading branch information
paulomarg authored Oct 5, 2023
2 parents 65bd13d + 68997c4 commit c8eb309
Show file tree
Hide file tree
Showing 17 changed files with 57 additions and 43 deletions.
24 changes: 24 additions & 0 deletions .changeset/chilled-bobcats-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@shopify/shopify-app-remix': major
'@shopify/shopify-app-express': major
'@shopify/shopify-app-session-storage': major
'@shopify/shopify-app-session-storage-dynamodb': major
'@shopify/shopify-app-session-storage-kv': major
'@shopify/shopify-app-session-storage-memory': major
'@shopify/shopify-app-session-storage-mongodb': major
'@shopify/shopify-app-session-storage-mysql': major
'@shopify/shopify-app-session-storage-postgresql': major
'@shopify/shopify-app-session-storage-prisma': major
'@shopify/shopify-app-session-storage-redis': major
'@shopify/shopify-app-session-storage-sqlite': major
'@shopify/shopify-app-session-storage-test-utils': patch
---

### Removed support for Node 14

Node 14 has reached it's [EOL](https://endoflife.date/nodejs), and dependencies to this package no longer work on Node 14.
Because of that, we can no longer support that version.

If your app is running on Node 14, you'll need to update to a more recent version before upgrading this package.

This upgrade does not require any code changes.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [14, 16, 18, 20]
version: [16, 18, 20]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
- name: Install
# TODO remove the --ignore-engines flag when node 14 support is dropped
run: yarn install --ignore-engines
- name: Run tests
run: yarn test
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-express/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-remix/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-kv/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down

This file was deleted.

26 changes: 19 additions & 7 deletions packages/shopify-app-session-storage-kv/src/__tests__/kv.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
import semver from 'semver';
import {Miniflare} from 'miniflare';
import {batteryOfTests} from '@shopify/shopify-app-session-storage-test-utils';

// eslint-disable-next-line no-warning-comments
// TODO Remove this file and rename kv.test.actual.ts to kv.test.ts when we drop support for Node 14
if (semver.gte(process.version, '15.0.0')) {
require('./kv.test.actual');
}
import {KVSessionStorage} from '../kv';

test('dummy test', () => expect(1).toEqual(1));
describe('KVSessionStorage', () => {
let storage: KVSessionStorage | undefined;
beforeAll(async () => {
const mf = new Miniflare({
scriptPath:
'packages/shopify-app-session-storage-kv/src/__tests__/kv-namespace-dummy-worker.ts',
kvNamespaces: ['KV_TEST_NAMESPACE'],
});

storage = new KVSessionStorage(
await mf.getKVNamespace('KV_TEST_NAMESPACE'),
);
});

batteryOfTests(async () => storage!);
});
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-memory/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-mysql/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-prisma/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-redis/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage-sqlite/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify-app-session-storage/loom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createPackage((pkg) => {
// Use browser targets (e.g. `'defaults'`) if your package targets the browser,
// node targets (e.g. `'node 12.22'`) if your package targets node
// or both (e.g.`'defaults, node 12.22'`) if your package targets both
targets: 'node 14',
targets: 'node 16',
// Optional. Defaults to false. Defines if commonjs outputs should be generated.
commonjs: true,
// Optional. Defaults to false. Defines if esmodules outputs should be generated.
Expand Down

0 comments on commit c8eb309

Please sign in to comment.