Skip to content

Commit

Permalink
Updated 4.0 release notes to reflect jsLoader: "import" breaking jsx
Browse files Browse the repository at this point in the history
See #188
  • Loading branch information
sgravrock committed Jan 2, 2022
1 parent da977b8 commit 1e133d6
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions release_notes/4.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ as well.
[API reference](https://jasmine.github.io/api/npm/4.0/Jasmine) is considered
a private API.

* ES module support is enabled by default, but can still be disabled by
adding `jsLoader: "require"` to the configuration. `jsLoader: "import"` is
now a no-op.

This change breaks loading of files with extensions that aren't supported by
dynamic `import()`, such as `.jsx`. If you have specs or source files with
such extensions, you can either rename the files to `.js` or add
`jsLoader: "require"` to your Jasmine config file.

* Config files can be ES modules. This is a breaking change because it requires
`Jasmine#loadConfigFile` to be async.

Expand Down Expand Up @@ -57,20 +66,9 @@ as well.

## New features and bugfixes

* Full support for ES modules in the default configuration:
* ES module support is enabled by default, but can still be disabled by
adding `jsLoader: "require"` to the configuration. `jsLoader: "import"` is
now a no-op.

We think it's highly unlikely that this change will break anything. If it
does (i.e. your code works with `jsLoader: "require"` but not without it),
please [let us know](https://github.com/jasmine/jasmine-npm/issues/new).
This will help us understand whether the `jsLoader` config property is still
needed.

* Files listed in the `requires` config property can be ES modules
* Files listed in the `requires` config property can be ES modules

* Reporters specified with `--reporter=` can be ES modules.
* Reporters specified with `--reporter=` can be ES modules.

* Allow use without creating globals.
* See <https://jasmine.github.io/api/npm/4.0/JasmineOptions.html#globals>.
Expand Down

0 comments on commit 1e133d6

Please # to comment.