Skip to content

Releases: Galooshi/import-js

v5.1.0

12 Jan 16:45
Compare
Choose a tag to compare

Features

  • Configuration to also look for .importjs.cjs and .importjs.mjs (#589, thanks @mikabytes!)

Dev

  • Updated eslint dependencies

v5.0.0

01 Dec 16:30
Compare
Choose a tag to compare

Breaking changes:

  • importjsd command has been removed. Use importjs instead.

Other changes:

  • Updated sqlite to v5. This fixes installation issues (see #574)

v4.0.2

10 Dec 15:53
Compare
Choose a tag to compare

This release contains a bug fix for files using array destructuring with omitted variables. E.g.

const [, bar] = foo();

Before this release, we would throw an error when parsing this code.

v4.0.1

09 Dec 12:05
Compare
Choose a tag to compare

Fix missing @babel/runtime dependency in published npm lib.

v4.0.0

09 Dec 12:04
Compare
Choose a tag to compare

The main breaking change in this release is that we no longer officially support Node v6 and v7. We've also updated @babel dependencies, which could also cause different behavior (plus fix a few bugs).

New feature:
If you don't have a package.json file in your project, you can drop an .importjs-root file in the root of the project to indicate to import-js where to resolve imports from. (#547 by @mikabytes)

v3.2.0

12 Sep 07:58
Compare
Choose a tag to compare

Adds support for isRoot in package.json files. From the README:

Specifying alternate package directory

ImportJS looks for the package.json file in the closest ancestor directory for the file you're editing to find node modules to import. However, sometimes it might pull dependencies from a directory further up the chain. For example, your directory structure might look like this:

.
|-- package.json
|-- components
|     |-- button.js
|     |-- icon.js
|-- node_modules
|     |-- react
|-- subpackage
|     |-- package.json
|     |-- components
|           |-- bulletin.js

If you were to use ImportJS on subpackage/components/bulletin.js which imports React, ImportJS would not know that react is a valid dependency.

To tell ImportJS to skip a directory and keep searching upwards to find the root package directory, specify "importjs": { "isRoot": false } in the package.json of the directory to ignore. In this case, you would want something like this:

{
  "name": "subpackage",
  ...
  "importjs": {
    "isRoot": false
  }
}

v3.1.1

10 Sep 20:26
Compare
Choose a tag to compare

This patch release should fix issues people have been seeing related to a 'decorators' plugin.

v3.1.0

13 Aug 09:12
Compare
Choose a tag to compare

This version adds support for Typescript files. As a result of that, we're now also on Babel 7. Even though this is a big change for the project, we believe it should be backwards compatible. That's why this version is a minor version bump and not a major.

v3.0.0

02 May 13:02
Compare
Choose a tag to compare

Breaking changes:

  • Drop support for Node v4 and v5.

(hopefully) Non-breaking changes:

  • Add util to node environment's namedExports
  • Upgrade to sqlite3 v4

Bug fixes:

  • Resolving "toString" name causes a crash (0024cdc)

v2.10.1

16 Mar 19:04
0ba5fec
Compare
Choose a tag to compare

Thanks to @Kahless for helping out in getting this patch release ready.

Changes

  • Un-deprecate namedExports config option. It has become clear that it's hard to make every usecase detected automatically. Instead of confusing people with a useful config option being removed soon, we should just keep supporting it. I don't see it going away any time soon anyway.
  • Fix incorrectly treating deconstructed variables with a custom name as undefined.