Releases: Galooshi/import-js
Releases · Galooshi/import-js
v2.10.1
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.
v2.10.0
v2.9.0
v2.8.0
v2.7.1
v2.7.0
Changes:
- Support flow type imports (including finding the exports) (@rndmerle)
- Improve messaging when imports are added
- Update Meteor environment to support api.mainModule (@coagmano)
- Allow coexistence of homonymous named and default exports in same module (@rndmerle) (requires updates to editor plugins, which will come later)
- Take variable hoisting into account when finding undefined variables
- Add
sortImports
to known configuration options (@dabbott)
v2.6.0
- Add
sortImports
option to enable or disable import sorting - Added support for:
- Recursive export from file
export * from './foo'
- namespace exports
export * as ns from './foo'
(uses babylonexportExtensions
plugin) - Renaming as default
export { foo, bar as default }
- Renaming during destructure
export const { foo, bar: baz } = someObject
- Default values
export const { foo, bar = {a:1, b:2} } = someObject
- Rename during destructure with defaults:
export const { foo, bar: baz = {a: 1, b: 2} } = someObject
- Rest parameter
export const { foo, ...bar } = someObject
- Array destructure
export const [ foo, bar ] = someObject
- Array rest parameter
export const [ foo, ...bar ] = someObject
- Recursive export from file
Big thanks to @dabbott and @coagmano for their work that went into this release!
v2.5.0
- Recognize default parameter assignment (e.g.
function foo(bar = 123) {}
) and array destructuring (e.g.const [foo] = bar;
) when finding undefined identifiers. - The list of unresolved imports now uses the import statement (e.g.
import foo from 'foo';
instead of the module name and full absolute path (e.g.foo /Users/someone/path/to/repo/node_modules/foo
). - The list of unresolved imports is now sorted by path distance to the current file.
- The
excludes
configuration can now be used to exclude packages in the node_modules directory. - Fixed crash when encountering dynamic import syntax.
Thanks to @dabbott for most of the work that went into this release!
v2.4.0
- Fix broken paths on Windows machines (#413 by @rndmerle)
- Add full text search, making it possible to use import-js in autocomplete plugins (see https://github.com/billyvg/deoplete-import-js) (#414 by @billyvg)
- Fix finding exports when using conditional exporting (e.g.
module.exports a ? require('b') : require('c');
).
Because the schema was changed for the exports storage, you'll see a message (once) after installing this version:
ImportJS is initializing for /path/to/project. Results will be more accurate in a few moments.
The storage will then be re-initialized, but you'll be good to go soon after.