Releases: Galooshi/import-js
v6.0.0
What's Changed
Breaking
- No more implicit React identifiers by @mikabytes in #609
- Add configuration validation and refactor handling of unknown identifiers by @mikabytes in #612
Features
- Provide the option to override parser plugins in configuration by @mikabytes in #611
Other
- Replace Travis with GitHub Actions, support node 18 + 20 by @trotzig in #599
- Update all dependencies by @trotzig in #603
- Update jest to latest version by @trotzig in #607
- 594 move to prettier abandon eslint by @mikabytes in #598
- Move prettier to devDependency, don't run prettier on package-lock.json by @mikabytes in #610
- README to stop lying about react imports by @mikabytes in #613
- README: sort config options by @mikabytes in #614
- Bump ip from 2.0.0 to 2.0.1 by @dependabot in #618
- Disable codeclimate when env var is missing by @trotzig in #620
- Bump tar from 6.2.0 to 6.2.1 by @dependabot in #621
- Remove flow type annotations, set up ESLint by @lencioni in #623
- Bump braces and babel-jest by @dependabot in #624
New Contributors
- @dependabot made their first contribution in #618
Full Changelog: v5.1.0...v6.0.0
v5.1.0
v5.0.0
v4.0.2
v4.0.1
v4.0.0
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
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
}
}