Skip to content

Releases: stealjs/steal

2.3.0

09 Jun 16:04
Compare
Choose a tag to compare
  • importRewrites is a new feature in steal config. It is similar to map with these differences:
    • it is always scoped to an npm package
    • it does a straight text replacement of imports prior to normalizing

Here's a practical example: given an old jQueryUI widget, which we'll call this-old-jquery-ui-plugin, has a file that references an old jQueryUI naming convention for the widget library:

    if (typeof define === 'function' && define.amd) {
        // Register as an anonymous AMD module:
        define([
            'jquery',
            'jquery.ui.widget'
        ], factory);
    } 

However, we are using a jquery-ui version that has been published with a different file structure, and jquery.ui.widget.js is no longer a valid file path. We want that import to point to the prior-to-normalized path jquery-ui/ui/widget.js instead. To do this, add the following to the steal section in package.json:

  "importRewrites": {
      "this-old-jquery-ui-plugin": {
        "jquery.ui.widget": "jquery-ui/ui/widget"
      }
  }

With this config, all of the imports of jquery.ui.widget in this npm package will be renamed to jquery-ui/ui/widget and then normalized to e.g. jquery-ui@1.11.2#ui/widget.

Note that wildcards are not supported in importRewrites; only exact string matches of import specifiers will be replaced.

PR: #1522
Also in this release:

  • iOS safari fix for steal.clone(): e732dc4
  • Updates to dependencies: #1525

2.2.4

21 Oct 20:07
Compare
Choose a tag to compare

Fixes ES module detection when there are comments within strings and single line minified modules.

2.2.3

11 Oct 18:39
Compare
Choose a tag to compare

Add support for packages with a main that should resolve to index.js

This patch release fixes an issue with packages using a trailing slash in its main like:

{
  "name": "a-package",
  "version": "1.0.0",
  "main": "lib/"
}

in this case, steal should resolve main to lib/index.

2.2.2

01 Aug 13:57
Compare
Choose a tag to compare

Stricter System.register detection

This patch release fixes #1500:

require("fs.js");
FileSystem.registerFileSystem();

Steal.js would not detect this module as CommonJS because line 2 would be matched by the System.register extension regular expression.

Thanks @kayahr for reporting the issue.

Adds documentation on steal.loader.env

25 Mar 13:16
Compare
Choose a tag to compare

Introduce forceES5 flag to skip ES2015 transpilation

05 Mar 21:35
Compare
Choose a tag to compare
{
   "steal": {
      "forceES5": false // defaults to true
   }
}

when set to false, Steal.js does not include the ES2015 preset. This is useful when the target browser supports all of the syntax/features transpiled by the ES2015 preset.

If a package is missing, warn which file imported it.

15 Jan 19:57
Compare
Choose a tag to compare

This enhances the warning in the console by adding which file tries to import a missing package like is showing in the following screenshot:

foo

#1463

2.1.13

08 Jan 18:26
Compare
Choose a tag to compare

Fixes an issue where a module loading a dependency by its exact npm module name might load the wrong package version and error out.

2.1.12

28 Dec 14:31
Compare
Choose a tag to compare

This is a patch release, which adds names to all of the extension functions to make them easier to debug.

2.1.10

29 Nov 15:15
Compare
Choose a tag to compare

This fixes a false positive JSON parse warning in production when a JSON module is loaded from another bundle.