Skip to content

Releases: Galooshi/import-js

v2.3.0

31 May 09:15
Compare
Choose a tag to compare
  • Improve support for packages that are npm linked (or symlinked in some other way)
  • Support scoped packages (e.g. @company-name/foobar
  • Improve recursive finding of exports from package dependencies

Thanks to @dcporter for providing all the context needed to make this release happen, and in general for always providing us with important findings and words of encouragement. ❤️

v2.2.2

16 May 16:20
Compare
Choose a tag to compare
  • Fix issues when running import-js on windows machines
  • Stop treating built-in jsx elements (e.g. <div>, <input>) as undefined

v2.2.1

11 Apr 13:14
Compare
Choose a tag to compare
  • Fix finding exports defined through Object.defineProperty
  • Fix goto for relative paths
  • Fix finding exports from webpack module

v2.2.0

11 Mar 17:05
Compare
Choose a tag to compare
  • Fix bug where identifiers used above their definition would be subject for importing
  • Custom importStatementFormatter functions are now passed a moduleName
  • Prevent (some instances of) stale caches after npm install
  • Resolve aliases that look like package dependencies
  • Strip out excludes when importing (as well as when populating cache).

v2.1.3

16 Feb 20:26
Compare
Choose a tag to compare
  • Fix bug with handling object spread syntax in parsed files

v2.1.2

15 Feb 17:34
Compare
Choose a tag to compare

Changes:

  • Fix support for namespaced (import * as foo from 'foo';) imports
  • Pick first file for goto if there are multiple matches.

v2.1.1

09 Feb 19:30
Compare
Choose a tag to compare

Changes:

  • Fix bug with paths when watchman is not being used

v2.1.0

31 Jan 21:16
Compare
Choose a tag to compare

Import-js now automatically finds your named exports.

v2.0.1

29 Dec 13:48
Compare
Choose a tag to compare

This version contains a bugfix for globals not being recognized as a known configuration option.

v2.0.0

22 Dec 10:22
Compare
Choose a tag to compare

Breaking changes:

  • The lookupPaths configuration option has been removed. Use moduleNameFormatter instead to strip out potential prefixes from the path.
  • The stripFromPath configuration option has also been removed in favor of moduleNameFormatter.
  • const is now the default declarationKeyword in node environments.
  • snake_case configuration is no longer supported. It's been deprecated for a while but now finally removed.
  • The importjsd CLI command will now default to show help text instead of starting. Use importjsd run to start it.
  • Local configuration is no longer supported. It's been deprecated for a while but now finally removed. Use a function if you need to use different configuration on different parts of the directory tree.

Added features:

  • "star" type imports are now recognized (e.g. import * from 'foo';)
  • Imports without trailing semicolons are also recognized. If you want to strip out semicolons from the resulting import statements, use ...
  • ... importStatementFormatter, a new configuration option that you can use to modify the resulting import statement. E.g. importStatementFormatter({ importStatement }) => importStatement.replace(/;$/, '').

Other highlights:

  • The dependency on eslint has been removed in favor of using the babylon parser directly to find variables to import. This means faster fixImports, more robust import statement parsing and no pesky eslint version mismatch issues (see #354).