From 8d3b2677b34ba076bc5b544bd8399258e4fe4dff Mon Sep 17 00:00:00 2001 From: kahless Date: Fri, 16 Mar 2018 20:11:28 +0300 Subject: [PATCH] Removed "namedExports" from deprecated options (fixes #484) --- README.md | 10 +++++----- lib/Configuration.js | 4 +--- lib/__tests__/Configuration-test.js | 15 ++++++++------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4990f05a..0ad01c1c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lib/Configuration.js b/lib/Configuration.js index 5af916a9..bd2fccbf 100644 --- a/lib/Configuration.js +++ b/lib/Configuration.js @@ -109,9 +109,7 @@ const KNOWN_CONFIGURATION_OPTIONS = [ 'emptyLineBetweenGroups', ]; -const DEPRECATED_CONFIGURATION_OPTIONS = [ - 'namedExports', -]; +const DEPRECATED_CONFIGURATION_OPTIONS = []; const ENVIRONMENTS = { node: nodeEnvironment, diff --git a/lib/__tests__/Configuration-test.js b/lib/__tests__/Configuration-test.js index 2f4961e0..20d44c13 100644 --- a/lib/__tests__/Configuration-test.js +++ b/lib/__tests__/Configuration-test.js @@ -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({