Releases: Galooshi/import-js
Releases · Galooshi/import-js
v2.3.0
- Improve support for packages that are
npm link
ed (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
v2.2.1
v2.2.0
- Fix bug where identifiers used above their definition would be subject for importing
- Custom
importStatementFormatter
functions are now passed amoduleName
- 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
v2.1.2
v2.1.1
v2.1.0
v2.0.1
v2.0.0
Breaking changes:
- The
lookupPaths
configuration option has been removed. UsemoduleNameFormatter
instead to strip out potential prefixes from the path. - The
stripFromPath
configuration option has also been removed in favor ofmoduleNameFormatter
. const
is now the defaultdeclarationKeyword
innode
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. Useimportjsd 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).