@flex-development/mlly 1.0.0-alpha.15 → 1.0.0-alpha.16
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/CHANGELOG.md +181 -0
- package/README.md +1 -0
- package/dist/enums/assert-type.mjs +1 -7
- package/dist/enums/format.mjs +1 -10
- package/dist/enums/index.mjs +0 -1
- package/dist/enums/kind-specifier-syntax.mjs +1 -7
- package/dist/enums/kind-specifier.mjs +1 -8
- package/dist/enums/kind-statement-syntax.mjs +1 -15
- package/dist/enums/kind-statement.mjs +1 -8
- package/dist/index.mjs.map +5 -2
- package/dist/interfaces/import-dynamic.d.mts +1 -3
- package/dist/interfaces/import-static.d.mts +1 -3
- package/dist/interfaces/index.mjs +0 -1
- package/dist/interfaces/options-find-subpath.d.mts +4 -3
- package/dist/interfaces/options-get-format.d.mts +7 -7
- package/dist/interfaces/options-get-source.d.mts +5 -4
- package/dist/interfaces/options-parse-module-id.d.mts +4 -3
- package/dist/interfaces/options-parse-subpath.d.mts +4 -3
- package/dist/interfaces/options-resolve-alias.d.mts +5 -5
- package/dist/interfaces/options-resolve-module.d.mts +6 -6
- package/dist/internal/dequote.d.mts +14 -0
- package/dist/internal/dequote.mjs +6 -0
- package/dist/internal/format-type-map.d.mts +2 -0
- package/dist/internal/format-type-map.mjs +0 -1
- package/dist/internal/get-specifier-kind.d.mts +2 -0
- package/dist/internal/get-specifier-kind.mjs +3 -7
- package/dist/internal/get-subpaths.d.mts +5 -2
- package/dist/internal/get-subpaths.mjs +2 -5
- package/dist/internal/regex-encoded-sep.d.mts +2 -0
- package/dist/internal/regex-encoded-sep.mjs +0 -1
- package/dist/internal/regex-internal-specifier.d.mts +2 -0
- package/dist/internal/regex-internal-specifier.mjs +0 -1
- package/dist/internal/regex-invalid-segment.d.mts +2 -0
- package/dist/internal/regex-invalid-segment.mjs +4 -7
- package/dist/internal/regex-package-name.d.mts +2 -0
- package/dist/internal/regex-package-name.mjs +0 -1
- package/dist/internal/regex-package-path.d.mts +2 -0
- package/dist/internal/regex-package-path.mjs +0 -1
- package/dist/internal/resolver.d.mts +5 -3
- package/dist/internal/resolver.mjs +115 -130
- package/dist/internal/validate-array-set.d.mts +7 -5
- package/dist/internal/validate-array-set.mjs +5 -5
- package/dist/internal/validate-boolean.d.mts +4 -2
- package/dist/internal/validate-boolean.mjs +3 -3
- package/dist/internal/validate-map.d.mts +10 -7
- package/dist/internal/validate-map.mjs +5 -5
- package/dist/internal/validate-object.d.mts +9 -9
- package/dist/internal/validate-object.mjs +3 -3
- package/dist/internal/validate-set.d.mts +7 -5
- package/dist/internal/validate-set.mjs +5 -5
- package/dist/internal/validate-string.d.mts +5 -2
- package/dist/internal/validate-string.mjs +3 -3
- package/dist/internal/validate-url-string.d.mts +4 -2
- package/dist/internal/validate-url-string.mjs +3 -3
- package/dist/types/fn-change-ext.d.mts +7 -4
- package/dist/types/index.mjs +0 -1
- package/dist/utils/compare-subpaths.mjs +5 -10
- package/dist/utils/compare-subpaths.mjs.map +6 -3
- package/dist/utils/conditions.mjs.map +5 -2
- package/dist/utils/detect-syntax.mjs +1 -2
- package/dist/utils/detect-syntax.mjs.map +6 -3
- package/dist/utils/extension-format-map.mjs.map +5 -2
- package/dist/utils/extract-statements.mjs +6 -7
- package/dist/utils/extract-statements.mjs.map +6 -3
- package/dist/utils/fill-modules.mjs +43 -46
- package/dist/utils/fill-modules.mjs.map +9 -4
- package/dist/utils/find-dynamic-imports.mjs +23 -26
- package/dist/utils/find-dynamic-imports.mjs.map +9 -4
- package/dist/utils/find-exports.mjs +15 -20
- package/dist/utils/find-exports.mjs.map +9 -4
- package/dist/utils/find-requires.mjs +5 -5
- package/dist/utils/find-requires.mjs.map +9 -4
- package/dist/utils/find-static-imports.mjs +17 -21
- package/dist/utils/find-static-imports.mjs.map +9 -4
- package/dist/utils/find-subpath.d.mts +3 -3
- package/dist/utils/find-subpath.mjs +52 -74
- package/dist/utils/find-subpath.mjs.map +10 -4
- package/dist/utils/get-format.mjs +18 -33
- package/dist/utils/get-format.mjs.map +9 -4
- package/dist/utils/get-source.d.mts +3 -2
- package/dist/utils/get-source.mjs +10 -19
- package/dist/utils/get-source.mjs.map +6 -3
- package/dist/utils/has-cjs-syntax.mjs.map +5 -2
- package/dist/utils/has-esm-syntax.mjs.map +5 -2
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.mjs +46 -42
- package/dist/utils/index.mjs.map +9 -4
- package/dist/utils/is-absolute-specifier.mjs +5 -6
- package/dist/utils/is-absolute-specifier.mjs.map +6 -3
- package/dist/utils/is-bare-specifier.mjs +2 -4
- package/dist/utils/is-bare-specifier.mjs.map +6 -3
- package/dist/utils/is-directory.mjs +14 -0
- package/dist/utils/is-directory.mjs.map +9 -0
- package/dist/utils/is-exports-sugar.d.mts +3 -2
- package/dist/utils/is-exports-sugar.mjs +16 -13
- package/dist/utils/is-exports-sugar.mjs.map +6 -3
- package/dist/utils/is-file.mjs +14 -0
- package/dist/utils/is-file.mjs.map +9 -0
- package/dist/utils/is-relative-specifier.d.mts +0 -1
- package/dist/utils/is-relative-specifier.mjs +2 -4
- package/dist/utils/is-relative-specifier.mjs.map +6 -3
- package/dist/utils/lookup-package-scope.d.mts +1 -1
- package/dist/utils/lookup-package-scope.mjs +4 -8
- package/dist/utils/lookup-package-scope.mjs.map +6 -3
- package/dist/utils/parse-data-url.mjs +4 -4
- package/dist/utils/parse-data-url.mjs.map +6 -3
- package/dist/utils/parse-module-id.mjs +22 -24
- package/dist/utils/parse-module-id.mjs.map +10 -4
- package/dist/utils/parse-subpath.d.mts +3 -2
- package/dist/utils/parse-subpath.mjs +40 -55
- package/dist/utils/parse-subpath.mjs.map +9 -4
- package/dist/utils/pattern-character.mjs.map +5 -2
- package/dist/utils/read-package-json.mjs +12 -9
- package/dist/utils/read-package-json.mjs.map +6 -3
- package/dist/utils/resolve-alias.mjs +28 -34
- package/dist/utils/resolve-alias.mjs.map +10 -4
- package/dist/utils/resolve-aliases.mjs +15 -17
- package/dist/utils/resolve-aliases.mjs.map +6 -3
- package/dist/utils/resolve-extensions.mjs.map +5 -2
- package/dist/utils/resolve-module.mjs +10 -26
- package/dist/utils/resolve-module.mjs.map +6 -3
- package/dist/utils/resolve-modules.mjs +12 -15
- package/dist/utils/resolve-modules.mjs.map +6 -3
- package/dist/utils/to-absolute-specifier.mjs.map +5 -2
- package/dist/utils/to-bare-specifier.mjs +18 -38
- package/dist/utils/to-bare-specifier.mjs.map +6 -3
- package/dist/utils/to-data-url.mjs +1 -5
- package/dist/utils/to-data-url.mjs.map +6 -3
- package/dist/utils/to-node-url.mjs +1 -4
- package/dist/utils/to-node-url.mjs.map +6 -3
- package/dist/utils/to-relative-specifier.mjs +2 -16
- package/dist/utils/to-relative-specifier.mjs.map +6 -3
- package/dist/utils/to-url.mjs +1 -5
- package/dist/utils/to-url.mjs.map +6 -3
- package/dist/utils/validate-assertions.d.mts +2 -2
- package/dist/utils/validate-assertions.mjs +14 -21
- package/dist/utils/validate-assertions.mjs.map +9 -4
- package/dist/utils/validate-exports.d.mts +3 -2
- package/dist/utils/validate-exports.mjs +25 -24
- package/dist/utils/validate-exports.mjs.map +6 -3
- package/package.json +89 -81
- package/src/interfaces/import-dynamic.ts +1 -3
- package/src/interfaces/import-static.ts +1 -5
- package/src/interfaces/options-find-subpath.ts +4 -3
- package/src/interfaces/options-get-format.ts +7 -7
- package/src/interfaces/options-get-source.ts +5 -4
- package/src/interfaces/options-parse-module-id.ts +4 -3
- package/src/interfaces/options-parse-subpath.ts +4 -3
- package/src/interfaces/options-resolve-alias.ts +5 -5
- package/src/interfaces/options-resolve-module.ts +6 -6
- package/src/internal/dequote.ts +18 -0
- package/src/internal/format-type-map.ts +2 -0
- package/src/internal/get-specifier-kind.ts +7 -4
- package/src/internal/get-subpaths.ts +7 -5
- package/src/internal/regex-encoded-sep.ts +2 -0
- package/src/internal/regex-internal-specifier.ts +2 -0
- package/src/internal/regex-invalid-segment.ts +2 -0
- package/src/internal/regex-package-name.ts +2 -0
- package/src/internal/regex-package-path.ts +2 -0
- package/src/internal/resolver.ts +71 -49
- package/src/internal/validate-array-set.ts +10 -7
- package/src/internal/validate-boolean.ts +6 -3
- package/src/internal/validate-map.ts +12 -9
- package/src/internal/validate-object.ts +10 -10
- package/src/internal/validate-set.ts +9 -9
- package/src/internal/validate-string.ts +7 -3
- package/src/internal/validate-url-string.ts +6 -3
- package/src/types/fn-change-ext.ts +7 -7
- package/src/utils/extract-statements.ts +11 -7
- package/src/utils/fill-modules.ts +70 -62
- package/src/utils/find-dynamic-imports.ts +6 -6
- package/src/utils/find-exports.ts +19 -29
- package/src/utils/find-requires.ts +6 -6
- package/src/utils/find-static-imports.ts +11 -14
- package/src/utils/find-subpath.ts +140 -139
- package/src/utils/get-format.ts +27 -21
- package/src/utils/get-source.ts +5 -5
- package/src/utils/index.ts +2 -0
- package/src/utils/is-bare-specifier.ts +2 -1
- package/src/{internal → utils}/is-directory.ts +1 -1
- package/src/utils/is-exports-sugar.ts +16 -9
- package/src/{internal → utils}/is-file.ts +1 -1
- package/src/utils/is-relative-specifier.ts +5 -6
- package/src/utils/lookup-package-scope.ts +2 -2
- package/src/utils/parse-data-url.ts +3 -3
- package/src/utils/parse-module-id.ts +16 -8
- package/src/utils/parse-subpath.ts +32 -19
- package/src/utils/read-package-json.ts +13 -6
- package/src/utils/resolve-alias.ts +19 -15
- package/src/utils/resolve-aliases.ts +25 -25
- package/src/utils/resolve-module.ts +4 -5
- package/src/utils/resolve-modules.ts +19 -21
- package/src/utils/to-bare-specifier.ts +12 -7
- package/src/utils/to-relative-specifier.ts +2 -1
- package/src/utils/validate-assertions.ts +12 -7
- package/src/utils/validate-exports.ts +25 -18
- package/dist/enums/assert-type.mjs.map +0 -6
- package/dist/enums/format.mjs.map +0 -6
- package/dist/enums/index.mjs.map +0 -6
- package/dist/enums/kind-specifier-syntax.mjs.map +0 -6
- package/dist/enums/kind-specifier.mjs.map +0 -6
- package/dist/enums/kind-statement-syntax.mjs.map +0 -6
- package/dist/enums/kind-statement.mjs.map +0 -6
- package/dist/interfaces/index.mjs.map +0 -6
- package/dist/internal/escape-reg-exp.d.mts +0 -16
- package/dist/internal/escape-reg-exp.mjs +0 -10
- package/dist/internal/escape-reg-exp.mjs.map +0 -6
- package/dist/internal/format-type-map.mjs.map +0 -6
- package/dist/internal/get-specifier-kind.mjs.map +0 -6
- package/dist/internal/get-subpaths.mjs.map +0 -6
- package/dist/internal/is-array-index.d.mts +0 -15
- package/dist/internal/is-array-index.mjs +0 -9
- package/dist/internal/is-array-index.mjs.map +0 -6
- package/dist/internal/is-directory.mjs +0 -16
- package/dist/internal/is-directory.mjs.map +0 -6
- package/dist/internal/is-file.mjs +0 -16
- package/dist/internal/is-file.mjs.map +0 -6
- package/dist/internal/is-function.d.mts +0 -12
- package/dist/internal/is-function.mjs +0 -8
- package/dist/internal/is-function.mjs.map +0 -6
- package/dist/internal/regex-encoded-sep.mjs.map +0 -6
- package/dist/internal/regex-internal-specifier.mjs.map +0 -6
- package/dist/internal/regex-invalid-segment.mjs.map +0 -6
- package/dist/internal/regex-package-name.mjs.map +0 -6
- package/dist/internal/regex-package-path.mjs.map +0 -6
- package/dist/internal/resolver.mjs.map +0 -6
- package/dist/internal/validate-array-set.mjs.map +0 -6
- package/dist/internal/validate-boolean.mjs.map +0 -6
- package/dist/internal/validate-map.mjs.map +0 -6
- package/dist/internal/validate-object.mjs.map +0 -6
- package/dist/internal/validate-set.mjs.map +0 -6
- package/dist/internal/validate-string.mjs.map +0 -6
- package/dist/internal/validate-url-string.mjs.map +0 -6
- package/dist/types/index.mjs.map +0 -6
- package/src/internal/escape-reg-exp.ts +0 -24
- package/src/internal/is-array-index.ts +0 -28
- package/src/internal/is-function.ts +0 -16
- /package/dist/{internal → utils}/is-directory.d.mts +0 -0
- /package/dist/{internal → utils}/is-file.d.mts +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flex-development/mlly",
|
|
3
3
|
"description": "ECMAScript module utilities",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.16",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ecmascript",
|
|
7
7
|
"esm",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"typescript"
|
|
11
11
|
],
|
|
12
12
|
"license": "BSD-3-Clause",
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://mlly.vercel.app",
|
|
14
14
|
"repository": "https://github.com/flex-development/mlly.git",
|
|
15
15
|
"bugs": "https://github.com/flex-development/mlly/issues",
|
|
16
16
|
"author": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
25
|
"files": [
|
|
26
|
+
"CHANGELOG.md",
|
|
26
27
|
"dist",
|
|
27
28
|
"src"
|
|
28
29
|
],
|
|
@@ -35,11 +36,12 @@
|
|
|
35
36
|
"scripts": {
|
|
36
37
|
"build": "mkbuild",
|
|
37
38
|
"changelog": "node --loader=./loader.mjs ./config/changelog.config",
|
|
38
|
-
"check:ci": "yarn dedupe --check && yarn check:format && yarn check:lint && yarn check:spelling && yarn typecheck && yarn test:cov &&
|
|
39
|
+
"check:ci": "yarn dedupe --check && yarn check:format && yarn check:lint && yarn check:spelling && yarn typecheck && yarn test:cov && yarn pack && yarn check:types:build && attw package.tgz && yarn clean:pack && yarn pkg-size && yarn docs:build",
|
|
39
40
|
"check:format": "prettier --check .",
|
|
40
41
|
"check:lint": "eslint --exit-on-fatal-error --max-warnings 0 .",
|
|
41
42
|
"check:spelling": "cspell lint --color --no-progress --relative $@ \"**\"",
|
|
42
43
|
"check:types": "vue-tsc -p tsconfig.typecheck.json",
|
|
44
|
+
"check:types:attw": "yarn pack && attw package.tgz && yarn clean:pack",
|
|
43
45
|
"check:types:build": "bash ./scripts/typecheck-build.sh",
|
|
44
46
|
"check:upgrades": "yarn upgrade-interactive",
|
|
45
47
|
"clean:build": "trash ./{dist,*.tgz}",
|
|
@@ -60,6 +62,7 @@
|
|
|
60
62
|
"fix:dedupe": "yarn dedupe --strategy=highest",
|
|
61
63
|
"fix:format": "prettier --cache --write .",
|
|
62
64
|
"fix:lint": "yarn check:lint --cache --fix",
|
|
65
|
+
"pkg-size": "pkg-size --sizes size --sort-by name",
|
|
63
66
|
"_postinstall": "[ -f ./node_modules/.bin/husky ] && chmod +x .husky/* && husky install || exit 0",
|
|
64
67
|
"postpack": "toggle-scripts +postinstall",
|
|
65
68
|
"postpublish": "toggle-scripts +prepack",
|
|
@@ -69,127 +72,129 @@
|
|
|
69
72
|
"release": "bash ./scripts/release.sh",
|
|
70
73
|
"test": "vitest run",
|
|
71
74
|
"test:cov": "yarn clean:coverage; yarn test --coverage",
|
|
72
|
-
"test:cov:serve": "
|
|
75
|
+
"test:cov:serve": "vite preview --outDir ./coverage",
|
|
73
76
|
"test:cov:upload": "./codecov -t $CODECOV_TOKEN -f ./coverage/lcov.info",
|
|
74
77
|
"test:watch": "vitest",
|
|
75
78
|
"typecheck": "vitest typecheck --run",
|
|
76
79
|
"typecheck:watch": "vitest typecheck"
|
|
77
80
|
},
|
|
78
81
|
"dependencies": {
|
|
79
|
-
"@flex-development/errnode": "
|
|
80
|
-
"@flex-development/export-regex": "
|
|
81
|
-
"@flex-development/import-regex": "
|
|
82
|
-
"@flex-development/is-builtin": "
|
|
83
|
-
"@flex-development/pathe": "
|
|
84
|
-
"@flex-development/pkg-types": "
|
|
85
|
-
"@flex-development/tutils": "6.0.0-alpha.
|
|
82
|
+
"@flex-development/errnode": "2.0.0",
|
|
83
|
+
"@flex-development/export-regex": "2.0.0",
|
|
84
|
+
"@flex-development/import-regex": "3.0.0",
|
|
85
|
+
"@flex-development/is-builtin": "3.1.0",
|
|
86
|
+
"@flex-development/pathe": "2.0.0",
|
|
87
|
+
"@flex-development/pkg-types": "3.0.0",
|
|
88
|
+
"@flex-development/tutils": "6.0.0-alpha.15"
|
|
86
89
|
},
|
|
87
90
|
"devDependencies": {
|
|
88
|
-
"@
|
|
91
|
+
"@arethetypeswrong/cli": "0.7.1",
|
|
92
|
+
"@commitlint/cli": "17.6.7",
|
|
89
93
|
"@commitlint/types": "17.4.4",
|
|
90
|
-
"@docsearch/react": "3.
|
|
91
|
-
"@faker-js/faker": "8.0.
|
|
94
|
+
"@docsearch/react": "3.5.1",
|
|
95
|
+
"@faker-js/faker": "8.0.2",
|
|
92
96
|
"@flex-development/commitlint-config": "1.0.1",
|
|
93
|
-
"@flex-development/
|
|
94
|
-
"@flex-development/docast
|
|
95
|
-
"@flex-development/
|
|
96
|
-
"@
|
|
97
|
-
"@
|
|
98
|
-
"@
|
|
97
|
+
"@flex-development/decorator-regex": "2.0.0",
|
|
98
|
+
"@flex-development/docast": "1.0.0-alpha.13",
|
|
99
|
+
"@flex-development/docast-parse": "1.0.0-alpha.5",
|
|
100
|
+
"@flex-development/esm-types": "2.0.0",
|
|
101
|
+
"@flex-development/mkbuild": "1.0.0-alpha.20",
|
|
102
|
+
"@graphql-eslint/eslint-plugin": "3.20.1",
|
|
103
|
+
"@sindresorhus/slugify": "2.2.1",
|
|
104
|
+
"@types/chai": "4.3.5",
|
|
99
105
|
"@types/chai-string": "1.4.2",
|
|
100
106
|
"@types/conventional-changelog": "3.1.1",
|
|
101
107
|
"@types/conventional-changelog-core": "4.2.1",
|
|
102
108
|
"@types/conventional-changelog-writer": "4.0.2",
|
|
103
109
|
"@types/conventional-recommended-bump": "6.1.0",
|
|
104
110
|
"@types/dateformat": "5.0.0",
|
|
105
|
-
"@types/eslint": "8.
|
|
111
|
+
"@types/eslint": "8.44.2",
|
|
106
112
|
"@types/git-raw-commits": "2.0.1",
|
|
107
113
|
"@types/is-ci": "3.0.0",
|
|
108
114
|
"@types/markdown-it": "12.2.3",
|
|
109
|
-
"@types/node": "
|
|
115
|
+
"@types/node": "20.4.8",
|
|
110
116
|
"@types/node-notifier": "8.0.2",
|
|
111
|
-
"@types/prettier": "
|
|
112
|
-
"@types/semver": "7.
|
|
113
|
-
"@types/unist": "
|
|
114
|
-
"@typescript-eslint/eslint-plugin": "
|
|
115
|
-
"@typescript-eslint/parser": "
|
|
117
|
+
"@types/prettier": "3.0.0",
|
|
118
|
+
"@types/semver": "7.5.0",
|
|
119
|
+
"@types/unist": "3.0.0",
|
|
120
|
+
"@typescript-eslint/eslint-plugin": "6.2.1",
|
|
121
|
+
"@typescript-eslint/parser": "6.2.1",
|
|
116
122
|
"@vates/toggle-scripts": "1.0.0",
|
|
117
|
-
"@vitest/coverage-
|
|
118
|
-
"@
|
|
119
|
-
"@vue/runtime-core": "3.2.47",
|
|
123
|
+
"@vitest/coverage-v8": "0.34.1",
|
|
124
|
+
"@vue/runtime-core": "3.3.4",
|
|
120
125
|
"add-stream": "1.0.0",
|
|
121
|
-
"algoliasearch": "4.
|
|
122
|
-
"chai": "
|
|
126
|
+
"algoliasearch": "4.19.1",
|
|
127
|
+
"chai": "5.0.0-alpha.1",
|
|
123
128
|
"chai-each": "0.0.1",
|
|
124
129
|
"chai-quantifiers": "1.0.17",
|
|
125
130
|
"chai-string": "1.5.0",
|
|
126
131
|
"cheerio": "1.0.0-rc.12",
|
|
127
|
-
"conventional-changelog": "
|
|
128
|
-
"conventional-changelog-conventionalcommits": "
|
|
129
|
-
"conventional-changelog-core": "
|
|
130
|
-
"conventional-changelog-writer": "
|
|
131
|
-
"conventional-recommended-bump": "
|
|
132
|
+
"conventional-changelog": "4.0.0",
|
|
133
|
+
"conventional-changelog-conventionalcommits": "6.1.0",
|
|
134
|
+
"conventional-changelog-core": "5.0.2",
|
|
135
|
+
"conventional-changelog-writer": "6.0.1",
|
|
136
|
+
"conventional-recommended-bump": "7.0.1",
|
|
132
137
|
"cross-env": "7.0.3",
|
|
133
|
-
"cspell": "
|
|
138
|
+
"cspell": "7.0.1-alpha.8",
|
|
134
139
|
"dateformat": "5.0.3",
|
|
135
|
-
"dotenv": "16.
|
|
136
|
-
"esbuild": "0.
|
|
137
|
-
"
|
|
138
|
-
"eslint": "
|
|
139
|
-
"eslint-
|
|
140
|
+
"dotenv": "16.3.1",
|
|
141
|
+
"esbuild": "0.18.19",
|
|
142
|
+
"eslint": "8.46.0",
|
|
143
|
+
"eslint-config-prettier": "9.0.0",
|
|
144
|
+
"eslint-import-resolver-typescript": "3.5.5",
|
|
140
145
|
"eslint-plugin-chai-expect": "3.0.0",
|
|
146
|
+
"eslint-plugin-import": "2.27.5",
|
|
141
147
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
142
|
-
"eslint-plugin-jsdoc": "
|
|
143
|
-
"eslint-plugin-jsonc": "2.
|
|
144
|
-
"eslint-plugin-markdown": "3.0.
|
|
145
|
-
"eslint-plugin-markdownlint": "0.4.
|
|
148
|
+
"eslint-plugin-jsdoc": "44.1.0",
|
|
149
|
+
"eslint-plugin-jsonc": "2.9.0",
|
|
150
|
+
"eslint-plugin-markdown": "3.0.1",
|
|
151
|
+
"eslint-plugin-markdownlint": "0.4.1",
|
|
146
152
|
"eslint-plugin-node": "11.1.0",
|
|
147
|
-
"eslint-plugin-prettier": "
|
|
153
|
+
"eslint-plugin-prettier": "5.0.0",
|
|
148
154
|
"eslint-plugin-promise": "6.1.1",
|
|
149
|
-
"eslint-plugin-unicorn": "
|
|
150
|
-
"eslint-plugin-vue": "9.
|
|
151
|
-
"eslint-plugin-yml": "1.
|
|
152
|
-
"globby": "13.
|
|
153
|
-
"graphql": "16.
|
|
154
|
-
"graphql-config": "
|
|
155
|
+
"eslint-plugin-unicorn": "48.0.1",
|
|
156
|
+
"eslint-plugin-vue": "9.16.1",
|
|
157
|
+
"eslint-plugin-yml": "1.8.0",
|
|
158
|
+
"globby": "13.2.2",
|
|
159
|
+
"graphql": "16.7.1",
|
|
160
|
+
"graphql-config": "5.0.2",
|
|
161
|
+
"gray-matter": "4.0.3",
|
|
155
162
|
"growl": "1.10.5",
|
|
156
163
|
"husky": "8.0.3",
|
|
157
164
|
"is-ci": "3.0.1",
|
|
158
|
-
"jsonc-eslint-parser": "2.
|
|
159
|
-
"lint-staged": "13.
|
|
165
|
+
"jsonc-eslint-parser": "2.3.0",
|
|
166
|
+
"lint-staged": "13.2.3",
|
|
160
167
|
"mri": "1.2.0",
|
|
161
|
-
"node-fetch": "3.3.
|
|
168
|
+
"node-fetch": "3.3.2",
|
|
162
169
|
"node-notifier": "10.0.1",
|
|
163
|
-
"
|
|
164
|
-
"prettier
|
|
165
|
-
"
|
|
170
|
+
"pkg-size": "2.4.0",
|
|
171
|
+
"prettier": "3.0.1",
|
|
172
|
+
"prettier-plugin-sh": "0.13.1",
|
|
166
173
|
"sade": "1.8.1",
|
|
167
|
-
"semver": "7.
|
|
168
|
-
"serve": "14.2.0",
|
|
169
|
-
"sitemap": "7.1.1",
|
|
174
|
+
"semver": "7.5.4",
|
|
170
175
|
"tempfile": "5.0.0",
|
|
171
176
|
"trash-cli": "5.0.0",
|
|
172
177
|
"ts-dedent": "2.2.0",
|
|
173
|
-
"typescript": "5.1.
|
|
178
|
+
"typescript": "5.1.6",
|
|
174
179
|
"unified": "10.1.2",
|
|
175
|
-
"unist-util-remove": "
|
|
176
|
-
"unist-util-source": "
|
|
177
|
-
"unist-util-visit": "
|
|
178
|
-
"vercel": "
|
|
180
|
+
"unist-util-remove": "4.0.0",
|
|
181
|
+
"unist-util-source": "5.0.0",
|
|
182
|
+
"unist-util-visit": "5.0.0",
|
|
183
|
+
"vercel": "31.2.2",
|
|
179
184
|
"version-bump-prompt": "6.1.0",
|
|
180
|
-
"vfile": "
|
|
181
|
-
"vite": "4.
|
|
182
|
-
"vite-tsconfig-paths": "4.0
|
|
183
|
-
"vitepress": "1.0.0-
|
|
184
|
-
"vitest": "0.
|
|
185
|
+
"vfile": "6.0.1",
|
|
186
|
+
"vite": "4.4.8",
|
|
187
|
+
"vite-tsconfig-paths": "4.2.0",
|
|
188
|
+
"vitepress": "1.0.0-beta.7",
|
|
189
|
+
"vitest": "0.34.1",
|
|
185
190
|
"vitest-github-actions-reporter": "0.10.0",
|
|
186
|
-
"vue": "3.
|
|
187
|
-
"vue-eslint-parser": "9.1
|
|
188
|
-
"vue-tsc": "1.
|
|
189
|
-
"yaml-eslint-parser": "1.
|
|
191
|
+
"vue": "3.3.4",
|
|
192
|
+
"vue-eslint-parser": "9.3.1",
|
|
193
|
+
"vue-tsc": "1.7.8",
|
|
194
|
+
"yaml-eslint-parser": "1.2.2"
|
|
190
195
|
},
|
|
191
196
|
"peerDependencies": {
|
|
192
|
-
"@types/node": ">=
|
|
197
|
+
"@types/node": ">=16.18.23",
|
|
193
198
|
"node-fetch": ">=3.3.0"
|
|
194
199
|
},
|
|
195
200
|
"peerDependenciesMeta": {
|
|
@@ -199,11 +204,14 @@
|
|
|
199
204
|
},
|
|
200
205
|
"resolutions": {
|
|
201
206
|
"@ardatan/sync-fetch": "larsgw/sync-fetch#head=worker_threads",
|
|
202
|
-
"@
|
|
203
|
-
"
|
|
207
|
+
"@types/unist": "3.0.0",
|
|
208
|
+
"chai": "5.0.0-alpha.1",
|
|
209
|
+
"gray-matter": "4.0.3",
|
|
210
|
+
"vfile": "6.0.1",
|
|
211
|
+
"vitepress@npm:1.0.0-beta.7": "patch:vitepress@npm%3A1.0.0-beta.7#patches/vitepress+1.0.0-beta.7.dev.patch"
|
|
204
212
|
},
|
|
205
213
|
"engines": {
|
|
206
|
-
"node": ">=
|
|
214
|
+
"node": ">=16.20.0",
|
|
207
215
|
"yarn": "4.0.0-rc.39"
|
|
208
216
|
},
|
|
209
217
|
"packageManager": "yarn@4.0.0-rc.39",
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { StatementSyntaxKind } from '#src/enums'
|
|
7
|
-
import type { SyntaxKindImport } from '#src/types'
|
|
8
7
|
import type { EmptyString, LiteralUnion } from '@flex-development/tutils'
|
|
9
8
|
import type ImportStatement from './statement-import'
|
|
10
9
|
|
|
@@ -13,7 +12,6 @@ import type ImportStatement from './statement-import'
|
|
|
13
12
|
*
|
|
14
13
|
* @see {@linkcode ImportStatement}
|
|
15
14
|
* @see {@linkcode StatementSyntaxKind}
|
|
16
|
-
* @see {@linkcode SyntaxKindImport}
|
|
17
15
|
* @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/import
|
|
18
16
|
*
|
|
19
17
|
* @extends {ImportStatement}
|
|
@@ -42,7 +40,7 @@ interface DynamicImport extends ImportStatement {
|
|
|
42
40
|
/**
|
|
43
41
|
* Statement syntax kind.
|
|
44
42
|
*/
|
|
45
|
-
syntax:
|
|
43
|
+
syntax: StatementSyntaxKind.DYNAMIC
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
export type { DynamicImport as default }
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { StatementSyntaxKind } from '#src/enums'
|
|
7
|
-
import type { SyntaxKindImport } from '#src/types'
|
|
8
7
|
import type { EmptyString, LiteralUnion } from '@flex-development/tutils'
|
|
9
8
|
import type ImportStatement from './statement-import'
|
|
10
9
|
|
|
@@ -13,7 +12,6 @@ import type ImportStatement from './statement-import'
|
|
|
13
12
|
*
|
|
14
13
|
* @see {@linkcode ImportStatement}
|
|
15
14
|
* @see {@linkcode StatementSyntaxKind}
|
|
16
|
-
* @see {@linkcode SyntaxKindImport}
|
|
17
15
|
*
|
|
18
16
|
* @extends {ImportStatement}
|
|
19
17
|
*/
|
|
@@ -31,15 +29,13 @@ interface StaticImport extends ImportStatement {
|
|
|
31
29
|
/**
|
|
32
30
|
* Statement syntax kind.
|
|
33
31
|
*/
|
|
34
|
-
syntax:
|
|
35
|
-
SyntaxKindImport,
|
|
32
|
+
syntax:
|
|
36
33
|
| StatementSyntaxKind.DEFAULT
|
|
37
34
|
| StatementSyntaxKind.DEFAULT_WITH_NAMED
|
|
38
35
|
| StatementSyntaxKind.DEFAULT_WITH_NAMESPACE
|
|
39
36
|
| StatementSyntaxKind.NAMED
|
|
40
37
|
| StatementSyntaxKind.NAMESPACE
|
|
41
38
|
| StatementSyntaxKind.SIDE_EFFECT
|
|
42
|
-
>
|
|
43
39
|
|
|
44
40
|
/**
|
|
45
41
|
* Type-only import statement check.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { ModuleId } from '#src/types'
|
|
7
|
+
import type { Optional } from '@flex-development/tutils'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Subpath search options.
|
|
@@ -18,7 +19,7 @@ interface FindSubpathOptions {
|
|
|
18
19
|
*
|
|
19
20
|
* @default 'default'
|
|
20
21
|
*/
|
|
21
|
-
condition?: string
|
|
22
|
+
condition?: Optional<string>
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Export conditions.
|
|
@@ -29,7 +30,7 @@ interface FindSubpathOptions {
|
|
|
29
30
|
*
|
|
30
31
|
* @default CONDITIONS
|
|
31
32
|
*/
|
|
32
|
-
conditions?: Set<string
|
|
33
|
+
conditions?: Optional<Set<string>>
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* URL of directory containing relevant `package.json` file.
|
|
@@ -43,7 +44,7 @@ interface FindSubpathOptions {
|
|
|
43
44
|
*
|
|
44
45
|
* @default false
|
|
45
46
|
*/
|
|
46
|
-
internal?: boolean
|
|
47
|
+
internal?: Optional<boolean>
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* URL of module to resolve from.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { Format } from '#src/enums'
|
|
7
7
|
import type { Ext } from '@flex-development/pathe'
|
|
8
|
-
import type { EmptyString } from '@flex-development/tutils'
|
|
8
|
+
import type { EmptyString, Optional } from '@flex-development/tutils'
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Module format retrieval options.
|
|
@@ -22,7 +22,7 @@ interface GetFormatOptions {
|
|
|
22
22
|
*
|
|
23
23
|
* @default true
|
|
24
24
|
*/
|
|
25
|
-
experimental_json_modules?: boolean
|
|
25
|
+
experimental_json_modules?: Optional<boolean>
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Enable support for network based modules.
|
|
@@ -35,7 +35,7 @@ interface GetFormatOptions {
|
|
|
35
35
|
*
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
|
-
experimental_network_imports?: boolean
|
|
38
|
+
experimental_network_imports?: Optional<boolean>
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Enable support for WebAssembly modules.
|
|
@@ -44,14 +44,14 @@ interface GetFormatOptions {
|
|
|
44
44
|
*
|
|
45
45
|
* @default false
|
|
46
46
|
*/
|
|
47
|
-
experimental_wasm_modules?: boolean
|
|
47
|
+
experimental_wasm_modules?: Optional<boolean>
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Map file extensions to module formats.
|
|
51
51
|
*
|
|
52
52
|
* @default EXTENSION_FORMAT_MAP
|
|
53
53
|
*/
|
|
54
|
-
extension_format_map?: Map<EmptyString | Ext, Format
|
|
54
|
+
extension_format_map?: Optional<Map<EmptyString | Ext, Format>>
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Return `undefined` when module format is not found, rather than `null`.
|
|
@@ -63,7 +63,7 @@ interface GetFormatOptions {
|
|
|
63
63
|
*
|
|
64
64
|
* @default false
|
|
65
65
|
*/
|
|
66
|
-
ignore_errors?: boolean
|
|
66
|
+
ignore_errors?: Optional<boolean>
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Request options for network based modules.
|
|
@@ -74,7 +74,7 @@ interface GetFormatOptions {
|
|
|
74
74
|
*
|
|
75
75
|
* @default {}
|
|
76
76
|
*/
|
|
77
|
-
req?: import('node-fetch').RequestInit
|
|
77
|
+
req?: Optional<import('node-fetch').RequestInit>
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
export type { GetFormatOptions as default }
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { Format } from '#src/enums'
|
|
7
|
+
import type { Optional, OrLowercase } from '@flex-development/tutils'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Source code retrieval options.
|
|
@@ -23,7 +24,7 @@ interface GetSourceOptions {
|
|
|
23
24
|
*
|
|
24
25
|
* @default false
|
|
25
26
|
*/
|
|
26
|
-
experimental_network_imports?: boolean
|
|
27
|
+
experimental_network_imports?: Optional<boolean>
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Module format hint.
|
|
@@ -32,7 +33,7 @@ interface GetSourceOptions {
|
|
|
32
33
|
*
|
|
33
34
|
* @default undefined
|
|
34
35
|
*/
|
|
35
|
-
format?:
|
|
36
|
+
format?: Optional<OrLowercase<Format>>
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Ignore [`ERR_UNSUPPORTED_ESM_URL_SCHEME`][1] if thrown.
|
|
@@ -41,7 +42,7 @@ interface GetSourceOptions {
|
|
|
41
42
|
*
|
|
42
43
|
* @default false
|
|
43
44
|
*/
|
|
44
|
-
ignore_errors?: boolean
|
|
45
|
+
ignore_errors?: Optional<boolean>
|
|
45
46
|
|
|
46
47
|
/**
|
|
47
48
|
* Request options for network based modules.
|
|
@@ -52,7 +53,7 @@ interface GetSourceOptions {
|
|
|
52
53
|
*
|
|
53
54
|
* @default {}
|
|
54
55
|
*/
|
|
55
|
-
req?: import('node-fetch').RequestInit
|
|
56
|
+
req?: Optional<import('node-fetch').RequestInit>
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export type { GetSourceOptions as default }
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { ModuleId } from '#src/types'
|
|
7
|
+
import type { Optional } from '@flex-development/tutils'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Module id parsing options.
|
|
@@ -18,7 +19,7 @@ interface ParseModuleIdOptions {
|
|
|
18
19
|
*
|
|
19
20
|
* @default id instanceof URL ? false : id.startsWith('#')
|
|
20
21
|
*/
|
|
21
|
-
internal?: boolean
|
|
22
|
+
internal?: Optional<boolean>
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* URL of module to resolve from.
|
|
@@ -27,12 +28,12 @@ interface ParseModuleIdOptions {
|
|
|
27
28
|
*
|
|
28
29
|
* @default undefined
|
|
29
30
|
*/
|
|
30
|
-
parent?: ModuleId
|
|
31
|
+
parent?: Optional<ModuleId>
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Ensure module id begins with a valid package name.
|
|
34
35
|
*/
|
|
35
|
-
pkgname?: boolean
|
|
36
|
+
pkgname?: Optional<boolean>
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export type { ParseModuleIdOptions as default }
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { ModuleId } from '#src/types'
|
|
7
|
+
import type { Optional } from '@flex-development/tutils'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Subpath parsing options.
|
|
@@ -18,7 +19,7 @@ interface ParseSubpathOptions {
|
|
|
18
19
|
*
|
|
19
20
|
* @default 'default'
|
|
20
21
|
*/
|
|
21
|
-
condition?: string
|
|
22
|
+
condition?: Optional<string>
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Export conditions.
|
|
@@ -29,7 +30,7 @@ interface ParseSubpathOptions {
|
|
|
29
30
|
*
|
|
30
31
|
* @default CONDITIONS
|
|
31
32
|
*/
|
|
32
|
-
conditions?: Set<string> | string[]
|
|
33
|
+
conditions?: Optional<Set<string> | string[]>
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* URL of directory containing relevant `package.json` file.
|
|
@@ -43,7 +44,7 @@ interface ParseSubpathOptions {
|
|
|
43
44
|
*
|
|
44
45
|
* @default specifier.startsWith('#')
|
|
45
46
|
*/
|
|
46
|
-
internal?: boolean
|
|
47
|
+
internal?: Optional<boolean>
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* URL of module to resolve from.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { ModuleId } from '#src/types'
|
|
7
|
-
import type { MapLike, OneOrMany } from '@flex-development/tutils'
|
|
7
|
+
import type { MapLike, OneOrMany, Optional } from '@flex-development/tutils'
|
|
8
8
|
import type ResolveModuleOptions from './options-resolve-module'
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -26,7 +26,7 @@ interface ResolveAliasOptions extends ResolveModuleOptions {
|
|
|
26
26
|
*
|
|
27
27
|
* @default true
|
|
28
28
|
*/
|
|
29
|
-
absolute?: boolean
|
|
29
|
+
absolute?: Optional<boolean>
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Path mappings.
|
|
@@ -35,14 +35,14 @@ interface ResolveAliasOptions extends ResolveModuleOptions {
|
|
|
35
35
|
*
|
|
36
36
|
* @default {}
|
|
37
37
|
*/
|
|
38
|
-
aliases?: MapLike<OneOrMany<string
|
|
38
|
+
aliases?: Optional<MapLike<OneOrMany<string>>>
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Directory to resolve non-absolute modules from.
|
|
42
42
|
*
|
|
43
43
|
* @default pathToFileURL('.')
|
|
44
44
|
*/
|
|
45
|
-
cwd?: ModuleId
|
|
45
|
+
cwd?: Optional<ModuleId>
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Id of module to resolve from.
|
|
@@ -53,7 +53,7 @@ interface ResolveAliasOptions extends ResolveModuleOptions {
|
|
|
53
53
|
*
|
|
54
54
|
* @default import.meta.url
|
|
55
55
|
*/
|
|
56
|
-
parent?: ModuleId
|
|
56
|
+
parent?: Optional<ModuleId>
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export type { ResolveAliasOptions as default }
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { ChangeExtFn, ModuleId } from '#src/types'
|
|
7
|
-
import type { Nilable } from '@flex-development/tutils'
|
|
7
|
+
import type { Nilable, Optional } from '@flex-development/tutils'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Module resolution options.
|
|
@@ -20,7 +20,7 @@ interface ResolveModuleOptions {
|
|
|
20
20
|
*
|
|
21
21
|
* @default 'default'
|
|
22
22
|
*/
|
|
23
|
-
condition?: string
|
|
23
|
+
condition?: Optional<string>
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Export conditions.
|
|
@@ -31,7 +31,7 @@ interface ResolveModuleOptions {
|
|
|
31
31
|
*
|
|
32
32
|
* @default CONDITIONS
|
|
33
33
|
*/
|
|
34
|
-
conditions?: Set<string> | string[]
|
|
34
|
+
conditions?: Optional<Set<string> | string[]>
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Replacement file extension or function that returns a file extension.
|
|
@@ -50,7 +50,7 @@ interface ResolveModuleOptions {
|
|
|
50
50
|
*
|
|
51
51
|
* @default RESOLVE_EXTENSIONS
|
|
52
52
|
*/
|
|
53
|
-
extensions?: Set<string> | string[]
|
|
53
|
+
extensions?: Optional<Set<string> | string[]>
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* URL of module to resolve from.
|
|
@@ -59,14 +59,14 @@ interface ResolveModuleOptions {
|
|
|
59
59
|
*
|
|
60
60
|
* @default import.meta.url
|
|
61
61
|
*/
|
|
62
|
-
parent?: ModuleId
|
|
62
|
+
parent?: Optional<ModuleId>
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Keep symlinks instead of resolving them.
|
|
66
66
|
*
|
|
67
67
|
* @default false
|
|
68
68
|
*/
|
|
69
|
-
preserveSymlinks?: boolean
|
|
69
|
+
preserveSymlinks?: Optional<boolean>
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export type { ResolveModuleOptions as default }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Internal - dequote
|
|
3
|
+
* @module mlly/internal/dequote
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { trim } from '@flex-development/tutils'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Removes quotes from the beginning and end of a string.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*
|
|
13
|
+
* @param {string} str - String to dequote
|
|
14
|
+
* @return {string} String with quotes removed
|
|
15
|
+
*/
|
|
16
|
+
const dequote = (str: string): string => trim(str).replace(/^["']|["']$/g, '')
|
|
17
|
+
|
|
18
|
+
export default dequote
|
|
@@ -13,6 +13,8 @@ import { AssertType, Format } from '#src/enums'
|
|
|
13
13
|
*
|
|
14
14
|
* @see https://github.com/WebAssembly/esm-integration/issues/42
|
|
15
15
|
*
|
|
16
|
+
* @internal
|
|
17
|
+
*
|
|
16
18
|
* @const {Map<Format, AssertType>} FORMAT_TYPE_MAP
|
|
17
19
|
*/
|
|
18
20
|
const FORMAT_TYPE_MAP: Map<Format, AssertType> = new Map<Format, AssertType>([
|