Releases: google/playground-elements
v0.14.6
v0.14.5
Fixed
- Upgraded
es-module-lexer
dependency to bring in fix for
guybedford/es-module-lexer#92.
v0.14.4
v0.14.3
Added
-
Added an overlay that will display over the preview when we detect that
service workers are not available. One reason this can happen is using
Playground in Firefox private browsing mode, which does not support service
workers (https://bugzilla.mozilla.org/show_bug.cgi?id=1320796). -
Added
cursorPosition
,cursorIndex
, andtokenUnderCursor
getters to
<playground-code-editor>
.
Changed
- Upgraded dependencies, including CodeMirror.
Fixed
-
Fixed a bottleneck that prevented previews from loading until semantic
TypeScript errors were computed. This should significantly improve the latency
between updating a file and the new preview loading. -
Fixed bug where parent window history entries were added every time the
preview reloaded. -
Improvements to service worker version updates:
-
The service worker will require less frequent updates going forward.
Previously it needed updating for every playground-elements release. Now it
only needs updating if the bytes of the service worker have changed between
releases. -
The default service worker scope has changed from
<sandboxBaseUrl>/playground-project
to
<sandboxBaseUrl>/__playground_swfs_<serviceWorkerHash>
. This should make service
worker updates more reliable because old and new versions of service workers
will no longer be in contention to control the same URLs. -
Misc other small service worker robustness improvements, and additional
logging to help debug future issues.
-
v0.14.2
v0.14.1
v0.14.0
v0.13.0
Changed
-
Node package exports
are now supported when resolving dependency modules.The
module
,import
, anddevelopment
conditions
are enabled.Note this change should not theoretically be BREAKING, but this release is
versioned with a major increment because there a risk of breakage in practice
due to misconfiguredpackage.json
files, differences betweenprod
and
dev
modes, etc.
Added
- Added
modified
property to<playground-project>
and<playground-ide>
which indicates whether the user has modified, added, or removed any project
files. Resets whenever a new project is loaded.
v0.12.1
v0.12.0
Fixed
-
Fixes duplicate module errors by canonicalizing all import specifiers. Import
specifiers are now canonicalized by version number and default module. This
applies both to local project files, and throughout the entire external
dependency tree. -
Import maps now apply to modules in external dependencies, not just to local
project files. -
The TypeScript compiler can now deal with multiple versions of the same
dependency. Previously, if the import graph included two versions of the same
package, only one arbitrary version of the types would be compiled. This
caused various errors and missing type issues.
Changed
-
If the project contains a
package.json
file, then its
dependencies
field will be used to determine the version of dependencies (just like how NPM
works locally). -
Dependencies are now served from the special
"<service-worker-scope>/node_modules/..."
path, instead of directly from
https://unpkg.com/...?module
URLs. Behind-the-scenes, dependencies are still
fetched from unpkg, but they are now themselves transformed to ensure correct
specifier canonicalization. -
BREAKING Due to large changes to the way dependencies are handled, there
is some risk of breakage due to subtle behavior changes that existing
configurations may be relying on. Therefore, this release is versioned with a
major increment.