Skip to content

Commit

Permalink
Merge pull request #487 from kahless/issue-484
Browse files Browse the repository at this point in the history
Removed "namedExports" from deprecated options (fixes #484)
  • Loading branch information
trotzig authored Mar 16, 2018
2 parents f817e26 + 8d3b267 commit 6d90ded
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ environments: ['meteor', 'node']

### `namedExports`

*Note: this configuration is deprecated since 2.1.0 and will go away in a
future version*. ImportJS now finds your named exports automatically. If you
end up having to use this configuration anyway, there might be a bug in the
exports-finding parts of ImportJS. [File an
issue](https://github.com/Galooshi/import-js/issues) and tell us about it!
*Note: Since 2.1.0 ImportJS finds your named exports automatically. Most
likely you don't need this option. If you end up having to use this
configuration anyway, there might be a bug in the exports-finding parts of
ImportJS. [File an issue](https://github.com/Galooshi/import-js/issues) and
tell us about it!

If you have an ES6/ES2015 module that exports multiple things (named exports),
or a CommonJS module that exports an object with properties on it that you want
Expand Down
4 changes: 1 addition & 3 deletions lib/Configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ const KNOWN_CONFIGURATION_OPTIONS = [
'emptyLineBetweenGroups',
];

const DEPRECATED_CONFIGURATION_OPTIONS = [
'namedExports',
];
const DEPRECATED_CONFIGURATION_OPTIONS = [];

const ENVIRONMENTS = {
node: nodeEnvironment,
Expand Down
15 changes: 8 additions & 7 deletions lib/__tests__/Configuration-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,13 +1019,14 @@ export { barbazCorge };
});
});

it('has a deprecation message', () => {
const configuration = new Configuration();
expect(configuration.messages).toEqual([
'Using namedExports to configure ImportJS is deprecated and will ' +
'go away in a future version.',
]);
});
// Perhaps we will need this later.
// it('has a deprecation message', () => {
// const configuration = new Configuration();
// expect(configuration.messages).toEqual([
// 'Using namedExports to configure ImportJS is deprecated and will ' +
// 'go away in a future version.',
// ]);
// });

it('merges user, meteor and found namedExports', () => {
expect(new Configuration().get('namedExports')).toEqual({
Expand Down

0 comments on commit 6d90ded

Please sign in to comment.