jass 0.9.1 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/jass.rb +5 -0
  4. data/lib/jass/compiler.rb +5 -0
  5. data/lib/jass/plugin.rb +2 -1
  6. data/lib/jass/version.rb +1 -1
  7. data/vendor/node_modules/@types/estree/index.d.ts +4 -2
  8. data/vendor/node_modules/@types/estree/package.json +2 -2
  9. data/vendor/node_modules/acorn/bin/_acorn.js +12 -12
  10. data/vendor/node_modules/acorn/bin/run_test262.js +2 -3
  11. data/vendor/node_modules/acorn/bin/test262.whitelist +0 -5
  12. data/vendor/node_modules/acorn/dist/acorn.es.js +76 -68
  13. data/vendor/node_modules/acorn/dist/acorn.js +76 -68
  14. data/vendor/node_modules/acorn/dist/acorn_loose.es.js +42 -30
  15. data/vendor/node_modules/acorn/dist/acorn_loose.js +42 -30
  16. data/vendor/node_modules/acorn/dist/walk.es.js +47 -43
  17. data/vendor/node_modules/acorn/dist/walk.js +47 -43
  18. data/vendor/node_modules/acorn/package.json +9 -5
  19. data/vendor/node_modules/chalk/index.js.flow +93 -0
  20. data/vendor/node_modules/chalk/package.json +8 -3
  21. data/vendor/node_modules/color-convert/conversions.js +36 -29
  22. data/vendor/node_modules/color-convert/package.json +4 -4
  23. data/vendor/node_modules/estree-walker/index.d.ts +17 -0
  24. data/vendor/node_modules/estree-walker/package.json +2 -1
  25. data/vendor/node_modules/fill-range/index.js +2 -2
  26. data/vendor/node_modules/fill-range/package.json +24 -7
  27. data/vendor/node_modules/is-reference/node_modules/@types/estree/index.d.ts +546 -0
  28. data/vendor/node_modules/is-reference/node_modules/@types/estree/package.json +22 -0
  29. data/vendor/node_modules/math-random/browser.js +17 -0
  30. data/vendor/node_modules/math-random/node.js +13 -0
  31. data/vendor/node_modules/math-random/package.json +31 -0
  32. data/vendor/node_modules/math-random/test.js +26 -0
  33. data/vendor/node_modules/nodent-compiler/compiler.js +115 -11
  34. data/vendor/node_modules/nodent-compiler/{lib/output.js → output.js} +0 -0
  35. data/vendor/node_modules/nodent-compiler/package.json +8 -4
  36. data/vendor/node_modules/{nodent-compiler/lib → nodent-transform}/arboriculture.js +1340 -1107
  37. data/vendor/node_modules/nodent-transform/package.json +19 -0
  38. data/vendor/node_modules/path-parse/package.json +1 -1
  39. data/vendor/node_modules/pretty-ms/index.js +2 -1
  40. data/vendor/node_modules/pretty-ms/package.json +2 -3
  41. data/vendor/node_modules/randomatic/index.js +12 -2
  42. data/vendor/node_modules/randomatic/node_modules/is-number/index.js +6 -7
  43. data/vendor/node_modules/randomatic/node_modules/is-number/package.json +9 -16
  44. data/vendor/node_modules/randomatic/node_modules/kind-of/index.js +112 -102
  45. data/vendor/node_modules/randomatic/node_modules/kind-of/package.json +18 -20
  46. data/vendor/node_modules/randomatic/package.json +15 -13
  47. data/vendor/node_modules/repeat-element/index.js +1 -1
  48. data/vendor/node_modules/repeat-element/package.json +27 -22
  49. data/vendor/node_modules/resolve/lib/async.js +20 -17
  50. data/vendor/node_modules/resolve/lib/core.js +2 -2
  51. data/vendor/node_modules/resolve/lib/core.json +4 -1
  52. data/vendor/node_modules/resolve/lib/sync.js +52 -13
  53. data/vendor/node_modules/resolve/package.json +3 -3
  54. data/vendor/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js +50 -12
  55. data/vendor/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.es.js +50 -12
  56. data/vendor/node_modules/rollup-plugin-commonjs/package.json +2 -2
  57. data/vendor/node_modules/rollup-plugin-commonjs/src/index.js +49 -11
  58. data/vendor/node_modules/rollup-plugin-commonjs/src/transform.js +1 -1
  59. data/vendor/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js +82 -85
  60. data/vendor/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js +82 -85
  61. data/vendor/node_modules/rollup-plugin-node-resolve/package.json +1 -1
  62. data/vendor/node_modules/rollup-plugin-node-resolve/src/index.js +81 -84
  63. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +81 -2
  64. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es.js +81 -3
  65. data/vendor/node_modules/rollup-pluginutils/package.json +12 -6
  66. data/vendor/node_modules/rollup-pluginutils/src/attachScopes.js +10 -2
  67. data/vendor/node_modules/rollup-pluginutils/src/dataToEsm.js +69 -0
  68. data/vendor/node_modules/rollup-pluginutils/src/index.js +1 -0
  69. data/vendor/node_modules/supports-color/index.js +1 -5
  70. data/vendor/node_modules/supports-color/package.json +51 -51
  71. data/vendor/yarn.lock +65 -70
  72. metadata +16 -21
  73. data/vendor/node_modules/irregular-plurals/irregular-plurals.json +0 -146
  74. data/vendor/node_modules/irregular-plurals/package.json +0 -39
  75. data/vendor/node_modules/nodent-compiler/lib/parser.js +0 -291
  76. data/vendor/node_modules/path-parse/index.min.js +0 -1
  77. data/vendor/node_modules/path-parse/test.min.js +0 -1
  78. data/vendor/node_modules/plur/index.js +0 -20
  79. data/vendor/node_modules/plur/package.json +0 -42
  80. data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/index.js +0 -116
  81. data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/package.json +0 -90
  82. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es6.js +0 -217
  83. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.es.js +0 -55
  84. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.es6.js +0 -59
  85. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js +0 -65
  86. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/package.json +0 -33
  87. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/src/estree-walker.js +0 -49
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "randomatic",
3
- "description": "Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.",
4
- "version": "1.1.7",
3
+ "description": "Generate randomized strings of a specified length using simple character sequences. The original generate-password.",
4
+ "version": "3.1.0",
5
5
  "homepage": "https://github.com/jonschlinkert/randomatic",
