Skip to content

Latest commit

 

History

History
601 lines (372 loc) · 46.8 KB

CHANGELOG.md

File metadata and controls

601 lines (372 loc) · 46.8 KB

🍐 2.4.0-0 (2020-12-16)

  • TypeScript 4.1.3
  • Rollup 2.35.1
  • Terser 5.5.1
  • Puppeteer 5.4.2

Bug Fixes

  • devserver: expose startupTimeout (0046051)
  • runtime: don't render when crashing (#2746) (c91e0c8)
  • vdom: hide fallback slot when content present in scoped/non-shadow components (#2650) (2ae6f5f)
  • worker: update *?worker declaration (#2754) (7b96ada)

Features

  • output: includeGlobalScripts option for custom elements (e7fa9c8)
  • typescript: update to typescript 4.1.3 (adf9c93)

⛵️ 2.3.0 (2020-11-06)

Features

Bug Fixes

🍉 2.2.0 (2020-10-27)

Bug Fixes

  • prerender: cache writing hashed assets (96c44f8)
  • prerender: fix component graph tmp file (bb9b6a8)

Features

  • jest: update to jest 26.6.1 (aafb1a3)
  • prerender: do not inline external styles by default (044aa96)
  • puppeteer: update to puppeteer 5.4.1 (cf8847b)
  • rollup: update to rollup 2.32.1 (83236f9)
  • terser: update to terser 5.3.8 (46a0207)
  • typescript: update to typescript 4.0.5 (0ca07a1)

🍗 2.1.2 (2020-10-26)

Bug Fixes

  • devserver: fix dev server static data with trailing slash (d70423d)
  • hydrate: do not add html comments inside inline scripts (3c16737)

🎂 2.1.1 (2020-10-23)

Bug Fixes

  • prerender: fix slot relocation and inline styles (2af380f)
  • worker: capture worker errors (#2709) (dcd49c0)

🖍 2.1.0 (2020-10-20)

Features

  • TypeScript 4.0.3
  • Rollup 2.32.0
  • Terser 5.3.7
  • Jest 26.6.0
  • Puppeteer 5.3.1
  • Open 7.3.0
  • Node Fetch 2.6.1
  • prerender: hash assets and add version querystring (e20c284)
  • prerender: hash assets in page.state static content (baeb842)
  • prerender: add buildId, hydrate externals, DOMContentLoaded (4d49c63)
  • prerender: server-side only bundle modules w/ .server directory (d8fcb60)
  • prerender: write page.state.json data from hydrat
  • add setErrorHandler() (#2704) (5d2780a)
  • docs-custom: add config argument (#2696) (d285879)
  • sys: add encoding option to readFile (99ef518)
  • sys: add sys.generateFileHash() for more efficient file hashing (d762c6d)
  • dev-server: add ssr option for dev server for prerending dev (2574094)
  • e2e: e2e timeout configurable (8b69731), closes #2662
  • nodeRequire: export nodeRequire utility from compiler (10ea2fb)e builds (a2c93f6)

Bug Fixes

  • hmr: reload from changed css import in global styles (4f8934d)
  • runtime: do regular clone of normal slotting (#2694) (602c1e2)
  • mock-doc: set hostname when location is updated (#2689) (9598a05)
  • worker: Build.isDev in worker (#2702) (e8ced45)
  • dev-server: clear module cache on ssr reload (cfd5d39)
  • mock-doc: no indentation w/in whitespace sensitive elements (46ff715)
  • dev-server: improve exiting dev server process (eb02517)
  • e2e: update to use page.waitForTimeout() (e48d306)
  • hydrate: improve dev server console error (9cb31a5)
  • mock-doc: do not pretty print whitespace senstive elements (de0dc65)
  • mock-doc: provide mocked global fetch() fn (8fbc694)
  • types: do not require @types/node because of puppeteer types (1a907f7)
  • types: export h() function types (be20372)

🍮 2.0.3 (2020-09-03)

Bug Fixes

  • watch: do not rebuild on docs output target file changes (4529de7)

Features

  • worker: can import Build from @stencil/core (3058143)

🐡 2.0.2 (2020-09-02)

Bug Fixes

  • prerender: export Fragment for prerender builds (142adc8)
  • test: do not build docs from test command (557b371)
  • watch: fix config.watchIgnoredRegex and update w/ RegExp array (981e0ae)

👽 2.0.1 (2020-08-31)

Bug Fixes

  • custom-elements: update package json module recommendation (9f29dbd)
  • jest: update to jest 26.4.2 (6aeb2f7)
  • rollup: update to rollup 2.26.8 (cac6482)
  • testing: use default jest maxConcurrency (c5d216f)

Features

  • cli: add changlog link to stencil version update message (5fa5991)

🚗 2.0.0 (2020-08-31)

In keeping with Semver, Stencil 2.0.0 was released due to changes in the API (mainly from some updates to the config API). But even though this is a new major version, there are few breaking changes, and any changes will be flagged and described by the compiler during development. For the most part, most of the changes are removal of deprecated APIs that have been printing out warning logs for quite some time now.

Opt-in for IE11, Edge 16-18 and Safari 10 Builds

  • config: update config extra defaults to not build IE11, Edge 16-18 and Safari 10 by default (363bf59)

A change in Stencil 2 is that the IE11, Edge 16-18 and Safari 10 builds will not be enabled by default. However, the ability to opt-in is still available, and can be enabled by setting each extras config flag to true. An advantage of this is less runtime within your builds. See the config.extras docs for more info.

Opt-in for ES5 and SystemJS Builds

  • config: do not build es5 by default (fa67d97)

Just like having to opt-in for IE11, the same goes for opting-in for ES5 and SystemJS builds. For a production build in Stencil 1, it would build both ES2017/ESM files, and ES5/SystemJS files. As of Stencil 2, both dev and prod builds do not create ES5/SystemJS builds. An advantage of this is having faster production builds by not having to also downlevel to es5. See the buildEs5 for more info.

Use disconnectedCallback() instead of componentDidUnload()

  • componentDidUnload: use disconnectedCallback instead of componentDidUnload (4e45862)

When Stencil is used within other frameworks, DOM elements may be reused, making it impossible for componentDidUnload() to be accurate 100% of the time if it is disconnected, then re-connected, and disconnected again. Instead, disconnectedCallback() is the preferred way to always know if a component was disconnected from the DOM.

Note that the runtime still works for any collections that have been built with componentDidUnload(). However, updates to Stencil 2 will require it's changed to disconnectedCallback().

Default to async task queue

  • taskQueue: set "async" taskQueue as default (f3bb121)

Update taskQueue default to "async". Stencil 1 default was "congestionAsync". See config.taskQueue for more info.

Restore Stencil 1 defaults

export const config: Config = {
  buildEs5: 'prod',
  extras: {
    cssVarsShim: true,
    dynamicImportShim: true,
    safari10: true,
    shadowDomShim: true,
  }
};

dist package.json

To ensure the extensions are built for the future and work with today's bundlers, we've found it best to use .cjs.js extension for CommonJS files, and .js for ESM files, with the idea that cjs files will no longer be needed some day, and the ESM files are the standard. (We were using .mjs files, but not all of today's tooling and bundlers work well with that extension).

If you're using the dist output target, update the package.json in the root of your project, like this:

  {
-    "main": "dist/index.js",
+    "main": "dist/index.cjs.js",

-    "module": "dist/index.mjs",
+    "module": "dist/index.js",

-    "es2015": "dist/esm/index.mjs",
+    "es2015": "dist/esm/index.js",

-    "es2017": "dist/esm/index.mjs",
+    "es2017": "dist/esm/index.js",

-    "jsnext:main": "dist/esm/index.mjs",
+    "jsnext:main": "dist/esm/index.js",
  }

Additionally the dist/loader output directory has renamed its extensions too, but since its dist/loader/package.json file is auto-generated, the entries were renamed too. So unless you were referencing the loader files directly you will not have to do external updates.

See the Output Folder Structure Defaults for more info.

NodeJS Update

  • node: minimum of Node 12.10.0, recommend 14.5.0 or greater (55331be)

With the major release, now's a good time to update the minimum and recommended version of NodeJS.

TypeScript 4

  • typescript: bundle typescript (1973032)
  • typescript: update to typescript 4.0.0-beta (a274e11)
  • typescript: update to typescript 4.0.1-rc (def2e6b)
  • typescript: update to typescript 4.0.2 (f55f0bf)

The other change is the update to TypeScript 4. With Stencil 2, TypeScript will no longer be a dependency, but instead included within the Stencil compiler. There are a few advantages to this we'll be experimenting with:

  • Faster compiler startup times and overall smaller install size.
  • The custom elements build should have a dependency of @stencil/core, so not having TypeScript as a dependency of @stencil/core simplifies the dependency graph for end-users and libraries.
  • Drastically simplifies the Stencil compiler by not having to dynamically import TypeScript, which quickly gets complicated since the compiler can work within Node, Deno, web workers and the browser's main thread. By bundling internally many of the complexities are no longer an issue.
  • Stencil compiler guaranteed to run with the exact version of TypeScript it was designed with.
  • Easier to adjust to breaking changes. For example, TypeScript 4 introduced a few breaking changes, but with this update it made it easier for the compiler to adjust internally.

Removal of Deprecated APIs

  • assetsDir: remove deprecated component assetsDir (b5cba6a)
  • attr: remove deprecated prop attr/reflectToAttr (133dd49)
  • collection: remove deprecated collection parsing (1a94d1e)
  • compiler: remove deprecated compile/compileSync (58a27d2)
  • config: remove deprecated includeSrc/excludeSrc (c18cb1f)
  • context: remove deprecated prop context/connect (a87b738)
  • copy: remove deprecated copy config (6cf3134)
  • docs: remove deprecated 'docs' type (043e2d8)
  • experimental-dist-module: remove deprecated experimental-dist-module (41189a6)
  • forceUpdate: remove deprecated elm.forceUpdate() (dfc1e59)
  • legacyLoader: remove deprecated legacy loader (7480f92)
  • listen: remove Listen target: 'parent' option (ed63707)
  • listen: remove deprecated listen target (1a3b519)
  • reflectToAttr: remove deprecated prop reflectToAttr (6eae6f8)
  • prerender: use internal typescript (8f0bb51)
  • test: do not require typescript for tests (43c5d98)
  • test: remove deprecated testing configs (fb8a02b)
  • transpile: remove deprecated "script" option (75dfebb)
  • watch: remove deprecated PropWillChange/PropDidChange (fa2b400)

Removal of Context

The Context object was originally added in the 0.x.x versions of Stencil, before ES Modules were widely adopted. Since then we've deprecated it in Stencil 1, and have ported any external libraries off of it. The remaining one was @stencil/redux, and we've released 0.2.0 to be used with Stencil 2 (and can also work with Stencil 1). Additionally, now might be a good time to look into using @stencil/store instead.

Bug Fixes

  • assetsDirs: allow same destination asset dir copy task (b6379b3), closes #2615
  • compiler: normalizePath result from fs.realpathSync (#2625) (df83c83)
  • dist: ensure src dts files not emitted still get shipped in dist (dea56be), closes #1797
  • dist: export Components, JSX types from custom-elements build (abae5d1)
  • Fragment: fix tsconfig Fragment (ba0ea8d)
  • exit: ensure all node processes are destroyed on exit (73a04c2)
  • exit: sys.exit() returns a promise (208ef8c)
  • export: export client runtime from @stencil/core (4c6cb60)
  • hmr: fix dev server hmr (fa480b6)
  • hydrate: ensure all timers are cleared (db1d747)
  • monorepos: do not lazy require missing dependencies (7f739a0)
  • parse: parse decorator shorthand property assignment (6b9e035)
  • plugin: ensure external plugin css do not require physical file (b5a2536), closes #2622
  • prerender: flatten hAsync children to resolve promises (363d258)
  • prerender: hAsync only returns promise if it has to (25a547a)
  • safari: fix safari10 builds (63f02f8)
  • sys: set ts.getExecutingFilePath() from stencil sys (2b21f2d)
  • taskQueue: fix "immediate" rendering (#2630) (62ea511)
  • testing: add collectCoverageFrom jest parameter (#2613) (370a701)
  • treeshaking: move environment helpers out of utils (c9306b9)
  • ts: update ts lib default local module path (16f30bc)
  • watch: fix rebuild components on e2e w/ watch (7cd28ca), closes #2642
  • watch: hmr scss _partial reload on file change (4ffbe4a), closes #2205
  • worker: error passing (03864f2)

Features

  • buildEs5: add "prod" as an option for config.buildEs5 (1af30a2)
  • dev-server: single-threaded dev-server for debugging (cf335e3)
  • runtime: add jsx Fragment (#2647) (f3abee7)
  • jest: update to jest 26.4.0 (9e3a6a8)
  • prerendering: async h() function (d6eabb9)
  • rollup: update to rollup 2.26.6 (6424254)
  • terser: update to terser 5.1.0 and use its esm build (4b67c5a)
  • terser: update to terser 5.2.1 (7582974)

1.17.3 (2020-08-04)

Bug Fixes

☎️ 1.17.2 (2020-07-28)

Bug Fixes

  • dev-server: fix dev client requesting build results (91564f4)
  • env: add os.plaform() polyfill (93b53e2)
  • resolve: fix ts resolve module for transpile sync (7e538f4)
  • sys: node sys prerender applyPrerenderGlobalPatch (517891d)
  • worker: mock worker instance for hydrate builds (207ce44)

🐚 1.17.1 (2020-07-26)

Bug Fixes

  • bundling: downgrade @rollup/plugin-commonjs (#2589) (be1bdd1)
  • Parse5 6.0.1

🍩 1.17.0 (2020-07-24)

Features

  • runtime: ability to hook into creating CustomEvent, so vue binding can lowercase event names (a2ce019)
  • setAssetPath: customize path of asset base urls (a06a941)
  • dev-server: pick up scheme and host from forwarding proxy. (#2492) (3be1d72)
  • Rollup 2.23.0

Bug Fixes

  • polyfill: use core-js promise and iife fetch polyfill (#2443) (7b7ed0b)
  • render: allow mapping of childNode to functional component (#2548) (d0176c9)
  • resolve: fix typescript resolve patch (1ef8097)
  • screenshot: update compare.html in e2e screenshot (#2585) (85f6504)
  • sys: ensure in-memory sys checks file data (f7c03c2)

🐬 1.16.5 (2020-07-22)

Bug Fixes

  • watch: close all processes on sigint (2f923e0)

🏜 1.16.4 (2020-07-18)

  • TypeScript 3.9.7
  • @rollup/plugin-node-resolve 8.4.0

Bug Fixes

  • resolve: fix rollup node resolve realpath checks (d3f4c4f)

🚁 1.16.3 (2020-07-15)

Bug Fixes

  • cli: export parseFlags api (3bd1904)
  • commonjs: bump commonjs plugin to 14.0.0 (7eee192)
  • compiler: check reference type text (fdc271c), closes #2569
  • hydrated: fix custom hydratedFlag config (013ca8c), closes #2574
  • prerender: await hashed template html (f4b1799)
  • sys-node: improve os.cpu() checks to read model (05ea6df), closes #2565
  • test: fix testing.testEnvironment setting (645f3a0), closes #2425
  • type definition: add abbr to ThHTMLAttributes (#2568) (d0f7ff1)

Features

  • prerendering: pass results to afterHydrate (#2567) (135d49e)
  • transpile: add styleImportData option to not include style import queryparams (38d5821)

🍷 1.16.2 (2020-07-10)

Bug Fixes

  • checker: fix how often to check for stencil updates (eb0da10)

🎱 1.16.1 (2020-07-09)

Bug Fixes

  • cli: export cli types and runTask, move checkVersion to sys, add tests (02c62b5)

  • sys: ensure typescript sys patched for initial load (90913df)

  • typescript: correctly patch typescript import (b24933d), closes #2561

  • Rollup 2.21.0

🏊 1.16.0 (2020-07-06)

Features

  • TypeScript 3.9.6
  • Rollup 2.19.0
  • deno: create deno system to run cli and compiler from Deno Experimental!! (b3d79c6)

Bug Fixes

  • compiler: fix transitive module dependencies in unit tests (#2178) (#2549) (6585dd1)
  • e2e: readiness flag on slow or overloaded computers (#2525) (a19ac90)
  • jest: correctly set coverageThreshold (#2529) (915bfce)
  • jsx: add autocomplete to <select> (69ccbf1)
  • worker: use importScript() to load cross-origin worker (d6b73b1)
  • compiler: ensure event emitters defined before user statements (1b52d43)
  • runtime: correctly set isWatchReady flag for custom elements build (36b4978)
  • treeshaking: update build conditional treeskaking optimization (2ba24b1)

🎙 1.15.0 (2020-06-25)

Features

  • Rollup 2.18.0

Bug Fixes

  • css: fix compilation of multiple styleURLs (#2493) (d91819c), closes #2432
  • jsx: fix refX / refY types (6cec36e), closes #2503
  • change autocapitalize types to any to avoid conflicts (#2509) (19746d6)
  • cli: correct import in generated spec tests (#2486) (9a80c41)
  • client: import client platform from patch (dbacafc)
  • compiler: types should not be based on package.json (65cdfbd), closes #2460
  • dist: copy assets to the dist folder (2a8b1f1)
  • worker: inline worker if there is a dist output target (#2450) (a96b346), closes #2438
  • do not emit nomodule script of es5 is disabled (39c51db)
  • runtime: enumerated boolean attributes (0d72aee)
  • watch: fix watch callbacks in custom elements build (d052fe4), closes #2478
  • #2366: rehydrate slot child (e152773), closes #2366
  • dev-server: fix dev-server on ie11 (db19ba7)
  • hydrate: fix hydrate attach styles (d891537)
  • polyfill: add proper url base to import shim (#2410) (96dd746)
  • resolve: fix rollup and commonjs resolve (0ea9c71), closes #2461
  • sass: fix sass imports for scoped packages (e551be2), closes #2521

Performance Improvements

  • reenable const class optimization (438c6b3)

Internal Changes

  • Move browser patch fns out of @stencil/core/internal/client
  • Created @stencil/core/internal/client/patch to be used for lazy load builds
  • Internal packages now use index.cjs.js for CommonJS builds, and index.js for ESM builds
  • Updated internal package.json's main property to index.cjs.js
  • Removed require('url') from Node builds now that URL is global since Node v10
  • Custom Elements output target will default to build to index.js instead of index.mjs

🏒 1.14.0 (2020-05-29)

Features

  • dist-custom-elements-bundle output target improvements/fixes
  • TypeScript 3.9.3
  • Rollup 2.10.9
  • Requires NodeJS >= 10.13.0
  • import-format: text and url format import param (4f1f39a)
  • add focusin and focusout event declarations (#2436) (0d730d6), closes #2435

Performance Improvements

  • compiler: do not build hydrated in dev mode (#2448) (8e65201)
  • transpile: skip component.d.ts formatting (#2304) (e3f2700)

Bug Fixes

  • runtime: schedule update when value change in ref() (54ee75f)
  • emit private types in local component.d.ts (#2447) (9d444ff), closes #2440
  • cli: fix --version and --help flags (40baa54)
  • compiler: components without mode should never get mode suffix (#2445) (11e1ccb)
  • compiler: use transformed css to check changed imports of globalStyle (#2422) (7742a87)
  • dev-server: allow no trailing slash for custom base url (0fae632)
  • compiler: disable const class optimization (eac02cb), closes #2462
  • custom-elements: generate types for ce build, fix import paths (22f3f23)
  • transform: always update lazy class declaration (6dd59b3)
  • ts: ts resolve failedLookupLocations fix (30203b8)
  • spellcheck: put an any on it (#2476) (1418c04)
  • custom-elements: fix copy tasks (d810649)

🚂 1.13.0 (2020-05-11)

Features

  • ssg: static site generation (2a38293)
  • prerender: parse typed prerender config (7b6aaf7)
  • Add staticSite to prerender.config.ts
  • Add staticDocument to PrerenderHydrateOptions
  • Add staticComponents to HydrateDocumentOptions
  • Assume a static site build when index.html does not include scripts
  • Do not define custom element for static only components
  • Do not add link rel=modulepreload for static only components
  • Do not minify inline script/styles if already minified within template
  • Ensure valid "src" URL within mock-doc

Bug Fixes

  • docs: include parts in top level docs json (#2412) (131904f)
  • gatsby: prevent clientside for ssr/ssg node env (6bec727), closes #2411
  • jest: change package used to import runCli (#2387) (620d350)
  • jest: jest testing updates (6d69f53)
  • jest: ensure jest-cli, set presets (0d3ed7d)
  • polyfill: slot child fix (#2375) (654d753), closes #2373
  • runtime: fix lifecycle state values (#2414) (8302fed)
  • dev-mode: always add dist-types (#2402) (f523461)
  • e2e: fix puppeteer types (4b38e7d)
  • hydrate: set shadowRoot property on host element (28128df), closes #2301
  • jsx: add missing 'as' attribute to LinkHTMLAttributes (#2404) (28f6cc5)
  • jsx: expose exportparts (180e890), closes #2383
  • prerender: fix prerender.config.ts transpiling (763c0be)
  • types: spellcheck is an string attribute (caf03fa), closes #2186 #2181
  • add types for toggle event of html5 details (#2421) (ebf42cf), closes #2398
  • test: allow setRequestInterception to ba called from user tests (#2330) (ff7fb41)
  • testing: MockResponse404 is not ok (#2420) (43d30dc)
  • add warning for missing include of the srcDir (c6b954c), closes #2380
  • output: fix custom elements build for plain cmps (1a5095a)
  • testing: don't remove request interceptor (8a18112)