@rollup/plugin-node-resolve 13.2.1 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var path = require('path');
6
- var builtinList = require('builtin-modules');
6
+ var isBuiltinModule = require('is-builtin-module');
7
7
  var deepMerge = require('deepmerge');
8
8
  var isModule = require('is-module');
9
9
  var fs = require('fs');
@@ -15,13 +15,13 @@ var pluginutils = require('@rollup/pluginutils');
15
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
16
 
17
17
  var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
18
- var builtinList__default = /*#__PURE__*/_interopDefaultLegacy(builtinList);
18
+ var isBuiltinModule__default = /*#__PURE__*/_interopDefaultLegacy(isBuiltinModule);
19
19
  var deepMerge__default = /*#__PURE__*/_interopDefaultLegacy(deepMerge);
20
20
  var isModule__default = /*#__PURE__*/_interopDefaultLegacy(isModule);
21
21
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
22
22
  var resolve__default = /*#__PURE__*/_interopDefaultLegacy(resolve);
23
23
 
24
- var version = "13.2.1";
24
+ var version = "14.0.0";
25
25
 
26
26
  util.promisify(fs__default["default"].access);
27
27
  const readFile$1 = util.promisify(fs__default["default"].readFile);
@@ -922,7 +922,6 @@ async function resolveImportSpecifiers({
922
922
 
923
923
  /* eslint-disable no-param-reassign, no-shadow, no-undefined */
924
924
 
925
- const builtins = new Set(builtinList__default["default"]);
926
925
  const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js';
927
926
  const deepFreeze = (object) => {
928
927
  Object.freeze(object);
@@ -992,7 +991,7 @@ function nodeResolve(opts = {}) {
992
991
  const browserMapCache = new Map();
993
992
  let preserveSymlinks;
994
993
 
995
- const doResolveId = async (context, importee, importer, custom) => {
994
+ const resolveLikeNode = async (context, importee, importer, custom) => {
996
995
  // strip query params from import
997
996
  const [importPath, params] = importee.split('?');
998
997
  const importSuffix = `${params ? `?${params}` : ''}`;
@@ -1081,7 +1080,7 @@ function nodeResolve(opts = {}) {
1081
1080
  ignoreSideEffectsForRoot
1082
1081
  });
1083
1082
 
1084
- const importeeIsBuiltin = builtins.has(importee);
1083
+ const importeeIsBuiltin = isBuiltinModule__default["default"](importee);
1085
1084
  const resolved =
1086
1085
  importeeIsBuiltin && preferBuiltins
1087
1086
  ? {
@@ -1151,14 +1150,14 @@ function nodeResolve(opts = {}) {
1151
1150
 
1152
1151
  version,
1153
1152
 
1154
- buildStart(options) {
1155
- rollupOptions = options;
1153
+ buildStart(buildOptions) {
1154
+ rollupOptions = buildOptions;
1156
1155
 
1157
1156
  for (const warning of warnings) {
1158
1157
  this.warn(warning);
1159
1158
  }
1160
1159
 
1161
- ({ preserveSymlinks } = options);
1160
+ ({ preserveSymlinks } = buildOptions);
1162
1161
  },
1163
1162
 
1164
1163
  generateBundle() {
@@ -1167,34 +1166,52 @@ function nodeResolve(opts = {}) {
1167
1166
  isDirCached.clear();
1168
1167
  },
1169
1168
 
1170
- async resolveId(importee, importer, resolveOptions) {
1171
- if (importee === ES6_BROWSER_EMPTY) {
1172
- return importee;
1173
- }
1174
- // ignore IDs with null character, these belong to other plugins
1175
- if (/\0/.test(importee)) return null;
1169
+ resolveId: {
1170
+ order: 'post',
1171
+ async handler(importee, importer, resolveOptions) {
1172
+ if (importee === ES6_BROWSER_EMPTY) {
1173
+ return importee;
1174
+ }
1175
+ // ignore IDs with null character, these belong to other plugins
1176
+ if (/\0/.test(importee)) return null;
1176
1177
 
1177
- if (/\0/.test(importer)) {
1178
- importer = undefined;
1179
- }
1178
+ const { custom = {} } = resolveOptions;
1179
+ const { 'node-resolve': { resolved: alreadyResolved } = {} } = custom;
1180
+ if (alreadyResolved) {
1181
+ return alreadyResolved;
1182
+ }
1180
1183
 
1181
- const resolved = await doResolveId(this, importee, importer, resolveOptions.custom);
1182
- if (resolved) {
1183
- const resolvedResolved = await this.resolve(
1184
- resolved.id,
1185
- importer,
1186
- Object.assign({ skipSelf: true }, resolveOptions)
1187
- );
1188
- if (resolvedResolved) {
1189
- // Handle plugins that manually make the result external
1190
- if (resolvedResolved.external) {
1191
- return false;
1184
+ if (/\0/.test(importer)) {
1185
+ importer = undefined;
1186
+ }
1187
+
1188
+ const resolved = await resolveLikeNode(this, importee, importer, custom);
1189
+ if (resolved) {
1190
+ // This way, plugins may attach additional meta information to the
1191
+ // resolved id or make it external. We do not skip node-resolve here
1192
+ // because another plugin might again use `this.resolve` in its
1193
+ // `resolveId` hook, in which case we want to add the correct
1194
+ // `moduleSideEffects` information.
1195
+ const resolvedResolved = await this.resolve(resolved.id, importer, {
1196
+ ...resolveOptions,
1197
+ custom: { ...custom, 'node-resolve': { resolved } }
1198
+ });
1199
+ if (resolvedResolved) {
1200
+ // Handle plugins that manually make the result external
1201
+ if (resolvedResolved.external) {
1202
+ return false;
1203
+ }
1204
+ // Allow other plugins to take over resolution. Rollup core will not
1205
+ // change the id if it corresponds to an existing file
1206
+ if (resolvedResolved.id !== resolved.id) {
1207
+ return resolvedResolved;
1208
+ }
1209
+ // Pass on meta information added by other plugins
1210
+ return { ...resolved, meta: resolvedResolved.meta };
1192
1211
  }
1193
- // Pass on meta information added by other plugins
1194
- return { ...resolved, meta: resolvedResolved.meta };
1195
1212
  }
1213
+ return resolved;
1196
1214
  }
1197
- return resolved;
1198
1215
  },
1199
1216
 
1200
1217
  load(importee) {
package/dist/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import path, { dirname, resolve, extname, normalize, sep } from 'path';
2
- import builtinList from 'builtin-modules';
2
+ import isBuiltinModule from 'is-builtin-module';
3
3
  import deepMerge from 'deepmerge';
4
4
  import isModule from 'is-module';
5
5
  import fs, { realpathSync } from 'fs';
@@ -8,7 +8,7 @@ import { pathToFileURL, fileURLToPath } from 'url';
8
8
  import resolve$1 from 'resolve';
9
9
  import { createFilter } from '@rollup/pluginutils';
10
10
 
11
- var version = "13.2.1";
11
+ var version = "14.0.0";
12
12
 
13
13
  promisify(fs.access);
14
14
  const readFile$1 = promisify(fs.readFile);
@@ -909,7 +909,6 @@ async function resolveImportSpecifiers({
909
909
 
910
910
  /* eslint-disable no-param-reassign, no-shadow, no-undefined */
911
911
 
912
- const builtins = new Set(builtinList);
913
912
  const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js';
914
913
  const deepFreeze = (object) => {
915
914
  Object.freeze(object);
@@ -979,7 +978,7 @@ function nodeResolve(opts = {}) {
979
978
  const browserMapCache = new Map();
980
979
  let preserveSymlinks;
981
980
 
982
- const doResolveId = async (context, importee, importer, custom) => {
981
+ const resolveLikeNode = async (context, importee, importer, custom) => {
983
982
  // strip query params from import
984
983
  const [importPath, params] = importee.split('?');
985
984
  const importSuffix = `${params ? `?${params}` : ''}`;
@@ -1068,7 +1067,7 @@ function nodeResolve(opts = {}) {
1068
1067
  ignoreSideEffectsForRoot
1069
1068
  });
1070
1069
 
1071
- const importeeIsBuiltin = builtins.has(importee);
1070
+ const importeeIsBuiltin = isBuiltinModule(importee);
1072
1071
  const resolved =
1073
1072
  importeeIsBuiltin && preferBuiltins
1074
1073
  ? {
@@ -1138,14 +1137,14 @@ function nodeResolve(opts = {}) {
1138
1137
 
1139
1138
  version,
1140
1139
 
1141
- buildStart(options) {
1142
- rollupOptions = options;
1140
+ buildStart(buildOptions) {
1141
+ rollupOptions = buildOptions;
1143
1142
 
1144
1143
  for (const warning of warnings) {
1145
1144
  this.warn(warning);
1146
1145
  }
1147
1146
 
1148
- ({ preserveSymlinks } = options);
1147
+ ({ preserveSymlinks } = buildOptions);
1149
1148
  },
1150
1149
 
1151
1150
  generateBundle() {
@@ -1154,34 +1153,52 @@ function nodeResolve(opts = {}) {
1154
1153
  isDirCached.clear();
1155
1154
  },
1156
1155
 
1157
- async resolveId(importee, importer, resolveOptions) {
1158
- if (importee === ES6_BROWSER_EMPTY) {
1159
- return importee;
1160
- }
1161
- // ignore IDs with null character, these belong to other plugins
1162
- if (/\0/.test(importee)) return null;
1156
+ resolveId: {
1157
+ order: 'post',
1158
+ async handler(importee, importer, resolveOptions) {
1159
+ if (importee === ES6_BROWSER_EMPTY) {
1160
+ return importee;
1161
+ }
1162
+ // ignore IDs with null character, these belong to other plugins
1163
+ if (/\0/.test(importee)) return null;
1163
1164
 
1164
- if (/\0/.test(importer)) {
1165
- importer = undefined;
1166
- }
1165
+ const { custom = {} } = resolveOptions;
1166
+ const { 'node-resolve': { resolved: alreadyResolved } = {} } = custom;
1167
+ if (alreadyResolved) {
1168
+ return alreadyResolved;
1169
+ }
1167
1170
 
1168
- const resolved = await doResolveId(this, importee, importer, resolveOptions.custom);
1169
- if (resolved) {
1170
- const resolvedResolved = await this.resolve(
1171
- resolved.id,
1172
- importer,
1173
- Object.assign({ skipSelf: true }, resolveOptions)
1174
- );
1175
- if (resolvedResolved) {
1176
- // Handle plugins that manually make the result external
1177
- if (resolvedResolved.external) {
1178
- return false;
1171
+ if (/\0/.test(importer)) {
1172
+ importer = undefined;
1173
+ }
1174
+
1175
+ const resolved = await resolveLikeNode(this, importee, importer, custom);
1176
+ if (resolved) {
1177
+ // This way, plugins may attach additional meta information to the
1178
+ // resolved id or make it external. We do not skip node-resolve here
1179
+ // because another plugin might again use `this.resolve` in its
1180
+ // `resolveId` hook, in which case we want to add the correct
1181
+ // `moduleSideEffects` information.
1182
+ const resolvedResolved = await this.resolve(resolved.id, importer, {
1183
+ ...resolveOptions,
1184
+ custom: { ...custom, 'node-resolve': { resolved } }
1185
+ });
1186
+ if (resolvedResolved) {
1187
+ // Handle plugins that manually make the result external
1188
+ if (resolvedResolved.external) {
1189
+ return false;
1190
+ }
1191
+ // Allow other plugins to take over resolution. Rollup core will not
1192
+ // change the id if it corresponds to an existing file
1193
+ if (resolvedResolved.id !== resolved.id) {
1194
+ return resolvedResolved;
1195
+ }
1196
+ // Pass on meta information added by other plugins
1197
+ return { ...resolved, meta: resolvedResolved.meta };
1179
1198
  }
1180
- // Pass on meta information added by other plugins
1181
- return { ...resolved, meta: resolvedResolved.meta };
1182
1199
  }
1200
+ return resolved;
1183
1201
  }
1184
- return resolved;
1185
1202
  },
1186
1203
 
1187
1204
  load(importee) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/plugin-node-resolve",
3
- "version": "13.2.1",
3
+ "version": "14.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -52,13 +52,13 @@
52
52
  "modules"
53
53
  ],
54
54
  "peerDependencies": {
55
- "rollup": "^2.42.0"
55
+ "rollup": "^2.78.0"
56
56
  },
57
57
  "dependencies": {
58
58
  "@rollup/pluginutils": "^3.1.0",
59
59
  "@types/resolve": "1.17.1",
60
- "builtin-modules": "^3.1.0",
61
60
  "deepmerge": "^4.2.2",
61
+ "is-builtin-module": "^3.1.0",
62
62
  "is-module": "^1.0.0",
63
63
  "resolve": "^1.19.0"
64
64
  },
@@ -66,10 +66,10 @@
66
66
  "@babel/core": "^7.10.5",
67
67
  "@babel/plugin-transform-typescript": "^7.10.5",
68
68
  "@rollup/plugin-babel": "^5.1.0",
69
- "@rollup/plugin-commonjs": "^16.0.0",
69
+ "@rollup/plugin-commonjs": "^22.0.2",
70
70
  "@rollup/plugin-json": "^4.1.0",
71
71
  "es5-ext": "^0.10.53",
72
- "rollup": "^2.67.3",
72
+ "rollup": "^2.78.1",
73
73
  "source-map": "^0.7.3",
74
74
  "string-capitalize": "^1.0.1"
75
75
  },
package/CHANGELOG.md DELETED
@@ -1,534 +0,0 @@
1
- # @rollup/plugin-node-resolve ChangeLog
2
-
3
- ## v13.2.1
4
-
5
- _2022-04-15_
6
-
7
- ### Bugfixes
8
-
9
- - fix: update side effects logic to be deep when glob doesn’t contain `/` (#1148)
10
-
11
- ## v13.2.0
12
-
13
- _2022-04-11_
14
-
15
- ### Features
16
-
17
- - feat: Add the ability to pass a function into resolveOnly (#1152)
18
-
19
- ## v13.1.3
20
-
21
- _2022-01-05_
22
-
23
- ### Bugfixes
24
-
25
- - fix: use correct version when published (#1063)
26
-
27
- ## v13.1.2
28
-
29
- _2021-12-31_
30
-
31
- ### Bugfixes
32
-
33
- - fix: forward meta-information from other plugins (#1062)
34
-
35
- ## v13.1.1
36
-
37
- _2021-12-13_
38
-
39
- ### Updates
40
-
41
- - test: add tests for mixing custom `exportConditions` with `browser: true` (#1043)
42
-
43
- ## v13.1.0
44
-
45
- _2021-12-13_
46
-
47
- ### Features
48
-
49
- - feat: expose plugin version (#1050)
50
-
51
- ## v13.0.6
52
-
53
- _2021-10-19_
54
-
55
- ### Bugfixes
56
-
57
- - fix: pass on isEntry flag (#1016)
58
-
59
- ## v13.0.5
60
-
61
- _2021-09-21_
62
-
63
- ### Updates
64
-
65
- - docs: fix readme heading depth (#999)
66
-
67
- ## v13.0.4
68
-
69
- _2021-07-24_
70
-
71
- ### Bugfixes
72
-
73
- - fix: Fix bug where JS import was converted to a TS import, resulting in an error when using export maps (#921)
74
-
75
- ## v13.0.3
76
-
77
- _2021-07-24_
78
-
79
- ### Bugfixes
80
-
81
- - fix: handle browser-mapped paths correctly in nested contexts (#920)
82
-
83
- ## v13.0.2
84
-
85
- _2021-07-15_
86
-
87
- ### Bugfixes
88
-
89
- - fix: handle "package.json" being in path (#927)
90
-
91
- ## v13.0.1
92
-
93
- _2021-07-15_
94
-
95
- ### Updates
96
-
97
- - docs: Document how to get Node.js exports resolution (#884)
98
-
99
- ## v13.0.0
100
-
101
- _2021-05-04_
102
-
103
- ### Breaking Changes
104
-
105
- - fix!: mark module as external if resolved module is external (#799)
106
-
107
- ### Features
108
-
109
- - feat: Follow up to #843, refining exports and browser field interaction (#866)
110
-
111
- ## v12.0.0
112
-
113
- _2021-05-04_
114
-
115
- ### Breaking Changes
116
-
117
- - fix!: mark module as external if resolved module is external (#799)
118
-
119
- ### Features
120
-
121
- - feat: Follow up to #843, refining exports and browser field interaction (#866)
122
-
123
- ## v11.2.1
124
-
125
- _2021-03-26_
126
-
127
- ### Bugfixes
128
-
129
- - fix: fs.exists is incorrectly promisified (#835)
130
-
131
- ## v11.2.0
132
-
133
- _2021-02-14_
134
-
135
- ### Features
136
-
137
- - feat: add `ignoreSideEffectsForRoot` option (#694)
138
-
139
- ### Updates
140
-
141
- - chore: mark `url` as an external and throw on warning (#783)
142
- - docs: clearer "Resolving Built-Ins" doc (#782)
143
-
144
- ## v11.1.1
145
-
146
- _2021-01-29_
147
-
148
- ### Bugfixes
149
-
150
- - fix: only log last resolve error (#750)
151
-
152
- ### Updates
153
-
154
- - docs: add clarification on the order of package entrypoints (#768)
155
-
156
- ## v11.1.0
157
-
158
- _2021-01-15_
159
-
160
- ### Features
161
-
162
- - feat: support pkg imports and export array (#693)
163
-
164
- ## v11.0.1
165
-
166
- _2020-12-14_
167
-
168
- ### Bugfixes
169
-
170
- - fix: export map specificity (#675)
171
- - fix: add missing type import (#668)
172
-
173
- ### Updates
174
-
175
- - docs: corrected word "yse" to "use" (#723)
176
-
177
- ## v11.0.0
178
-
179
- _2020-11-30_
180
-
181
- ### Breaking Changes
182
-
183
- - refactor!: simplify builtins and remove `customResolveOptions` (#656)
184
- - feat!: Mark built-ins as external (#627)
185
- - feat!: support package entry points (#540)
186
-
187
- ### Bugfixes
188
-
189
- - fix: refactor handling builtins, do not log warning if no local version (#637)
190
-
191
- ### Updates
192
-
193
- - docs: fix import statements in examples in README.md (#646)
194
-
195
- ## v10.0.0
196
-
197
- _2020-10-27_
198
-
199
- ### Breaking Changes
200
-
201
- - fix!: resolve hash in path (#588)
202
-
203
- ### Bugfixes
204
-
205
- - fix: do not ignore exceptions (#564)
206
-
207
- ## v9.0.0
208
-
209
- _2020-08-13_
210
-
211
- ### Breaking Changes
212
-
213
- - chore: update dependencies (e632469)
214
-
215
- ### Updates
216
-
217
- - refactor: remove deep-freeze from dependencies (#529)
218
- - chore: clean up changelog (84dfddb)
219
-
220
- ## v8.4.0
221
-
222
- _2020-07-12_
223
-
224
- ### Features
225
-
226
- - feat: preserve search params and hashes (#487)
227
- - feat: support .js imports in TypeScript (#480)
228
-
229
- ### Updates
230
-
231
- - docs: fix named export use in readme (#456)
232
- - docs: correct mainFields valid values (#469)
233
-
234
- ## v8.1.0
235
-
236
- _2020-06-22_
237
-
238
- ### Features
239
-
240
- - feat: add native node es modules support (#413)
241
-
242
- ## v8.0.1
243
-
244
- _2020-06-05_
245
-
246
- ### Bugfixes
247
-
248
- - fix: handle nested entry modules with the resolveOnly option (#430)
249
-
250
- ## v8.0.0
251
-
252
- _2020-05-20_
253
-
254
- ### Breaking Changes
255
-
256
- - feat: Add default export (#361)
257
- - feat: export defaults (#301)
258
-
259
- ### Bugfixes
260
-
261
- - fix: resolve local files if `resolveOption` is set (#337)
262
-
263
- ### Updates
264
-
265
- - docs: correct misspelling (#343)
266
-
267
- ## v7.1.3
268
-
269
- _2020-04-12_
270
-
271
- ### Bugfixes
272
-
273
- - fix: resolve symlinked entry point properly (#291)
274
-
275
- ## v7.1.2
276
-
277
- _2020-04-12_
278
-
279
- ### Updates
280
-
281
- - docs: fix url (#289)
282
-
283
- ## v7.1.1
284
-
285
- _2020-02-03_
286
-
287
- ### Bugfixes
288
-
289
- - fix: main fields regression (#196)
290
-
291
- ## v7.1.0
292
-
293
- _2020-02-01_
294
-
295
- ### Updates
296
-
297
- - refactor: clean codebase and fix external warnings (#155)
298
-
299
- ## v7.0.0
300
-
301
- _2020-01-07_
302
-
303
- ### Breaking Changes
304
-
305
- - feat: dedupe by package name (#99)
306
-
307
- ## v6.1.0
308
-
309
- _2020-01-04_
310
-
311
- ### Bugfixes
312
-
313
- - fix: allow deduplicating custom module dirs (#101)
314
-
315
- ### Features
316
-
317
- - feat: add rootDir option (#98)
318
-
319
- ### Updates
320
-
321
- - docs: improve doc related to mainFields (#138)
322
-
323
- ## 6.0.0
324
-
325
- _2019-11-25_
326
-
327
- - **Breaking:** Minimum compatible Rollup version is 1.20.0
328
- - **Breaking:** Minimum supported Node version is 8.0.0
329
- - Published as @rollup/plugin-node-resolve
330
-
331
- ## 5.2.1 (unreleased)
332
-
333
- - add missing MIT license file ([#233](https://github.com/rollup/rollup-plugin-node-resolve/pull/233) by @kenjiO)
334
- - Fix incorrect example of config ([#239](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @myshov)
335
- - Fix typo in readme ([#240](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @LinusU)
336
-
337
- ## 5.2.0 (2019-06-29)
338
-
339
- - dedupe accepts a function ([#225](https://github.com/rollup/rollup-plugin-node-resolve/pull/225) by @manucorporat)
340
-
341
- ## 5.1.1 (2019-06-29)
342
-
343
- - Move Rollup version check to buildStart hook to avoid issues ([#232](https://github.com/rollup/rollup-plugin-node-resolve/pull/232) by @lukastaegert)
344
-
345
- ## 5.1.0 (2019-06-22)
346
-
347
- - Fix path fragment inputs ([#229](https://github.com/rollup/rollup-plugin-node-resolve/pull/229) by @bterlson)
348
-
349
- ## 5.0.4 (2019-06-22)
350
-
351
- - Treat sideEffects array as inclusion list ([#227](https://github.com/rollup/rollup-plugin-node-resolve/pull/227) by @mikeharder)
352
-
353
- ## 5.0.3 (2019-06-16)
354
-
355
- - Make empty.js a virtual module ([#224](https://github.com/rollup/rollup-plugin-node-resolve/pull/224) by @manucorporat)
356
-
357
- ## 5.0.2 (2019-06-13)
358
-
359
- - Support resolve 1.11.1, add built-in test ([#223](https://github.com/rollup/rollup-plugin-node-resolve/pull/223) by @bterlson)
360
-
361
- ## 5.0.1 (2019-05-31)
362
-
363
- - Update to resolve@1.11.0 for better performance ([#220](https://github.com/rollup/rollup-plugin-node-resolve/pull/220) by @keithamus)
364
-
365
- ## 5.0.0 (2019-05-15)
366
-
367
- - Replace bublé with babel, update dependencies ([#216](https://github.com/rollup/rollup-plugin-node-resolve/pull/216) by @mecurc)
368
- - Handle module side-effects ([#219](https://github.com/rollup/rollup-plugin-node-resolve/pull/219) by @lukastaegert)
369
-
370
- ### Breaking Changes
371
-
372
- - Requires at least rollup@1.11.0 to work (v1.12.0 for module side-effects to be respected)
373
- - If used with rollup-plugin-commonjs, it should be at least v10.0.0
374
-
375
- ## 4.2.4 (2019-05-11)
376
-
377
- - Add note on builtins to Readme ([#215](https://github.com/rollup/rollup-plugin-node-resolve/pull/215) by @keithamus)
378
- - Add issue templates ([#217](https://github.com/rollup/rollup-plugin-node-resolve/pull/217) by @mecurc)
379
- - Improve performance by caching `isDir` ([#218](https://github.com/rollup/rollup-plugin-node-resolve/pull/218) by @keithamus)
380
-
381
- ## 4.2.3 (2019-04-11)
382
-
383
- - Fix ordering of jsnext:main when using the jsnext option ([#209](https://github.com/rollup/rollup-plugin-node-resolve/pull/209) by @lukastaegert)
384
-
385
- ## 4.2.2 (2019-04-10)
386
-
387
- - Fix TypeScript typings (rename and export Options interface) ([#206](https://github.com/rollup/rollup-plugin-node-resolve/pull/206) by @Kocal)
388
- - Fix mainfields typing ([#207](https://github.com/rollup/rollup-plugin-node-resolve/pull/207) by @nicolashenry)
389
-
390
- ## 4.2.1 (2019-04-06)
391
-
392
- - Respect setting the deprecated fields "module", "main", and "jsnext" ([#204](https://github.com/rollup/rollup-plugin-node-resolve/pull/204) by @nick-woodward)
393
-
394
- ## 4.2.0 (2019-04-06)
395
-
396
- - Add new mainfields option ([#182](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @keithamus)
397
- - Added dedupe option to prevent bundling the same package multiple times ([#201](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @sormy)
398
-
399
- ## 4.1.0 (2019-04-05)
400
-
401
- - Add TypeScript typings ([#189](https://github.com/rollup/rollup-plugin-node-resolve/pull/189) by @NotWoods)
402
- - Update dependencies ([#202](https://github.com/rollup/rollup-plugin-node-resolve/pull/202) by @lukastaegert)
403
-
404
- ## 4.0.1 (2019-02-22)
405
-
406
- - Fix issue when external modules are specified in `package.browser` ([#143](https://github.com/rollup/rollup-plugin-node-resolve/pull/143) by @keithamus)
407
- - Fix `package.browser` mapping issue when `false` is specified ([#183](https://github.com/rollup/rollup-plugin-node-resolve/pull/183) by @allex)
408
-
409
- ## 4.0.0 (2018-12-09)
410
-
411
- This release will support rollup@1.0
412
-
413
- ### Features
414
-
415
- - Resolve modules used to define manual chunks ([#185](https://github.com/rollup/rollup-plugin-node-resolve/pull/185) by @mcshaman)
416
- - Update dependencies and plugin hook usage ([#187](https://github.com/rollup/rollup-plugin-node-resolve/pull/187) by @lukastaegert)
417
-
418
- ## 3.4.0 (2018-09-04)
419
-
420
- This release now supports `.mjs` files by default
421
-
422
- ### Features
423
-
424
- - feat: Support .mjs files by default (https://github.com/rollup/rollup-plugin-node-resolve/pull/151, by @leebyron)
425
-
426
- ## 3.3.0 (2018-03-17)
427
-
428
- This release adds the `only` option
429
-
430
- ### New Features
431
-
432
- - feat: add `only` option (#83; @arantes555)
433
-
434
- ### Docs
435
-
436
- - docs: correct description of `jail` option (#120; @GeorgeTaveras1231)
437
-
438
- ## 3.2.0 (2018-03-07)
439
-
440
- This release caches reading/statting of files, to improve speed.
441
-
442
- ### Performance Improvements
443
-
444
- - perf: cache file stats/reads (#126; @keithamus)
445
-
446
- ## 3.0.4 (unreleased)
447
-
448
- - Update lockfile [#137](https://github.com/rollup/rollup-plugin-node-resolve/issues/137)
449
- - Update rollup dependency [#138](https://github.com/rollup/rollup-plugin-node-resolve/issues/138)
450
- - Enable installation from Github [#142](https://github.com/rollup/rollup-plugin-node-resolve/issues/142)
451
-
452
- ## 3.0.3
453
-
454
- - Fix [#130](https://github.com/rollup/rollup-plugin-node-resolve/issues/130) and [#131](https://github.com/rollup/rollup-plugin-node-resolve/issues/131)
455
-
456
- ## 3.0.2
457
-
458
- - Ensure `pkg.browser` is an object if necessary ([#129](https://github.com/rollup/rollup-plugin-node-resolve/pull/129))
459
-
460
- ## 3.0.1
461
-
462
- - Remove `browser-resolve` dependency ([#127](https://github.com/rollup/rollup-plugin-node-resolve/pull/127))
463
-
464
- ## 3.0.0
465
-
466
- - [BREAKING] Remove `options.skip` ([#90](https://github.com/rollup/rollup-plugin-node-resolve/pull/90))
467
- - Add `modulesOnly` option ([#96](https://github.com/rollup/rollup-plugin-node-resolve/pull/96))
468
-
469
- ## 2.1.1
470
-
471
- - Prevent `jail` from breaking builds on Windows ([#93](https://github.com/rollup/rollup-plugin-node-resolve/issues/93))
472
-
473
- ## 2.1.0
474
-
475
- - Add `jail` option ([#53](https://github.com/rollup/rollup-plugin-node-resolve/pull/53))
476
- - Add `customResolveOptions` option ([#79](https://github.com/rollup/rollup-plugin-node-resolve/pull/79))
477
- - Support symlinked packages ([#82](https://github.com/rollup/rollup-plugin-node-resolve/pull/82))
478
-
479
- ## 2.0.0
480
-
481
- - Add support `module` field in package.json as an official alternative to jsnext
482
-
483
- ## 1.7.3
484
-
485
- - Error messages are more descriptive ([#50](https://github.com/rollup/rollup-plugin-node-resolve/issues/50))
486
-
487
- ## 1.7.2
488
-
489
- - Allow entry point paths beginning with ./
490
-
491
- ## 1.7.1
492
-
493
- - Return a `name`
494
-
495
- ## 1.7.0
496
-
497
- - Allow relative IDs to be external ([#32](https://github.com/rollup/rollup-plugin-node-resolve/pull/32))
498
-
499
- ## 1.6.0
500
-
501
- - Skip IDs containing null character
502
-
503
- ## 1.5.0
504
-
505
- - Prefer built-in options, but allow opting out ([#28](https://github.com/rollup/rollup-plugin-node-resolve/pull/28))
506
-
507
- ## 1.4.0
508
-
509
- - Pass `options.extensions` through to `node-resolve`
510
-
511
- ## 1.3.0
512
-
513
- - `skip: true` skips all packages that don't satisfy the `main` or `jsnext` options ([#16](https://github.com/rollup/rollup-plugin-node-resolve/pull/16))
514
-
515
- ## 1.2.1
516
-
517
- - Support scoped packages in `skip` option ([#15](https://github.com/rollup/rollup-plugin-node-resolve/issues/15))
518
-
519
- ## 1.2.0
520
-
521
- - Support `browser` field ([#8](https://github.com/rollup/rollup-plugin-node-resolve/issues/8))
522
- - Get tests to pass on Windows
523
-
524
- ## 1.1.0
525
-
526
- - Use node-resolve to handle various corner cases
527
-
528
- ## 1.0.0
529
-
530
- - Add ES6 build, use Rollup 0.20.0
531
-
532
- ## 0.1.0
533
-
534
- - First release