6
6
  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
7
  "contributors": [
8
8
  "Bogdan Chadkin (https://github.com/TrySound)",
9
9
  "Dragos Fotescu (http://dragosfotescu.com)",
10
+ "Faiz ul haque (http://www.10pearls.com)",
10
11
  "Jon Schlinkert (http://twitter.com/jonschlinkert)",
11
- "Paul Miller (paulmillr.com)",
12
- "Sun Knudsen (http://sunknudsen.com)"
12
+ "Michael Rhodes (http://michaelrhod.es)",
13
+ "Paul Miller (https://paulmillr.com)",
14
+ "Rouven Weßling (www.rouvenwessling.de)",
15
+ "Sun Knudsen (https://sunknudsen.com)"
13
16
  ],
14
17
  "repository": "jonschlinkert/randomatic",
15
18
  "bugs": {
@@ -27,16 +30,16 @@
27
30
  "test": "mocha"
28
31
  },
29
32
  "dependencies": {
30
- "is-number": "^3.0.0",
31
- "kind-of": "^4.0.0"
33
+ "is-number": "^4.0.0",
34
+ "kind-of": "^6.0.0",
35
+ "math-random": "^1.0.1"
32
36
  },
33
37
  "devDependencies": {
34
38
  "ansi-bold": "^0.1.1",
35
39
  "benchmarked": "^1.1.1",
36
40
  "glob": "^7.1.2",
37
41
  "gulp-format-md": "^0.1.12",
38
- "mocha": "^3.4.2",
39
- "should": "^11.2.1"
42
+ "mocha": "^3.4.2"
40
43
  },
41
44
  "keywords": [
42
45
  "alpha",
@@ -44,7 +47,10 @@
44
47
  "alphanumeric",
45
48
  "characters",
46
49
  "chars",
50
+ "generate",
51
+ "generate-password",
47
52
  "numeric",
53
+ "password",
48
54
  "rand",
49
55
  "random",
50
56
  "randomatic",
@@ -69,10 +75,6 @@
69
75
  },
70
76
  "lint": {
71
77
  "reflinks": true
72
- },
73
- "reflinks": [
74
- "verb",
75
- "verb-generate-readme"
76
- ]
78
+ }
77
79
  }
78
80
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * repeat-element <https://github.com/jonschlinkert/repeat-element>
3
3
  *
