@ms-cloudpack/esm-stub-utilities 0.10.4 → 0.10.6
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.
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lists all export names which create problems with esm output.
|
|
3
|
+
* Mostly this includes the JavaScript keywords, minus "default".
|
|
4
|
+
*/
|
|
5
|
+
export declare const forbiddenExportNames: string[];
|
|
1
6
|
/**
|
|
2
7
|
* Checks if a string is a valid identifier name according to ECMASCript specs,
|
|
3
8
|
* and is not one of the forbidden identifier names.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidIdentifierName.d.ts","sourceRoot":"","sources":["../src/isValidIdentifierName.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isValidIdentifierName.d.ts","sourceRoot":"","sources":["../src/isValidIdentifierName.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UAiDhC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,WAEjD"}
|
|
@@ -5,16 +5,12 @@ const variableNameRegex = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
|
|
|
5
5
|
* Lists all export names which create problems with esm output.
|
|
6
6
|
* Mostly this includes the JavaScript keywords, minus "default".
|
|
7
7
|
*/
|
|
8
|
-
const forbiddenExportNames = [
|
|
9
|
-
'abstract',
|
|
8
|
+
export const forbiddenExportNames = [
|
|
10
9
|
'arguments',
|
|
11
10
|
'await',
|
|
12
|
-
'boolean',
|
|
13
11
|
'break',
|
|
14
|
-
'byte',
|
|
15
12
|
'case',
|
|
16
13
|
'catch',
|
|
17
|
-
'char',
|
|
18
14
|
'class',
|
|
19
15
|
'const',
|
|
20
16
|
'continue',
|
|
@@ -22,29 +18,22 @@ const forbiddenExportNames = [
|
|
|
22
18
|
'default',
|
|
23
19
|
'delete',
|
|
24
20
|
'do',
|
|
25
|
-
'double',
|
|
26
21
|
'else',
|
|
27
22
|
'enum',
|
|
28
23
|
'eval',
|
|
29
24
|
'export',
|
|
30
25
|
'extends',
|
|
31
26
|
'false',
|
|
32
|
-
'final',
|
|
33
27
|
'finally',
|
|
34
|
-
'float',
|
|
35
28
|
'for',
|
|
36
29
|
'function',
|
|
37
|
-
'goto',
|
|
38
30
|
'if',
|
|
39
31
|
'implements',
|
|
40
32
|
'import',
|
|
41
33
|
'in',
|
|
42
34
|
'instanceof',
|
|
43
|
-
'int',
|
|
44
35
|
'interface',
|
|
45
36
|
'let',
|
|
46
|
-
'long',
|
|
47
|
-
'native',
|
|
48
37
|
'new',
|
|
49
38
|
'null',
|
|
50
39
|
'package',
|
|
@@ -52,21 +41,16 @@ const forbiddenExportNames = [
|
|
|
52
41
|
'protected',
|
|
53
42
|
'public',
|
|
54
43
|
'return',
|
|
55
|
-
'short',
|
|
56
44
|
'static',
|
|
57
45
|
'super',
|
|
58
46
|
'switch',
|
|
59
|
-
'synchronized',
|
|
60
47
|
'this',
|
|
61
48
|
'throw',
|
|
62
|
-
'throws',
|
|
63
|
-
'transient',
|
|
64
49
|
'true',
|
|
65
50
|
'try',
|
|
66
51
|
'typeof',
|
|
67
52
|
'var',
|
|
68
53
|
'void',
|
|
69
|
-
'volatile',
|
|
70
54
|
'while',
|
|
71
55
|
'with',
|
|
72
56
|
'yield',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidIdentifierName.js","sourceRoot":"","sources":["../src/isValidIdentifierName.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,yEAAyE;AACzE,MAAM,iBAAiB,GAAG,4BAA4B,CAAC;AAEvD;;;GAGG;AACH,MAAM,oBAAoB,GAAG;
|
|
1
|
+
{"version":3,"file":"isValidIdentifierName.js","sourceRoot":"","sources":["../src/isValidIdentifierName.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,yEAAyE;AACzE,MAAM,iBAAiB,GAAG,4BAA4B,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW;IACX,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,UAAU;IACV,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;IACT,KAAK;IACL,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,YAAY;IACZ,WAAW;IACX,KAAK;IACL,KAAK;IACL,MAAM;IACN,SAAS;IACT,SAAS;IACT,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;CACR,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["// A valid variable name must start with a letter, underscore, or dollar sign,\n// and can be followed by letters, numbers, underscores, or dollar signs.\nconst variableNameRegex = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\n/**\n * Lists all export names which create problems with esm output.\n * Mostly this includes the JavaScript keywords, minus \"default\".\n */\nexport const forbiddenExportNames = [\n 'arguments',\n 'await',\n 'break',\n 'case',\n 'catch',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'interface',\n 'let',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'static',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n 'yield',\n];\n\n/**\n * Checks if a string is a valid identifier name according to ECMASCript specs,\n * and is not one of the forbidden identifier names.\n * https://262.ecma-international.org/13.0/#sec-names-and-keywords\n * @param name - Identifier to check\n * @returns True if the string is a valid identifier name, false otherwise.\n */\nexport function isValidIdentifierName(name: string) {\n return !forbiddenExportNames.includes(name) && variableNameRegex.test(name);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/esm-stub-utilities",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "Generates ESM stubs for CommonJS entry files.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ms-cloudpack/bundler-types": "^0.24.
|
|
22
|
+
"@ms-cloudpack/bundler-types": "^0.24.5",
|
|
23
23
|
"@ms-cloudpack/json-utilities": "^0.1.4",
|
|
24
24
|
"@ms-cloudpack/path-string-parsing": "^1.1.3",
|
|
25
|
-
"@ms-cloudpack/package-utilities": "^5.
|
|
25
|
+
"@ms-cloudpack/package-utilities": "^5.11.0",
|
|
26
26
|
"@ms-cloudpack/worker-pool": "^0.1.1",
|
|
27
27
|
"jsdom-global": "^3.0.2",
|
|
28
28
|
"jsdom": "^22.0.0",
|