@flex-development/mlly 1.0.0-alpha.2 → 1.0.0-alpha.3

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +6 -4
  3. package/dist/constants.d.mts +3 -1
  4. package/dist/enums/index.d.mts +7 -0
  5. package/dist/enums/index.mjs +8 -0
  6. package/dist/enums/kind-specifier.d.mts +14 -0
  7. package/dist/enums/kind-specifier.mjs +9 -0
  8. package/dist/enums/kind-statement.d.mts +15 -0
  9. package/dist/enums/kind-statement.mjs +10 -0
  10. package/dist/enums/kind-syntax.d.mts +22 -0
  11. package/dist/enums/kind-syntax.mjs +17 -0
  12. package/dist/index.d.mts +1 -0
  13. package/dist/index.mjs +1 -0
  14. package/dist/interfaces/import-dynamic.d.mts +24 -6
  15. package/dist/interfaces/import-static.d.mts +20 -4
  16. package/dist/interfaces/options-resolve-alias.d.mts +7 -7
  17. package/dist/interfaces/options-resolve.d.mts +11 -10
  18. package/dist/interfaces/statement-export.d.mts +22 -9
  19. package/dist/interfaces/statement-import.d.mts +15 -4
  20. package/dist/interfaces/statement-require.d.mts +15 -4
  21. package/dist/interfaces/statement.d.mts +20 -9
  22. package/dist/internal/get-compiler-options.d.mts +4 -4
  23. package/dist/internal/get-compiler-options.mjs +2 -2
  24. package/dist/lib/detect-syntax.d.mts +3 -3
  25. package/dist/lib/extract-statements.d.mts +6 -7
  26. package/dist/lib/extract-statements.mjs +1 -1
  27. package/dist/lib/find-dynamic-imports.d.mts +4 -2
  28. package/dist/lib/find-dynamic-imports.mjs +18 -9
  29. package/dist/lib/find-exports.d.mts +7 -2
  30. package/dist/lib/find-exports.mjs +57 -32
  31. package/dist/lib/find-requires.d.mts +5 -5
  32. package/dist/lib/find-requires.mjs +12 -9
  33. package/dist/lib/find-static-imports.d.mts +4 -2
  34. package/dist/lib/find-static-imports.mjs +13 -8
  35. package/dist/lib/has-cjs-syntax.d.mts +3 -1
  36. package/dist/lib/has-cjs-syntax.mjs +4 -2
  37. package/dist/lib/has-esm-syntax.d.mts +3 -1
  38. package/dist/lib/has-esm-syntax.mjs +4 -2
  39. package/dist/lib/resolve-alias.d.mts +1 -1
  40. package/dist/lib/resolve-alias.mjs +3 -3
  41. package/dist/lib/resolve-aliases.d.mts +2 -2
  42. package/dist/lib/resolve-aliases.mjs +3 -3
  43. package/dist/lib/resolve-module.d.mts +4 -4
  44. package/dist/lib/resolve-module.mjs +3 -3
  45. package/dist/lib/resolve-modules.d.mts +2 -2
  46. package/dist/lib/resolve-modules.mjs +4 -3
  47. package/dist/lib/to-absolute-specifier.d.mts +1 -1
  48. package/dist/lib/to-absolute-specifier.mjs +3 -3
  49. package/dist/lib/to-bare-specifier.d.mts +3 -3
  50. package/dist/lib/to-bare-specifier.mjs +7 -7
  51. package/dist/lib/to-data-url.d.mts +1 -1
  52. package/dist/lib/to-relative-specifier.d.mts +1 -1
  53. package/dist/lib/to-relative-specifier.mjs +2 -2
  54. package/dist/types/declaration.d.mts +1 -1
  55. package/dist/types/index.d.mts +4 -3
  56. package/dist/types/mime-type.d.mts +1 -1
  57. package/dist/types/module-specifier-type.d.mts +11 -0
  58. package/dist/{internal/compiler-options-json.mjs → types/module-specifier-type.mjs} +0 -0
  59. package/dist/types/syntax-kind-export.d.mts +12 -0
  60. package/dist/types/{ext.mjs → syntax-kind-export.mjs} +0 -0
  61. package/dist/types/syntax-kind-import.d.mts +12 -0
  62. package/dist/types/{specifier-type.mjs → syntax-kind-import.mjs} +0 -0
  63. package/dist/types/syntax-kind-require.d.mts +12 -0
  64. package/dist/types/{statement-type.mjs → syntax-kind-require.mjs} +0 -0
  65. package/package.json +66 -59
  66. package/dist/internal/compiler-options-json.d.mts +0 -111
  67. package/dist/internal/constants.d.mts +0 -70
  68. package/dist/internal/constants.mjs +0 -18
  69. package/dist/internal/index.d.mts +0 -7
  70. package/dist/internal/index.mjs +0 -5
  71. package/dist/types/ext.d.mts +0 -9
  72. package/dist/types/specifier-type.d.mts +0 -11
  73. package/dist/types/statement-type.d.mts +0 -9
