Skip to content

Releases: stealjs/steal

1.7.0

01 Mar 14:02
Compare
Choose a tag to compare

This is a minor release, adding improved error messaging for 404 errors.

Improved 404 Errors

When a 404 occurs because the module is not able to be found by Steal, we have improved the error messaging.

Before it looked like:

36687970-0de91776-1af9-11e8-83e3-b48489f9aa63

And now it is:

36808550-6b835694-1c93-11e8-8420-16789dde804e

As you can see from the screenshot we have changed it so that:

  • We explain what module could not be found.
  • Link to some documentation that gives pointers on how to fix the problem. The documentation is here.
  • Show the code where it was imported inline.
  • The stack-trace also links to this same code.

While this improvement is now in steal, some plugins are still be updated to take advantage of it.

1.6.5

13 Feb 19:11
Compare
Choose a tag to compare

This is a patch release, fixing a regression made in 1.6.4. This involved dynamically importing a module after the module had failed to load in a previous load.

Pull Requests

1.6.4

11 Jan 16:09
Compare
Choose a tag to compare

This fixes an issue where steal would try to load a module that had already failed to load. This prevents a variety of repetitive error messages.

1.6.3

10 Jan 20:07
Compare
Choose a tag to compare

This is a patch release, fixing a bug where configuration in buildConfig would override other configuration during a build. So any configuration needed during production wouldn't exist.

1.6.2

29 Nov 14:56
Compare
Choose a tag to compare

This release fixes a mistake made in the 1.6.1 release, where some needed files were excluded from npm.

1.6.1

29 Nov 14:31
Compare
Choose a tag to compare

This is a patch release, fixing a cause when importing CommonJS modules from ES modules, that themselves import a common CommonJS module that happens to export the global object (in the browser the self property).

Issues

#1312 Importing a CommonJS module that exports the window object receives the Module object rather than the exported value

1.6.0

13 Nov 13:58
Compare
Choose a tag to compare

This is a minor release, adding one new feature (the ability to define dependencies).

meta.deps for ES and CommonJS modules

1.6.0 adds the ability to define dependencies on ES modules (modules using import/export) and CommonJS (using require). This is useful when a module has an implicit dependency (such as a css file) that it does not define as a dependency itself.

As an example, let's say you had a module:

counter.js

function makeCounter() {
  let counter = document.createElement("div");
  counter.className = "counter";
  counter.textContent = 0;
  
  let start = Date.now();
  setInterval(() => {
    let end = Date.now();
    let diff = start - end;
    let seconds = Math.floor(diff / 1000);
    counter.textContent = seconds;
  }, 500);

  return counter;
}

export default makeCounter;

Which has an associated CSS for styling:

counter.css

.counter {
  font-weight: bolder;
  color: tomato;
}

If you wanted to use this component, previously you would have to remember to import both of these files in each place that needed them.

In 1.6.0 you can now add meta.deps to any ES or CommonJS module, adding to globals which were previously supported.

To fix the above, edit your package.json:

{
  "name": "my-app",
  "version": "1.0.0",
  "main": "main.js",

  "steal": {
    "meta": {
      "my-app/counter":  {
        "deps": ["my-app/counter.css"]
      }
    }
  }
}

And now you can simply import the counter.js module, and the styles will come with it.

Thanks to @DesignByOnyx for adding this feature.

Issues

1.5.19

13 Nov 13:21
Compare
Choose a tag to compare

This is a bug fix release, removing the false positive 'module loaded twice' messages for all known scenarios. We will continue to monitor this warning and deal with all false positives as they are discovered.

Pull Requests

1.5.18

10 Nov 15:50
Compare
Choose a tag to compare

This is patch release that removes the guide docs from this repository. They have been moved into the stealjs/stealjs repo.

1.5.17

09 Nov 19:14
Compare
Choose a tag to compare