Skip to content

Commit a7c9472

Browse files
tanner-reitsrwaskiewiczalicewriteswrongsJessicaSachs
committed
chore(engines): drop Node 14 support (#4472)
* chore(ci): enable ci for v4 dev (#4433) this commit enables browserstack for the v4 development branch * chore(compiler): remove dynamicImportShim (#4420) * remove dynamicImportShim * remove `dynamicImportShim` references from some tests * add field removal to breaking changes * chore(compiler): remove safari10 extras flag (#4421) * remove safari10 extras flag * remove `safari10` references in some tests * add field removal to breaking changes * chore(compiler/runtime): remove CSS var shim & patchEsm() (#4419) * remove CSS var shim & patchEsm * remove `cssVarShim` references from some tests * remove some errant code * add field removal to breaking changes * fix build error * 🎬 v4.0.0-beta.0 * chore(compiler/runtime): remove shadow dom shim (#4440) * chore(ci): enable ci for v4 dev (#4433) this commit enables browserstack for the v4 development branch * chore(compiler): remove dynamicImportShim (#4420) * remove dynamicImportShim * remove `dynamicImportShim` references from some tests * add field removal to breaking changes * chore(compiler): remove safari10 extras flag (#4421) * remove safari10 extras flag * remove `safari10` references in some tests * add field removal to breaking changes * chore(compiler/runtime): remove CSS var shim & patchEsm() (#4419) * remove CSS var shim & patchEsm * remove `cssVarShim` references from some tests * remove some errant code * add field removal to breaking changes * fix build error * 🎬 v4.0.0-beta.0 * remove public-facing shadowDomShim option * missed one * update todo comments --------- Co-authored-by: Ryan Waskiewicz <ryanwaskiewicz@gmail.com> * 🐐 v4.0.0-beta.1 * refactor(many): remove in-browser compilation support (#4317) This removes in-browser compilation support from Stencil. Doing so involves a number of changes, including: - removing the rollup plugin which polyfills node.js built-in modules (fs, path, etc) for use in the browser - deleting the code for the polyfills themselves (found in src/compiler/sys/modules) - miscellaneous refactors related to tests for browser vs node environment as well as testing There will be more follow-up work to fully address this stuff, but this makes the minimal change to remove browser support for Stencil. * 👻 v4.0.0-beta.2 * chore(props): removal of deprecated connect and context APIs (#4437) BREAKING CHANGE: this removes the connect and context APIs which have been deprecated since Stencil v1 This means that the following code will no longer work. ```ts @prop({ context: 'config' }) config: Config; @prop({ connect: 'ion-menu-controller' }) lazyMenuCtrl: Lazy<MenuController>; ``` * chore(deps): remove unused hash.js dependency * chore(deps): remove unused path-browserify dependency * chore(deps): remove unused process dependency * chore(deps): remove unused assert dependency * remove node 14 from CI matrices * bump min node versions across core * update `rmDir`/`rmDirSync` to `rm`/`rmSync` This commit updates some calls to Node fs module functions to follow recommended approaches after deprecations were added for `{ recursive: true }` on `rmDir` and `rmDirSync` * make node versions consistent * bump @types/node & lockfile versions --------- Co-authored-by: Ryan Waskiewicz <ryanwaskiewicz@gmail.com> Co-authored-by: Alice <alice.writes.wrongs@gmail.com> Co-authored-by: Jess <jess@jessicasachs.io>
1 parent c114f0a commit a7c9472

File tree

12 files changed

+7736
-41
lines changed

12 files changed

+7736
-41
lines changed

.github/workflows/test-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
node: ['14', '16', '18', '20']
14+
node: ['16', '18', '20']
1515
os: ['ubuntu-20.04', 'windows-latest']
1616
runs-on: ${{ matrix.os }}
1717
steps:

.github/workflows/test-component-starter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
node: ['14', '16', '18', '20']
14+
node: ['16', '18', '20']
1515
os: ['ubuntu-latest', 'windows-latest']
1616
runs-on: ${{ matrix.os }}
1717
steps:

.github/workflows/test-e2e.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
node: ['14', '16', '18', '20']
14+
node: ['16', '18', '20']
1515
os: ['ubuntu-20.04', 'windows-latest']
1616
runs-on: ${{ matrix.os }}
1717
steps:

.github/workflows/test-unit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
node: ['14', '16', '18', '20']
14+
node: ['16', '18', '20']
1515
os: ['ubuntu-20.04', 'windows-latest']
1616
runs-on: ${{ matrix.os }}
1717
steps:

bin/stencil

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
22
'use strict';
33

4-
var minimumVersion = '14.5';
5-
var futureDeprecationMinVersion = '14.0';
6-
var recommendedVersion = '16.4';
4+
var minimumVersion = '16.0';
5+
var futureDeprecationMinVersion = '16.0';
6+
var recommendedVersion = '18.16';
77
var currentVersion = process.versions.node;
88

99
function isNodeLT(v) {

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
"ws": "8.13.0"
126126
},
127127
"engines": {
128-
"node": ">=14.10.0",
129-
"npm": ">=6.0.0"
128+
"node": ">=16.0.0",
129+
"npm": ">=7.10.0"
130130
},
131131
"repository": {
132132
"type": "git",

scripts/bundles/helpers/compiler-cjs-intro.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ if (!process.platform) {
3131
process.platform = 'stencil';
3232
}
3333
if (!process.version) {
34-
process.version = 'v14.0.0';
34+
process.version = 'v16.0.0';
3535
}
3636
process.browser = !!globalThis.location;

src/sys/node/node-sys.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,7 @@ export function createNodeSys(c: { process?: any; logger?: Logger } = {}): Compi
365365
return new Promise((resolve) => {
366366
const recursive = !!(opts && opts.recursive);
367367
if (recursive) {
368-
// TODO(STENCIL-410): In a future version of Node, `force: true` will be required in the options argument. At
369-
// the time of this writing, Stencil's Node typings do not support this option.
370-
// https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true-
371-
fs.rmdir(p, { recursive: true }, (err) => {
368+
fs.rm(p, { recursive: true, force: true }, (err) => {
372369
resolve({
373370
basename: path.basename(p),
374371
dirname: path.dirname(p),
@@ -396,10 +393,7 @@ export function createNodeSys(c: { process?: any; logger?: Logger } = {}): Compi
396393
try {
397394
const recursive = !!(opts && opts.recursive);
398395
if (recursive) {
399-
// TODO(STENCIL-410): In a future version of Node, `force: true` will be required in the options argument. At
400-
// the time of this writing, Stencil's Node typings do not support this option.
401-
// https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true-
402-
fs.rmdirSync(p, { recursive: true });
396+
fs.rmSync(p, { recursive: true, force: true });
403397
} else {
404398
fs.rmdirSync(p);
405399
}

0 commit comments

Comments
 (0)