@@ -18,7 +18,7 @@ import type { MIMEType } from '../types/index.mjs';
18
18
  * [2]: https://nodejs.org/api/esm.html#terminology
19
19
  * [3]: {@link ./resolve-modules.ts}
20
20
  *
21
- * @see {@link MIMEType}
21
+ * @see {@linkcode MIMEType}
22
22
  * @see https://nodejs.org/api/esm.html#esm_data_imports
23
23
  *
24
24
  * @param {string} code - Code to convert
@@ -11,7 +11,7 @@ import { URL } from 'node:url';
11
11
  * includes a file extension.
12
12
  * :::
13
13
  *
14
- * @see {@link URL}
14
+ * @see {@linkcode URL}
15
15
  * @see https://nodejs.org/api/esm.html#terminology
16
16
  *
17
17
  * @param {URL | string} specifier - Module specifier to convert
@@ -1,5 +1,5 @@
1
+ import pathe from "@flex-development/pathe";
1
2
  import { fileURLToPath, URL } from "node:url";
2
- import upath from "upath";
3
3
  const toRelativeSpecifier = (specifier, parent) => {
4
4
  if (parent instanceof URL)
5
5
  parent = parent.href;
@@ -9,7 +9,7 @@ const toRelativeSpecifier = (specifier, parent) => {
9
9
  parent = fileURLToPath(parent);
10
10
  if (specifier.startsWith("file:"))
11
11
  specifier = fileURLToPath(specifier);
12
- return upath.relative(upath.dirname(parent), specifier).replace(/^(\w)/, "./$1");
12
+ return pathe.relative(pathe.dirname(parent), specifier).replace(/^(\w)/, "./$1");
13
13
  };
14
14
  var to_relative_specifier_default = toRelativeSpecifier;
15
15
  export {
@@ -5,5 +5,5 @@
5
5
  /**
6
6
  * Export declaration kinds.
7
7
  */
8
- declare type Declaration = 'abstract class' | 'async function' | 'async function*' | 'class' | 'const enum' | 'const' | 'default async function' | 'default async function*' | 'default async' | 'default function' | 'default function*' | 'default' | 'enum' | 'function' | 'function*' | 'interface' | 'let' | 'namespace' | 'type' | 'var';
8
+ type Declaration = 'class' | 'const enum' | 'const' | 'enum' | 'function' | 'function*' | 'interface' | 'let' | 'namespace' | 'type' | 'var';
9
9
  export type { Declaration as default };
@@ -3,7 +3,8 @@
3
3
  * @module mlly/types
4
4
  */
5
5
  export type { default as Declaration } from './declaration.mjs';
6
- export type { default as Ext } from './ext.mjs';
7
6
  export type { default as MIMEType } from './mime-type.mjs';
8
- export type { default as SpecifierType } from './specifier-type.mjs';
9
- export type { default as StatementType } from './statement-type.mjs';
7
+ export type { default as ModuleSpecifierType } from './module-specifier-type.mjs';
8
+ export type { default as SyntaxKindExport } from './syntax-kind-export.mjs';
9
+ export type { default as SyntaxKindImport } from './syntax-kind-import.mjs';
10
+ export type { default as SyntaxKindRequire } from './syntax-kind-require.mjs';
@@ -7,5 +7,5 @@
7
7
  *
8
8
  * @see https://nodejs.org/api/esm.html#esm_data_imports
9
9
  */
10
- declare type MIMEType = 'application/json' | 'application/wasm' | 'text/javascript';
10
+ type MIMEType = 'application/json' | 'application/wasm' | 'text/javascript';
11
11
  export type { MIMEType as default };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file Type Definitions - ModuleSpecifierType
3
+ * @module mlly/types/ModuleSpecifierType
4
+ */
5
+ /**
6
+ * Module specifier types.
7
+ *
8
+ * @see https://nodejs.org/api/esm.html#terminology
9
+ */
10
+ type ModuleSpecifierType = 'absolute' | 'bare' | 'relative';
11
+ export type { ModuleSpecifierType as default };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file Type Definitions - SyntaxKindExport
3
+ * @module mlly/types/SyntaxKindExport
4
+ */
5
+ import type { SyntaxKind } from '../enums/index.mjs';
6
+ /**
7
+ * `export` statement syntax kinds.
8
+ *
9
+ * @see {@linkcode SyntaxKind}
10
+ */
11
+ type SyntaxKindExport = SyntaxKind.DECLARATION | SyntaxKind.DEFAULT | SyntaxKind.LIST | SyntaxKind.NAMED | SyntaxKind.NAMESPACE;
12
+ export type { SyntaxKindExport as default };
File without changes
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file Type Definitions - SyntaxKindImport
3
+ * @module mlly/types/SyntaxKindImport
4
+ */
5
+ import type { SyntaxKind } from '../enums/index.mjs';
6
+ /**
7
+ * `import` statement syntax kinds.
8
+ *
9
+ * @see {@linkcode SyntaxKind}
10
+ */
11
+ type SyntaxKindImport = SyntaxKind.DEFAULT | SyntaxKind.DEFAULT_WITH_NAMED | SyntaxKind.DEFAULT_WITH_NAMESPACE | SyntaxKind.DYNAMIC | SyntaxKind.NAMED | SyntaxKind.NAMESPACE | SyntaxKind.SIDE_EFFECT;
12
+ export type { SyntaxKindImport as default };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file Type Definitions - SyntaxKindRequire
3
+ * @module mlly/types/SyntaxKindRequire
4
+ */
5
+ import type { SyntaxKind } from '../enums/index.mjs';
6
+ /**
7
+ * `require` statement syntax kinds.
8
+ *
9
+ * @see {@linkcode SyntaxKind}
10
+ */
11
+ type SyntaxKindRequire = SyntaxKind.REQUIRE;
12
+ export type { SyntaxKindRequire as default };
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@flex-development/mlly",
3
3
  "description": "ECMAScript module utilities",
4
- "version": "1.0.0-alpha.2",
4
+ "version": "1.0.0-alpha.3",
5
5
  "keywords": [
6
+ "ecmascript-modules",
6
7
  "esm",
8
+ "esmodules",
7
9
  "module",
8
10
  "typescript"
9
11
  ],
@@ -39,17 +41,20 @@
39
41
  },
40
42
  "scripts": {
41
43
  "build": "mkbuild",
42
- "check:ci": "yarn dedupe --check && yarn check:format && yarn check:lint && yarn check:spelling && yarn check:types && yarn check:types:build && yarn test:cov && NODE_ENV=production yarn pack -o %s-%v.tgz && yarn clean:pack",
44
+ "check:ci": "yarn dedupe --check && yarn check:format && yarn check:lint && yarn check:spelling && yarn typecheck && yarn check:types:build && yarn test:cov && NODE_ENV=production yarn pack -o %s-%v.tgz && yarn clean:pack",
43
45
  "check:format": "prettier --check .",
44
46
  "check:lint": "eslint --exit-on-fatal-error --ext cjs,cts,gql,json,jsonc,md,mjs,ts,vue,yml --max-warnings 0 .",
45
47
  "check:spelling": "cspell lint --color --no-progress --relative $@ \"**\"",
46
- "check:types": "vue-tsc -p tsconfig.json",
48
+ "check:types": "vue-tsc -p tsconfig.typecheck.json",
47
49
  "check:types:build": "vue-tsc -p tsconfig.build.json",
48
50
  "check:upgrades": "yarn upgrade-interactive",
49
51
  "clean:build": "trash ./{dist,*.tgz}",
52
+ "clean:coverage": "trash ./coverage",
50
53
  "clean:modules": "trash ./.yarn/{cache,*.gz} ./node_modules",
51
54
  "clean:pack": "trash ./*.tgz",
52
- "clean:test": "trash ./coverage",
55
+ "clean:test": "yarn clean:coverage && trash ./__tests__/report.json",
56
+ "codecov": "yarn test:cov && yarn test:cov:upload",
57
+ "codecov:validate": "cat .codecov.yml | curl --data-binary @- https://codecov.io/validate",
53
58
  "conventional-changelog": "node --loader=./loader.mjs ./node_modules/.bin/conventional-changelog -n ./changelog.config.cts",
54
59
  "docs:build": "vc pull --environment=preview && vc build",
55
60
  "docs:build:prod": "vc pull --environment=production && vc build --prod",
@@ -61,7 +66,7 @@
61
66
  "fix:dedupe": "yarn dedupe --strategy=highest",
62
67
  "fix:format": "prettier --cache --write .",
63
68
  "fix:lint": "yarn check:lint --cache --fix",
64
- "_postinstall": "chmod +x .husky/* && husky install",
69
+ "_postinstall": "[ -f ./node_modules/.bin/husky ] && chmod +x .husky/* && husky install || exit 0",
65
70
  "postpack": "toggle-scripts +postinstall",
66
71
  "postpublish": "toggle-scripts +prepack",
67
72
  "prepack": "toggle-scripts -postinstall && yarn build",
@@ -69,128 +74,130 @@
69
74
  "recommended-bump": "conventional-recommended-bump --preset=conventionalcommits --tag-prefix=$(jq .tagPrefix package.json -r) --verbose",
70
75
  "release": "bash ./scripts/release.sh",
71
76
  "test": "vitest run",
72
- "test:cov": "yarn test --coverage",
73
- "test:watch": "vitest"
77
+ "test:cov": "yarn clean:coverage; yarn test --coverage",
78
+ "test:cov:serve": "serve ./coverage/lcov-report",
79
+ "test:cov:upload": "./codecov -t $CODECOV_TOKEN -f ./coverage/lcov.info",
80
+ "test:watch": "vitest",
81
+ "typecheck": "vitest typecheck --run",
82
+ "typecheck:watch": "vitest typecheck"
74
83
  },
75
84
  "dependencies": {
85
+ "@flex-development/export-regex": "1.0.0",
86
+ "@flex-development/import-regex": "2.0.0",
76
87
  "@flex-development/is-builtin": "1.0.1",
77
- "@flex-development/tutils": "5.0.1",
88
+ "@flex-development/pathe": "1.0.1",
89
+ "@flex-development/tsconfig-types": "2.0.1",
90
+ "@flex-development/tutils": "6.0.0-alpha.7",
78
91
  "import-meta-resolve": "2.1.0",
79
92
  "node-package-exports": "1.0.2",
80
93
  "read-pkg-up": "9.1.0",
81
- "tsconfig-paths": "4.1.0",
82
- "upath": "2.0.1"
94
+ "tsconfig-paths": "4.1.0"
83
95
  },
84
96
  "devDependencies": {
85
- "@commitlint/cli": "17.2.0",
86
- "@commitlint/config-conventional": "17.2.0",
97
+ "@commitlint/cli": "17.3.0",
98
+ "@commitlint/config-conventional": "17.3.0",
87
99
  "@commitlint/types": "17.0.0",
88
100
  "@faker-js/faker": "7.6.0",
89
- "@flex-development/docast": "github:flex-development/docast",
90
- "@flex-development/mkbuild": "1.0.0-alpha.8",
91
- "@graphql-eslint/eslint-plugin": "3.13.0",
101
+ "@flex-development/docast": "1.0.0-alpha.9",
102
+ "@flex-development/docast-parse": "1.0.0-alpha.4",
103
+ "@flex-development/mkbuild": "1.0.0-alpha.9",
104
+ "@graphql-eslint/eslint-plugin": "3.13.1",
92
105
  "@sindresorhus/slugify": "2.1.1",
93
- "@types/chai": "4.3.3",
106
+ "@types/chai": "4.3.4",
94
107
  "@types/chai-string": "1.4.2",
95
108
  "@types/conventional-changelog": "3.1.1",
96
109
  "@types/conventional-changelog-config-spec": "2.1.2",
97
110
  "@types/conventional-changelog-writer": "4.0.1",
98
- "@types/conventional-commits-parser": "3.0.2",
111
+ "@types/conventional-commits-parser": "3.0.3",
99
112
  "@types/dateformat": "5.0.0",
100
113
  "@types/dotenv-defaults": "2.0.1",
101
- "@types/eslint": "8.4.9",
114
+ "@types/eslint": "8.4.10",
102
115
  "@types/git-raw-commits": "2.0.1",
103
116
  "@types/is-ci": "3.0.0",
104
117
  "@types/markdown-it": "12.2.3",
105
- "@types/node": "16.18.3",
118
+ "@types/node": "16.18.10",
106
119
  "@types/node-notifier": "8.0.2",
107
- "@types/prettier": "2.7.1",
120
+ "@types/prettier": "2.7.2",
108
121
  "@types/unist": "2.0.6",
109
- "@typescript-eslint/eslint-plugin": "5.42.0",
110
- "@typescript-eslint/parser": "5.42.0",
122
+ "@typescript-eslint/eslint-plugin": "5.47.0",
123
+ "@typescript-eslint/parser": "5.47.0",
111
124
  "@vates/toggle-scripts": "1.0.0",
112
- "@vitest/coverage-c8": "0.24.5",
113
- "@vitest/ui": "0.24.5",
125
+ "@vitest/coverage-c8": "0.26.2",
126
+ "@vitest/ui": "0.26.2",
114
127
  "@vuedx/typescript-plugin-vue": "0.7.6-next-1666251997.0",
115
- "chai": "4.3.6",
128
+ "chai": "4.3.7",
116
129
  "chai-each": "0.0.1",
117
130
  "chai-quantifiers": "1.0.17",
118
131
  "chai-string": "1.5.0",
119
132
  "cheerio": "1.0.0-rc.12",
120
133
  "conventional-changelog-cli": "2.2.2",
121
134
  "conventional-recommended-bump": "6.1.0",
122
- "cspell": "6.14.0",
135
+ "cspell": "6.18.0",
123
136
  "dotenv": "16.0.3",
124
- "esbuild": "0.15.13",
137
+ "esbuild": "0.16.10",
125
138
  "escape-string-regexp": "5.0.0",
126
- "eslint": "8.26.0",
139
+ "eslint": "8.30.0",
127
140
  "eslint-config-prettier": "8.5.0",
128
141
  "eslint-plugin-chai-expect": "3.0.0",
129
142
  "eslint-plugin-jest-formatting": "3.1.0",
130
- "eslint-plugin-jsdoc": "39.6.2",
143
+ "eslint-plugin-jsdoc": "39.6.4",
131
144
  "eslint-plugin-jsonc": "2.5.0",
132
145
  "eslint-plugin-markdown": "3.0.0",
133
146
  "eslint-plugin-markdownlint": "0.4.0",
134
147
  "eslint-plugin-node": "11.1.0",
135
148
  "eslint-plugin-prettier": "4.2.1",
136
149
  "eslint-plugin-promise": "6.1.1",
137
- "eslint-plugin-unicorn": "44.0.2",
138
- "eslint-plugin-vue": "9.7.0",
139
- "eslint-plugin-yml": "1.2.0",
140
- "globby": "13.1.2",
150
+ "eslint-plugin-unicorn": "45.0.2",
151
+ "eslint-plugin-vue": "9.8.0",
152
+ "eslint-plugin-yml": "1.4.0",
153
+ "globby": "13.1.3",
141
154
  "graphql": "16.6.0",
142
155
  "graphql-config": "4.3.6",
143
156
  "growl": "1.10.5",
144
- "husky": "8.0.1",
157
+ "husky": "8.0.2",
145
158
  "is-ci": "3.0.1",
146
159
  "jsonc-eslint-parser": "2.1.0",
147
- "lint-staged": "13.0.3",
160
+ "lint-staged": "13.1.0",
148
161
  "node-notifier": "10.0.1",
149
- "prettier": "2.7.1",
162
+ "prettier": "2.8.1",
150
163
  "prettier-plugin-sh": "0.12.8",
151
- "pretty-format": "29.2.1",
164
+ "pretty-format": "29.3.1",
152
165
  "pupa": "3.1.0",
153
- "serve": "14.0.1",
166
+ "serve": "14.1.2",
154
167
  "sitemap": "7.1.1",
155
168
  "trash-cli": "5.0.0",
156
169
  "ts-dedent": "2.2.0",
157
170
  "ts-node": "10.9.1",
158
- "typescript": "4.8.4",
171
+ "typescript": "4.9.4",
159
172
  "unified": "10.1.2",
160
173
  "unist-util-remove": "3.1.0",
161
174
  "unist-util-source": "4.0.1",
162
175
  "unist-util-visit": "4.1.1",
163
- "vercel": "28.4.14",
176
+ "vercel": "28.10.1",
164
177
  "version-bump-prompt": "6.1.0",
165
- "vite": "3.2.2",
166
- "vite-tsconfig-paths": "3.5.2",
167
- "vitepress": "1.0.0-alpha.27",
168
- "vitest": "0.24.5",
178
+ "vite": "4.0.3",
179
+ "vite-tsconfig-paths": "4.0.3",
180
+ "vitepress": "1.0.0-alpha.32",
181
+ "vitest": "0.26.2",
169
182
  "vitest-github-actions-reporter": "0.9.0",
170
- "vue": "3.2.41",
183
+ "vue": "3.2.45",
171
184
  "vue-eslint-parser": "9.1.0",
172
- "vue-tsc": "1.0.9",
185
+ "vue-tsc": "1.0.17",
173
186
  "yaml-eslint-parser": "1.1.0"
174
187
  },
175
- "peerDependencies": {
176
- "typescript": "*"
177
- },
178
- "peerDependenciesMeta": {
179
- "typescript": {
180
- "optional": true
181
- }
182
- },
183
188
  "resolutions": {
184
189
  "@ardatan/sync-fetch": "larsgw/sync-fetch#head=worker_threads",
185
- "esbuild": "0.15.12",
186
- "vite": "3.2.2",
187
- "vitepress@npm:1.0.0-alpha.27": "patch:vitepress@npm%3A1.0.0-alpha.27#patches/vitepress+1.0.0-alpha.27.dev.patch"
190
+ "@flex-development/tutils": "6.0.0-alpha.7",
191
+ "esbuild": "0.16.10",
192
+ "vite": "4.0.3",
193
+ "vitepress@npm:1.0.0-alpha.32": "patch:vitepress@npm%3A1.0.0-alpha.32#patches/vitepress+1.0.0-alpha.32.dev.patch",
194
+ "vitest@npm:0.26.2": "patch:vitest@npm%3A0.26.2#patches/vitest+0.26.2.dev.patch"
188
195
  },
189
196
  "engines": {
190
197
  "node": ">=14.16",
191
- "yarn": "4.0.0-rc.14"
198
+ "yarn": "4.0.0-rc.34"
192
199
  },
193
- "packageManager": "yarn@4.0.0-rc.14",
200
+ "packageManager": "yarn@4.0.0-rc.34",
194
201
  "readme": "README.md",
195
202
  "sideEffects": false,
196
203
  "tagPrefix": ""
@@ -1,111 +0,0 @@
1
- /**
2
- * @file Internals - CompilerOptionsJson
3
- * @module mlly/internal/CompilerOptionsJson
4
- */
5
- import type { CompilerOptionsValue, MapLike } from 'typescript';
6
- /**
7
- * TypeScript compiler options provided by a user.
8
- *
9
- * @internal
10
- *
11
- * @see https://www.typescriptlang.org/tsconfig
12
- */
13
- interface CompilerOptionsJson {
14
- allowJs?: boolean;
15
- allowSyntheticDefaultImports?: boolean;
16
- allowUmdGlobalAccess?: boolean;
17
- allowUnreachableCode?: boolean;
18
- allowUnusedLabels?: boolean;
19
- alwaysStrict?: boolean;
20
- assumeChangesOnlyAffectDirectDependencies?: boolean;
21
- baseUrl?: string;
22
- charset?: string;
23
- checkJs?: boolean;
24
- composite?: boolean;
25
- declaration?: boolean;
26
- declarationDir?: string;
27
- declarationMap?: boolean;
28
- disableReferencedProjectLoad?: boolean;
29
- disableSizeLimit?: boolean;
30
- disableSolutionSearching?: boolean;
31
- disableSourceOfProjectReferenceRedirect?: boolean;
32
- downlevelIteration?: boolean;
33
- emitBOM?: boolean;
34
- emitDeclarationOnly?: boolean;
35
- emitDecoratorMetadata?: boolean;
36
- esModuleInterop?: boolean;
37
- exactOptionalPropertyTypes?: boolean;
38
- experimentalDecorators?: boolean;
39
- forceConsistentCasingInFileNames?: boolean;
40
- importHelpers?: boolean;
41
- importsNotUsedAsValues?: 'error' | 'preserve' | 'remove';
42
- incremental?: boolean;
43
- inlineSourceMap?: boolean;
44
- inlineSources?: boolean;
45
- isolatedModules?: boolean;
46
- jsx?: 'preserve' | 'react-jsx' | 'react-jsxdev' | 'react-native' | 'react';
47
- jsxFactory?: string;
48
- jsxFragmentFactory?: string;
49
- jsxImportSource?: string;
50
- keyofStringsOnly?: boolean;
51
- lib?: ('DOM.Iterable' | 'dom.iterable' | 'DOM' | 'dom' | 'ES5' | 'es5' | 'ES6' | 'es6' | 'ES7' | 'es7' | 'ES2015.Collection' | 'es2015.collection' | 'ES2015.Core' | 'es2015.core' | 'ES2015.Generator' | 'es2015.generator' | 'ES2015.Iterable' | 'es2015.iterable' | 'ES2015.Promise' | 'es2015.promise' | 'ES2015.Proxy' | 'es2015.proxy' | 'ES2015.Reflect' | 'es2015.reflect' | 'ES2015.Symbol.WellKnown' | 'es2015.symbol.wellknown' | 'ES2015.Symbol' | 'es2015.symbol' | 'ES2015' | 'es2015' | 'ES2016.Array.Include' | 'es2016.array.include' | 'ES2016' | 'es2016' | 'ES2017.Intl' | 'es2017.intl' | 'ES2017.Object' | 'es2017.object' | 'ES2017.SharedMemory' | 'es2017.sharedmemory' | 'ES2017.String' | 'es2017.string' | 'ES2017.TypedArrays' | 'es2017.typedarrays' | 'ES2017' | 'es2017' | 'ES2018.AsyncGenerator' | 'es2018.asyncgenerator' | 'ES2018.AsyncIterable' | 'es2018.asynciterable' | 'ES2018.Intl' | 'es2018.intl' | 'ES2018.Promise' | 'es2018.promise' | 'ES2018.Regexp' | 'es2018.regexp' | 'ES2018' | 'es2018' | 'ES2019.Array' | 'es2019.array' | 'ES2019.Object' | 'es2019.object' | 'ES2019.String' | 'es2019.string' | 'ES2019.Symbol' | 'es2019.symbol' | 'ES2019' | 'es2019' | 'ES2020.BigInt' | 'es2020.bigint' | 'ES2020.Intl' | 'es2020.intl' | 'ES2020.Promise' | 'es2020.promise' | 'ES2020.SharedMemory' | 'es2020.sharedmemory' | 'ES2020.String' | 'es2020.string' | 'ES2020.Symbol.WellKnown' | 'es2020.symbol.wellknown' | 'ES2020' | 'es2020' | 'ES2021.Promise' | 'es2021.promise' | 'ES2021.String' | 'es2021.string' | 'ES2021.WeakRef' | 'es2021.weakref' | 'ES2021' | 'es2021' | 'ESNext.Array' | 'esnext.array' | 'ESNext.AsyncIterable' | 'esnext.asynciterable' | 'ESNext.BigInt' | 'esnext.bigint' | 'ESNext.Intl' | 'esnext.intl' | 'ESNext.Promise' | 'esnext.promise' | 'ESNext.String' | 'esnext.string' | 'ESNext.Symbol' | 'esnext.symbol' | 'ESNext.WeakRef' | 'esnext.weakref' | 'ESNext' | 'esnext' | 'ScriptHost' | 'scripthost' | 'WebWorker.ImportScripts' | 'webworker.importscripts' | 'WebWorker.Iterable' | 'webworker.iterable' | 'WebWorker' | 'webworker')[];
52
- locale?: string;
53
- mapRoot?: string;
54
- maxNodeModuleJsDepth?: number;
55
- module?: 'AMD' | 'amd' | 'CommonJS' | 'commonjs' | 'ES6' | 'es6' | 'ES2015' | 'es2015' | 'ES2020' | 'es2020' | 'ES2022' | 'es2022' | 'ESNext' | 'esnext' | 'Node16' | 'node16' | 'NodeNext' | 'nodenext' | 'None' | 'none' | 'System' | 'system' | 'UMD' | 'umd';
56
- moduleDetection?: 'auto' | 'force' | 'legacy';
57
- moduleResolution?: 'classic' | 'node' | 'node16' | 'nodenext';
58
- moduleSuffixes?: string[];
59
- newLine?: 'CRLF' | 'crlf' | 'LF' | 'lf';
60
- noEmit?: boolean;
61
- noEmitHelpers?: boolean;
62
- noEmitOnError?: boolean;
63
- noErrorTruncation?: boolean;
64
- noFallthroughCasesInSwitch?: boolean;
65
- noImplicitAny?: boolean;
66
- noImplicitOverride?: boolean;
67
- noImplicitReturns?: boolean;
68
- noImplicitThis?: boolean;
69
- noImplicitUseStrict?: boolean;
70
- noLib?: boolean;
71
- noPropertyAccessFromIndexSignature?: boolean;
72
- noResolve?: boolean;
73
- noStrictGenericChecks?: boolean;
74
- noUncheckedIndexedAccess?: boolean;
75
- noUnusedLocals?: boolean;
76
- noUnusedParameters?: boolean;
77
- out?: string;
78
- outDir?: string;
79
- outFile?: string;
80
- paths?: MapLike<string[]>;
81
- preserveConstEnums?: boolean;
82
- preserveSymlinks?: boolean;
83
- preserveValueImports?: boolean;
84
- project?: string;
85
- reactNamespace?: string;
86
- removeComments?: boolean;
87
- resolveJsonModule?: boolean;
88
- rootDir?: string;
89
- rootDirs?: string[];
90
- skipDefaultLibCheck?: boolean;
91
- skipLibCheck?: boolean;
92
- sourceMap?: boolean;
93
- sourceRoot?: string;
94
- strict?: boolean;
95
- strictBindCallApply?: boolean;
96
- strictFunctionTypes?: boolean;
97
- strictNullChecks?: boolean;
98
- strictPropertyInitialization?: boolean;
99
- stripInternal?: boolean;
100
- suppressExcessPropertyErrors?: boolean;
101
- suppressImplicitAnyIndexErrors?: boolean;
102
- target?: 'ES3' | 'es3' | 'ES5' | 'es5' | 'ES6' | 'es6' | 'ES2015' | 'es2015' | 'ES2016' | 'es2016' | 'ES2017' | 'es2017' | 'ES2018' | 'es2018' | 'ES2019' | 'es2019' | 'ES2020' | 'es2020' | 'ES2021' | 'es2021' | 'ESNext' | 'esnext';
103
- traceResolution?: boolean;
104
- tsBuildInfoFile?: string;
105
- typeRoots?: string[];
106
- types?: string[];
107
- useDefineForClassFields?: boolean;
108
- useUnknownInCatchVariables?: boolean;
109
- [option: string]: CompilerOptionsValue | undefined;
110
- }
111
- export type { CompilerOptionsJson as default };
@@ -1,70 +0,0 @@
1
- /**
2
- * @file Internals - Constants
3
- * @module mlly/internal/constants
4
- */
5
- /**
6
- * CommonJS syntax regex.
7
- *
8
- * @internal
9
- *
10
- * @const {RegExp} CJS_SYNTAX_REGEX
11
- */
12
- export declare const CJS_SYNTAX_REGEX: RegExp;
13
- /**
14
- * Dynamic import statement regex.
15
- *
16
- * @internal
17
- *
18
- * @const {RegExp} DYNAMIC_IMPORT_REGEX
19
- */
20
- export declare const DYNAMIC_IMPORT_REGEX: RegExp;
21
- /**
22
- * ESM syntax regex.
23
- *
24
- * @internal
25
- *
26
- * @const {RegExp} ESM_SYNTAX_REGEX
27
- */
28
- export declare const ESM_SYNTAX_REGEX: RegExp;
29
- /**
30
- * Declaration export statement regex.
31
- *
32
- * **Note**: Captures [declaration type][1] and export name only.
33
- *
34
- * [1]: ./types/declaration.ts
35
- *
36
- * @const {RegExp} EXPORT_DECLARATION_REGEX
37
- */
38
- export declare const EXPORT_DECLARATION_REGEX: RegExp;
39
- /**
40
- * Named export statement regex.
41
- *
42
- * @internal
43
- *
44
- * @const {RegExp} EXPORT_NAMED_REGEX
45
- */
46
- export declare const EXPORT_NAMED_REGEX: RegExp;
47
- /**
48
- * Aggregate export statement (`export * ...`) regex.
49
- *
50
- * @internal
51
- *
52
- * @const {RegExp} EXPORT_STAR_REGEX
53
- */
54
- export declare const EXPORT_STAR_REGEX: RegExp;
55
- /**
56
- * Require statement regex.
57
- *
58
- * @internal
59
- *
60
- * @const {RegExp} REQUIRE_STATEMENT_REGEX
61
- */
62
- export declare const REQUIRE_STATEMENT_REGEX: RegExp;
63
- /**
64
- * Static import statement regex.
65
- *
66
- * @internal
67
- *
68
- * @const {RegExp} STATIC_IMPORT_REGEX
69
- */
70
- export declare const STATIC_IMPORT_REGEX: RegExp;
@@ -1,18 +0,0 @@
1
- const CJS_SYNTAX_REGEX = /(?<!(?:\/\/|\*).*)((?:module\.)?exports(?:\.\w+|(?<!\s+=))|require(?=\(.)|require\.\w+|__dirname|__filename|await import)/gm;
2
- const DYNAMIC_IMPORT_REGEX = /(?<!(?:\/\/|\*).*)(?:(?:const|let|var)(?:(?<name>\s+\w+\s*)|\s*{\s*(?<names>\w+(?:,\s*\w+)*)\s*}\s*)(?:\s*=\s*?)?.)?(?:await)?\s+import\s*\((?<expression>(?:[^()]+|\((?:[^()]+|\([^()]*\))*\))*)\)/gm;
3
- const ESM_SYNTAX_REGEX = /(?<!(?:\/\/|\*).*)((?:export|import)[\s\w*,{}]*(?=\sfrom)|export\b\s*(?:[*{]|async function|(?:abstract\s)?class|const|default|enum|function|interface|let|type|var)|await import|import\.meta\.(?:env(?:\.\w+)?|resolve|url))/gm;
4
- const EXPORT_DECLARATION_REGEX = /(?<!(?:\/\/|\*).*)\bexport(?: +declare)? +(?<declaration>(?:(?:abstract +)?class|(?:default +)?async +function\*?|(?:default +)?function\*?|default +async|default(?!(?: +async)? +function\*?)|(?:const +)?enum|const|interface|let|namespace|type(?! *{)|var)) +(?<name>[\w$]+(?!.*\b +=>))?/gm;
5
- const EXPORT_NAMED_REGEX = /(?<!(?:\/\/|\*).*)\bexport(?:\s+type)?\s+{(?<exports>[^}]+?)[\s,]*}(?:\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/gm;
6
- const EXPORT_STAR_REGEX = /(?<!(?:\/\/|\*).*)\bexport\s*\*(?:\s*as\s+(?<name>[\w$]+)\s+)?\s*(?:\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/gm;
7
- const REQUIRE_STATEMENT_REGEX = /(?<!(?:\/\/|\*).*)(?:\bconst[ {]+(?<imports>[\w\t\n\r $*,/]+)[ =}]+)?(?<type>\brequire(?:\.resolve)?)\(["'] *(?<specifier>(?<="\s*)[^"']*[^\s"'](?=\s*")|(?<=["']\s*)[^']*[^\s'](?=\s*')) *["']\)/gm;
8
- const STATIC_IMPORT_REGEX = /(?<!(?:\/\/|\*).*)(?<=\s|^|;)import\s*([\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gm;
9
- export {
10
- CJS_SYNTAX_REGEX,
11
- DYNAMIC_IMPORT_REGEX,
12
- ESM_SYNTAX_REGEX,
13
- EXPORT_DECLARATION_REGEX,
14
- EXPORT_NAMED_REGEX,
15
- EXPORT_STAR_REGEX,
16
- REQUIRE_STATEMENT_REGEX,
17
- STATIC_IMPORT_REGEX
18
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * @file Internals
3
- * @module mlly/internal
4
- */
5
- export type { default as CompilerOptionsJson } from './compiler-options-json.mjs';
6
- export * from './constants.mjs';
7
- export { default as getCompilerOptions } from './get-compiler-options.mjs';
@@ -1,5 +0,0 @@
1
- export * from "./constants.mjs";
2
- import { default as default2 } from "./get-compiler-options.mjs";
3
- export {
4
- default2 as getCompilerOptions
5
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * @file Type Definitions - Ext
3
- * @module mlly/types/Ext
4
- */
5
- /**
6
- * File extension type.
7
- */
8
- declare type Ext = `.${string}`;
9
- export type { Ext as default };
@@ -1,11 +0,0 @@
1
- /**
2
- * @file Type Definitions - SpecifierType
3
- * @module mlly/types/SpecifierType
4
- */
5
- /**
6
- * Module specifier types.
7
- *
8
- * @see https://nodejs.org/api/esm.html#terminology
9
- */
10
- declare type SpecifierType = 'absolute' | 'bare' | 'relative';
11
- export type { SpecifierType as default };
@@ -1,9 +0,0 @@
1
- /**
2
- * @file Type Definitions - StatementType
3
- * @module mlly/types/StatementType
4
- */
5
- /**
6
- * CommonJS and ESM statement types.
7
- */
8
- declare type StatementType = 'declaration' | 'default' | 'dynamic' | 'named' | 'require.resolve' | 'require' | 'star';
9
- export type { StatementType as default };