4
- * Copyright (c) 2015 Jon Schlinkert.
4
+ * Copyright (c) 2015-present, Jon Schlinkert.
5
5
  * Licensed under the MIT license.
6
6
  */
7
7
 
@@ -1,23 +1,17 @@
1
1
  {
2
2
  "name": "repeat-element",
3
3
  "description": "Create an array by repeating the given value n times.",
4
- "version": "1.1.2",
4
+ "version": "1.1.3",
5
5
  "homepage": "https://github.com/jonschlinkert/repeat-element",
6
- "author": {
7
- "name": "Jon Schlinkert",
8
- "url": "https://github.com/jonschlinkert"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git://github.com/jonschlinkert/repeat-element.git"
13
- },
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "repository": "jonschlinkert/repeat-element",
14
8
  "bugs": {
15
9
  "url": "https://github.com/jonschlinkert/repeat-element/issues"
16
10
  },
17
- "license": {
18
- "type": "MIT",
19
- "url": "https://github.com/jonschlinkert/repeat-element/blob/master/LICENSE"
20
- },
11
+ "license": "MIT",
12
+ "files": [
13
+ "index.js"
14
+ ],
21
15
  "main": "index.js",
22
16
  "engines": {
23
17
  "node": ">=0.10.0"
@@ -25,20 +19,31 @@
25
19
  "scripts": {
26
20
  "test": "mocha"
27
21
  },
28
- "files": [
29
- "index.js"
30
- ],
22
+ "devDependencies": {
23
+ "benchmarked": "^2.0.0",
24
+ "chalk": "^2.4.1",
25
+ "glob": "^7.1.2",
26
+ "gulp-format-md": "^1.0.0",
27
+ "minimist": "^1.2.0",
28
+ "mocha": "^3.5.3"
29
+ },
31
30
  "keywords": [
32
31
  "array",
33
32
  "element",
34
33
  "repeat",
35
34
  "string"
36
35
  ],
37
- "devDependencies": {
38
- "benchmarked": "^0.1.4",
39
- "chalk": "^1.0.0",
40
- "glob": "^5.0.5",
41
- "minimist": "^1.1.1",
42
- "mocha": "^2.2.4"
36
+ "verb": {
37
+ "toc": false,
38
+ "layout": "default",
39
+ "tasks": [
40
+ "readme"
41
+ ],
42
+ "plugins": [
43
+ "gulp-format-md"
44
+ ],
45
+ "lint": {
46
+ "reflinks": true
47
+ }
43
48
  }
44
49
  }
@@ -4,6 +4,16 @@ var path = require('path');
4
4
  var caller = require('./caller.js');
5
5
  var nodeModulesPaths = require('./node-modules-paths.js');
6
6
 
7
+ var defaultIsFile = function isFile(file, cb) {
8
+ fs.stat(file, function (err, stat) {
9
+ if (!err) {
10
+ return cb(null, stat.isFile() || stat.isFIFO());
11
+ }
12
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
13
+ return cb(err);
14
+ });
15
+ };
16
+
7
17
  module.exports = function resolve(x, options, callback) {
8
18
  var cb = callback;
9
19
  var opts = options || {};
@@ -18,34 +28,27 @@ module.exports = function resolve(x, options, callback) {
18
28
  });
19
29
  }
20
30
 
21
- var isFile = opts.isFile || function (file, cb) {
22
- fs.stat(file, function (err, stat) {
23
- if (!err) {
24
- return cb(null, stat.isFile() || stat.isFIFO());
25
- }
26
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
27
- return cb(err);
28
- });
29
- };
31
+ var isFile = opts.isFile || defaultIsFile;
30
32
  var readFile = opts.readFile || fs.readFile;
31
33
 
32
34
  var extensions = opts.extensions || ['.js'];
33
- var y = opts.basedir || path.dirname(caller());
35
+ var basedir = opts.basedir || path.dirname(caller());
36
+ var parent = opts.filename || basedir;
34
37
 
35
38
  opts.paths = opts.paths || [];
36
39
 
37
40
  if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
38
- var res = path.resolve(y, x);
41
+ var res = path.resolve(basedir, x);
39
42
  if (x === '..' || x.slice(-1) === '/') res += '/';
40
- if (/\/$/.test(x) && res === y) {
43
+ if (/\/$/.test(x) && res === basedir) {
41
44
  loadAsDirectory(res, opts.package, onfile);
42
45
  } else loadAsFile(res, opts.package, onfile);
43
- } else loadNodeModules(x, y, function (err, n, pkg) {
46
+ } else loadNodeModules(x, basedir, function (err, n, pkg) {
44
47
  if (err) cb(err);
45
48
  else if (n) cb(null, n, pkg);
46
49
  else if (core[x]) return cb(null, x);
47
50
  else {
48
- var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'");
51
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
49
52
  moduleError.code = 'MODULE_NOT_FOUND';
50
53
  cb(moduleError);
51
54
  }
@@ -58,7 +61,7 @@ module.exports = function resolve(x, options, callback) {
58
61
  if (err) cb(err);
59
62
  else if (d) cb(null, d, pkg);
60
63
  else {
61
- var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'");
64
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
62
65
  moduleError.code = 'MODULE_NOT_FOUND';
63
66
  cb(moduleError);
64
67
  }
@@ -183,12 +186,12 @@ module.exports = function resolve(x, options, callback) {
183
186
  var dir = dirs[0];
184
187
 
185
188
  var file = path.join(dir, x);
186
- loadAsFile(file, undefined, onfile);
189
+ loadAsFile(file, opts.package, onfile);
187
190
 
188
191
  function onfile(err, m, pkg) {
189
192
  if (err) return cb(err);
190
193
  if (m) return cb(null, m, pkg);
191
- loadAsDirectory(path.join(dir, x), undefined, ondir);
194
+ loadAsDirectory(path.join(dir, x), opts.package, ondir);
192
195
  }
193
196
 
194
197
  function ondir(err, n, pkg) {
@@ -2,8 +2,8 @@ var current = (process.versions && process.versions.node && process.versions.nod
2
2
 
3
3
  function specifierIncluded(specifier) {
4
4
  var parts = specifier.split(' ');
5
- var op = parts[0];
6
- var versionParts = parts[1].split('.');
5
+ var op = parts.length > 1 ? parts[0] : '=';
6
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
7
7
 
8
8
  for (var i = 0; i < 3; ++i) {
9
9
  var cur = Number(current[i] || 0);
@@ -15,6 +15,7 @@
15
15
  "events": true,
16
16
  "freelist": "< 6",
17
17
  "fs": true,
18
+ "fs/promises": ">= 10 && < 10.1",
18
19
  "_http_agent": ">= 0.11.1",
19
20
  "_http_client": ">= 0.11.1",
20
21
  "_http_common": ">= 0.11.1",
@@ -51,12 +52,14 @@
51
52
  "sys": true,
52
53
  "timers": true,
53
54
  "_tls_common": ">= 0.11.13",
54
- "_tls_legacy": ">= 0.11.3",
55
+ "_tls_legacy": ">= 0.11.3 && < 10",
55
56
  "_tls_wrap": ">= 0.11.3",
56
57
  "tls": true,
58
+ "trace_events": ">= 10",
57
59
  "tty": true,
58
60
  "url": true,
59
61
  "util": true,
62
+ "v8/tools/arguments": ">= 10",
60
63
  "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0"],
61
64
  "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0"],
62
65
  "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0"],
@@ -4,44 +4,57 @@ var path = require('path');
4
4
  var caller = require('./caller.js');
5
5
  var nodeModulesPaths = require('./node-modules-paths.js');
6
6
 
7
+ var defaultIsFile = function isFile(file) {
8
+ try {
9
+ var stat = fs.statSync(file);
10
+ } catch (e) {
11
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
12
+ throw e;
13
+ }
14
+ return stat.isFile() || stat.isFIFO();
15
+ };
16
+
7
17
  module.exports = function (x, options) {
8
18
  if (typeof x !== 'string') {
9
19
  throw new TypeError('Path must be a string.');
10
20
  }
11
21
  var opts = options || {};
12
- var isFile = opts.isFile || function (file) {
13
- try {
14
- var stat = fs.statSync(file);
15
- } catch (e) {
16
- if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
17
- throw e;
18
- }
19
- return stat.isFile() || stat.isFIFO();
20
- };
22
+ var isFile = opts.isFile || defaultIsFile;
21
23
  var readFileSync = opts.readFileSync || fs.readFileSync;
22
24
 
23
25
  var extensions = opts.extensions || ['.js'];
24
- var y = opts.basedir || path.dirname(caller());
26
+ var basedir = opts.basedir || path.dirname(caller());
27
+ var parent = opts.filename || basedir;
25
28
 
26
29
  opts.paths = opts.paths || [];
27
30
 
28
31
  if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
29
- var res = path.resolve(y, x);
32
+ var res = path.resolve(basedir, x);
30
33
  if (x === '..' || x.slice(-1) === '/') res += '/';
31
34
  var m = loadAsFileSync(res) || loadAsDirectorySync(res);
32
35
  if (m) return m;
33
36
  } else {
34
- var n = loadNodeModulesSync(x, y);
37
+ var n = loadNodeModulesSync(x, basedir);
35
38
  if (n) return n;
36
39
  }
37
40
 
38
41
  if (core[x]) return x;
39
42
 
40
- var err = new Error("Cannot find module '" + x + "' from '" + y + "'");
43
+ var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
41
44
  err.code = 'MODULE_NOT_FOUND';
42
45
  throw err;
43
46
 
44
47
  function loadAsFileSync(x) {
48
+ var pkg = loadpkg(path.dirname(x));
49
+
50
+ if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
51
+ var rfile = path.relative(pkg.dir, x);
52
+ var r = opts.pathFilter(pkg.pkg, x, rfile);
53
+ if (r) {
54
+ x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
55
+ }
56
+ }
57
+
45
58
  if (isFile(x)) {
46
59
  return x;
47
60
  }
@@ -54,6 +67,32 @@ module.exports = function (x, options) {
54
67
  }
55
68
  }
56
69
 
70
+ function loadpkg(dir) {
71
+ if (dir === '' || dir === '/') return;
72
+ if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
73
+ return;
74
+ }
75
+ if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
76
+
77
+ var pkgfile = path.join(dir, 'package.json');
78
+
79
+ if (!isFile(pkgfile)) {
80
+ return loadpkg(path.dirname(dir));
81
+ }
82
+
83
+ var body = readFileSync(pkgfile);
84
+
85
+ try {
86
+ var pkg = JSON.parse(body);
87
+ } catch (jsonErr) {}
88
+
89
+ if (pkg && opts.packageFilter) {
90
+ pkg = opts.packageFilter(pkg, dir);
91
+ }
92
+
93
+ return { pkg: pkg, dir: dir };
94
+ }
95
+
57
96
  function loadAsDirectorySync(x) {
58
97
  var pkgfile = path.join(x, '/package.json');
59
98
  if (isFile(pkgfile)) {
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "resolve",
3
3
  "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
4
- "version": "1.6.0",
4
+ "version": "1.8.1",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git://github.com/browserify/node-resolve.git"
7
+ "url": "git://github.com/browserify/resolve.git"
8
8
  },
9
9
  "main": "index.js",
10
10
  "keywords": [
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@ljharb/eslint-config": "^12.2.1",
25
- "eslint": "^4.19.0",
25
+ "eslint": "^4.19.1",
26
26
  "object-keys": "^1.0.11",
27
27
  "safe-publish-latest": "^1.1.1",
28
28
  "tap": "0.4.13",
@@ -168,7 +168,7 @@ function getName ( id ) {
168
168
  }
169
169
  }
170
170
 
171
- var reserved = 'abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split( ' ' );
171
+ var reserved = 'abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split( ' ' );
172
172
  var blacklist = { __esModule: true };
173
173
  reserved.forEach( function (word) { return blacklist[ word ] = true; } );
174
174
 
@@ -633,6 +633,7 @@ function startsWith ( str, prefix ) {
633
633
  return str.slice( 0, prefix.length ) === prefix;
634
634
  }
635
635
 
636
+ var isCjsPromises = Object.create(null);
636
637
 
637
638
  function commonjs ( options ) {
638
639
  if ( options === void 0 ) options = {};
@@ -691,9 +692,36 @@ function commonjs ( options ) {
691
692
 
692
693
  var sourceMap = options.sourceMap !== false;
693
694
 
694
- var commonjsModules = new Map();
695
695
  var resolveUsingOtherResolvers;
696
696
 
697
+ function getIsCjsPromise ( id ) {
698
+ var isCjsPromise = isCjsPromises[id];
699
+ if (isCjsPromise)
700
+ { return isCjsPromise.promise; }
701
+
702
+ var promise = new Promise( function (resolve$$1) {
703
+ isCjsPromises[id] = isCjsPromise = {
704
+ resolve: resolve$$1,
705
+ promise: undefined
706
+ };
707
+ });
708
+ isCjsPromise.promise = promise;
709
+
710
+ return promise;
711
+ }
712
+ function setIsCjsPromise ( id, promise ) {
713
+ var isCjsPromise = isCjsPromises[id];
714
+ if (isCjsPromise) {
715
+ if (isCjsPromise.resolve) {
716
+ isCjsPromise.resolve(promise);
717
+ isCjsPromise.resolve = undefined;
718
+ }
719
+ }
720
+ else {
721
+ isCjsPromises[id] = { promise: promise, resolve: undefined };
722
+ }
723
+ }
724
+
697
725
  return {
698
726
  name: 'commonjs',
699
727
 
@@ -729,8 +757,12 @@ function commonjs ( options ) {
729
757
  resolvers.unshift( function (id) { return isExternal( id ) ? false : null; } );
730
758
 
731
759
  resolveUsingOtherResolvers = first( resolvers );
732
-
733
- var entryModules = [].concat( options$1.input || options$1.entry );
760
+ var input = options$1.input || options$1.entry;
761
+ var entryModules = Array.isArray(input) ?
762
+ input :
763
+ typeof input === 'object' && input !== null ?
764
+ Object.values(input) :
765
+ [input];
734
766
  entryModuleIdsPromise = Promise.all(
735
767
  entryModules.map( function (entry) { return resolveId( entry ); })
736
768
  );
@@ -753,12 +785,15 @@ function commonjs ( options ) {
753
785
  var actualId$1 = id.slice( PREFIX.length );
754
786
  var name$1 = getName( actualId$1 );
755
787
 
756
- if (commonjsModules.has( actualId$1 ))
757
- { return ("import { __moduleExports } from " + (JSON.stringify( actualId$1 )) + "; export default __moduleExports;"); }
758
- else if (esModulesWithoutDefaultExport.indexOf(actualId$1) !== -1)
759
- { return ("import * as " + name$1 + " from " + (JSON.stringify( actualId$1 )) + "; export default " + name$1 + ";"); }
760
- else
761
- { return ("import * as " + name$1 + " from " + (JSON.stringify( actualId$1 )) + "; export default ( " + name$1 + " && " + name$1 + "['default'] ) || " + name$1 + ";"); }
788
+ return ( ( extensions.indexOf( path.extname( id ) ) === -1 ) ? Promise.resolve(false) : getIsCjsPromise( actualId$1 ) )
789
+ .then( function (isCjs) {
790
+ if ( isCjs )
791
+ { return ("import { __moduleExports } from " + (JSON.stringify( actualId$1 )) + "; export default __moduleExports;"); }
792
+ else if (esModulesWithoutDefaultExport.indexOf(actualId$1) !== -1)
793
+ { return ("import * as " + name$1 + " from " + (JSON.stringify( actualId$1 )) + "; export default " + name$1 + ";"); }
794
+ else
795
+ { return ("import * as " + name$1 + " from " + (JSON.stringify( actualId$1 )) + "; export default ( " + name$1 + " && " + name$1 + "['default'] ) || " + name$1 + ";"); }
796
+ });
762
797
  }
763
798
  },
764
799
 
@@ -768,7 +803,7 @@ function commonjs ( options ) {
768
803
  if ( !filter( id ) ) { return null; }
769
804
  if ( extensions.indexOf( path.extname( id ) ) === -1 ) { return null; }
770
805
 
771
- return entryModuleIdsPromise.then( function (entryModuleIds) {
806
+ var transformPromise = entryModuleIdsPromise.then( function (entryModuleIds) {
772
807
  var ref = checkEsModule( this$1.parse, code, id );
773
808
  var isEsModule = ref.isEsModule;
774
809
  var hasDefaultExport = ref.hasDefaultExport;
@@ -791,11 +826,14 @@ function commonjs ( options ) {
791
826
  return;
792
827
  }
793
828
 
794
- commonjsModules.set( id, true );
795
829
  return transformed;
796
830
  }).catch(function (err) {
797
831
  this$1.error(err, err.loc);
798
832
  });
833
+
834
+ setIsCjsPromise(id, transformPromise.then( function (transformed) { return transformed ? true : false; }, function () { return true; } ));
835
+
836
+ return transformPromise;
799
837
  }
800
838
  };
801
839
  }