Skip to content

Commit

Permalink
chore(engines): drop Node 14 support (#4472)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
4 people committed Jun 15, 2023
1 parent 7f12461 commit ce18945
Show file tree
Hide file tree
Showing 12 changed files with 7,736 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18', '20']
node: ['16', '18', '20']
os: ['ubuntu-20.04', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-component-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18', '20']
node: ['16', '18', '20']
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18', '20']
node: ['16', '18', '20']
os: ['ubuntu-20.04', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18', '20']
node: ['16', '18', '20']
os: ['ubuntu-20.04', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions bin/stencil
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node
'use strict';

var minimumVersion = '14.5';
var futureDeprecationMinVersion = '14.0';
var recommendedVersion = '16.4';
var minimumVersion = '16.0';
var futureDeprecationMinVersion = '16.0';
var recommendedVersion = '18.16';
var currentVersion = process.versions.node;

function isNodeLT(v) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
"ws": "8.13.0"
},
"engines": {
"node": ">=14.10.0",
"npm": ">=6.0.0"
"node": ">=16.0.0",
"npm": ">=7.10.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion scripts/bundles/helpers/compiler-cjs-intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ if (!process.platform) {
process.platform = 'stencil';
}
if (!process.version) {
process.version = 'v14.0.0';
process.version = 'v16.0.0';
}
process.browser = !!globalThis.location;
10 changes: 2 additions & 8 deletions src/sys/node/node-sys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,7 @@ export function createNodeSys(c: { process?: any; logger?: Logger } = {}): Compi
return new Promise((resolve) => {
const recursive = !!(opts && opts.recursive);
if (recursive) {
// TODO(STENCIL-410): In a future version of Node, `force: true` will be required in the options argument. At
// the time of this writing, Stencil's Node typings do not support this option.
// https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true-
fs.rmdir(p, { recursive: true }, (err) => {
fs.rm(p, { recursive: true, force: true }, (err) => {
resolve({
basename: path.basename(p),
dirname: path.dirname(p),
Expand Down Expand Up @@ -396,10 +393,7 @@ export function createNodeSys(c: { process?: any; logger?: Logger } = {}): Compi
try {
const recursive = !!(opts && opts.recursive);
if (recursive) {
// TODO(STENCIL-410): In a future version of Node, `force: true` will be required in the options argument. At
// the time of this writing, Stencil's Node typings do not support this option.
// https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true-
fs.rmdirSync(p, { recursive: true });
fs.rmSync(p, { recursive: true, force: true });
} else {
fs.rmdirSync(p);
}
Expand Down
Loading

0 comments on commit ce18945

Please sign in to comment.