@flex-development/mlly 1.0.0-alpha.6 → 1.0.0-alpha.7

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 (263) hide show
  1. package/CHANGELOG.md +175 -0
  2. package/README.md +1 -1
  3. package/changelog.config.ts +404 -0
  4. package/dist/enums/assert-type.d.mts +21 -0
  5. package/dist/enums/assert-type.mjs +10 -0
  6. package/dist/enums/assert-type.mjs.map +6 -0
  7. package/dist/enums/format.d.mts +17 -0
  8. package/dist/enums/format.mjs +13 -0
  9. package/dist/enums/format.mjs.map +6 -0
  10. package/dist/enums/index.d.mts +4 -1
  11. package/dist/enums/index.mjs +13 -6
  12. package/dist/enums/index.mjs.map +6 -0
  13. package/dist/enums/kind-specifier-syntax.d.mts +14 -0
  14. package/dist/enums/kind-specifier-syntax.mjs +10 -0
  15. package/dist/enums/kind-specifier-syntax.mjs.map +6 -0
  16. package/dist/enums/kind-specifier.d.mts +6 -3
  17. package/dist/enums/kind-specifier.mjs +4 -2
  18. package/dist/enums/kind-specifier.mjs.map +6 -0
  19. package/dist/enums/{kind-syntax.d.mts → kind-statement-syntax.d.mts} +4 -4
  20. package/dist/enums/kind-statement-syntax.mjs +18 -0
  21. package/dist/enums/kind-statement-syntax.mjs.map +6 -0
  22. package/dist/enums/kind-statement.mjs +1 -0
  23. package/dist/enums/kind-statement.mjs.map +6 -0
  24. package/dist/index.d.mts +1 -2
  25. package/dist/index.mjs +2 -2
  26. package/dist/index.mjs.map +6 -0
  27. package/dist/interfaces/import-assertions.d.mts +20 -0
  28. package/dist/interfaces/import-dynamic.d.mts +4 -2
  29. package/dist/interfaces/import-static.d.mts +4 -2
  30. package/dist/interfaces/index.d.mts +12 -0
  31. package/dist/interfaces/index.mjs +1 -0
  32. package/dist/interfaces/index.mjs.map +6 -0
  33. package/dist/interfaces/options-fill-module.d.mts +23 -0
  34. package/dist/interfaces/options-find-subpath.d.mts +49 -0
  35. package/dist/interfaces/options-get-format.d.mts +83 -0
  36. package/dist/interfaces/options-get-source.d.mts +63 -0
  37. package/dist/interfaces/options-parse-module-id.d.mts +33 -0
  38. package/dist/interfaces/options-parse-subpath.d.mts +31 -0
  39. package/dist/interfaces/options-resolve-alias.d.mts +26 -42
  40. package/dist/interfaces/options-resolve-module.d.mts +64 -0
  41. package/dist/interfaces/options-resolve.d.mts +7 -53
  42. package/dist/interfaces/package-scope.d.mts +25 -0
  43. package/dist/interfaces/parsed-data-url.d.mts +56 -0
  44. package/dist/interfaces/parsed-module-id.d.mts +80 -0
  45. package/dist/interfaces/parsed-subpath.d.mts +40 -0
  46. package/dist/interfaces/statement-import.d.mts +2 -2
  47. package/dist/interfaces/statement-require.d.mts +2 -2
  48. package/dist/interfaces/statement.d.mts +10 -5
  49. package/dist/internal/escape-reg-exp.d.mts +16 -0
  50. package/dist/internal/escape-reg-exp.mjs +10 -0
  51. package/dist/internal/escape-reg-exp.mjs.map +6 -0
  52. package/dist/internal/format-type-map.d.mts +17 -0
  53. package/dist/internal/format-type-map.mjs +13 -0
  54. package/dist/internal/format-type-map.mjs.map +6 -0
  55. package/dist/internal/get-specifier-kind.d.mts +17 -0
  56. package/dist/internal/get-specifier-kind.mjs +14 -0
  57. package/dist/internal/get-specifier-kind.mjs.map +6 -0
  58. package/dist/internal/get-subpaths.d.mts +25 -0
  59. package/dist/internal/get-subpaths.mjs +10 -0
  60. package/dist/internal/get-subpaths.mjs.map +6 -0
  61. package/dist/internal/is-array-index.d.mts +15 -0
  62. package/dist/internal/is-array-index.mjs +9 -0
  63. package/dist/internal/is-array-index.mjs.map +6 -0
  64. package/dist/internal/is-directory.d.mts +13 -0
  65. package/dist/internal/is-directory.mjs +16 -0
  66. package/dist/internal/is-directory.mjs.map +6 -0
  67. package/dist/internal/is-file.d.mts +13 -0
  68. package/dist/internal/is-file.mjs +16 -0
  69. package/dist/internal/is-file.mjs.map +6 -0
  70. package/dist/internal/is-function.d.mts +12 -0
  71. package/dist/internal/is-function.mjs +8 -0
  72. package/dist/internal/is-function.mjs.map +6 -0
  73. package/dist/internal/regex-encoded-sep.d.mts +13 -0
  74. package/dist/internal/regex-encoded-sep.mjs +6 -0
  75. package/dist/internal/regex-encoded-sep.mjs.map +6 -0
  76. package/dist/internal/regex-internal-specifier.d.mts +14 -0
  77. package/dist/internal/regex-internal-specifier.mjs +6 -0
  78. package/dist/internal/regex-internal-specifier.mjs.map +6 -0
  79. package/dist/internal/regex-package-name.d.mts +13 -0
  80. package/dist/internal/regex-package-name.mjs +6 -0
  81. package/dist/internal/regex-package-name.mjs.map +6 -0
  82. package/dist/internal/regex-package-path.d.mts +15 -0
  83. package/dist/internal/regex-package-path.mjs +6 -0
  84. package/dist/internal/regex-package-path.mjs.map +6 -0
  85. package/dist/internal/resolver.d.mts +130 -0
  86. package/dist/internal/resolver.mjs +486 -0
  87. package/dist/internal/resolver.mjs.map +6 -0
  88. package/dist/internal/validate-boolean.d.mts +20 -0
  89. package/dist/internal/validate-boolean.mjs +11 -0
  90. package/dist/internal/validate-boolean.mjs.map +6 -0
  91. package/dist/internal/validate-object.d.mts +23 -0
  92. package/dist/internal/validate-object.mjs +11 -0
  93. package/dist/internal/validate-object.mjs.map +6 -0
  94. package/dist/internal/validate-set.d.mts +23 -0
  95. package/dist/internal/validate-set.mjs +11 -0
  96. package/dist/internal/validate-set.mjs.map +6 -0
  97. package/dist/internal/validate-string.d.mts +20 -0
  98. package/dist/internal/validate-string.mjs +11 -0
  99. package/dist/internal/validate-string.mjs.map +6 -0
  100. package/dist/internal/validate-url-string.d.mts +22 -0
  101. package/dist/internal/validate-url-string.mjs +12 -0
  102. package/dist/internal/validate-url-string.mjs.map +6 -0
  103. package/dist/types/fn-change-ext.d.mts +28 -0
  104. package/dist/types/index.d.mts +4 -1
  105. package/dist/types/index.mjs +1 -0
  106. package/dist/types/index.mjs.map +6 -0
  107. package/dist/types/mime-type.d.mts +7 -5
  108. package/dist/types/module-id.d.mts +13 -0
  109. package/dist/types/protocol.d.mts +14 -0
  110. package/dist/types/syntax-kind-export.d.mts +3 -3
  111. package/dist/types/syntax-kind-import.d.mts +3 -3
  112. package/dist/types/syntax-kind-require.d.mts +3 -3
  113. package/dist/utils/compare-subpaths.d.mts +25 -0
  114. package/dist/utils/compare-subpaths.mjs +24 -0
  115. package/dist/utils/compare-subpaths.mjs.map +6 -0
  116. package/dist/utils/conditions.d.mts +13 -0
  117. package/dist/utils/conditions.mjs +6 -0
  118. package/dist/utils/conditions.mjs.map +6 -0
  119. package/dist/{lib → utils}/detect-syntax.d.mts +1 -1
  120. package/dist/{lib → utils}/detect-syntax.mjs +1 -0
  121. package/dist/utils/detect-syntax.mjs.map +6 -0
  122. package/dist/utils/extension-format-map.d.mts +16 -0
  123. package/dist/utils/extension-format-map.mjs +22 -0
  124. package/dist/utils/extension-format-map.mjs.map +6 -0
  125. package/dist/{lib → utils}/extract-statements.d.mts +2 -1
  126. package/dist/{lib → utils}/extract-statements.mjs +3 -0
  127. package/dist/utils/extract-statements.mjs.map +6 -0
  128. package/dist/utils/fill-modules.d.mts +23 -0
  129. package/dist/utils/fill-modules.mjs +62 -0
  130. package/dist/utils/fill-modules.mjs.map +6 -0
  131. package/dist/{lib → utils}/find-dynamic-imports.d.mts +4 -3
  132. package/dist/{lib → utils}/find-dynamic-imports.mjs +14 -4
  133. package/dist/utils/find-dynamic-imports.mjs.map +6 -0
  134. package/dist/{lib → utils}/find-exports.d.mts +4 -3
  135. package/dist/{lib → utils}/find-exports.mjs +29 -12
  136. package/dist/utils/find-exports.mjs.map +6 -0
  137. package/dist/{lib → utils}/find-requires.d.mts +4 -3
  138. package/dist/{lib → utils}/find-requires.mjs +14 -4
  139. package/dist/utils/find-requires.mjs.map +6 -0
  140. package/dist/{lib → utils}/find-static-imports.d.mts +4 -3
  141. package/dist/utils/find-static-imports.mjs +34 -0
  142. package/dist/utils/find-static-imports.mjs.map +6 -0
  143. package/dist/utils/find-subpath.d.mts +30 -0
  144. package/dist/utils/find-subpath.mjs +106 -0
  145. package/dist/utils/find-subpath.mjs.map +6 -0
  146. package/dist/utils/get-format.d.mts +24 -0
  147. package/dist/utils/get-format.mjs +111 -0
  148. package/dist/utils/get-format.mjs.map +6 -0
  149. package/dist/utils/get-source.d.mts +22 -0
  150. package/dist/utils/get-source.mjs +63 -0
  151. package/dist/utils/get-source.mjs.map +6 -0
  152. package/dist/{lib → utils}/has-cjs-syntax.d.mts +2 -1
  153. package/dist/{lib → utils}/has-cjs-syntax.mjs +3 -0
  154. package/dist/utils/has-cjs-syntax.mjs.map +6 -0
  155. package/dist/{lib → utils}/has-esm-syntax.d.mts +2 -1
  156. package/dist/{lib → utils}/has-esm-syntax.mjs +3 -0
  157. package/dist/utils/has-esm-syntax.mjs.map +6 -0
  158. package/dist/utils/index.d.mts +42 -0
  159. package/dist/utils/index.mjs +79 -0
  160. package/dist/utils/index.mjs.map +6 -0
  161. package/dist/utils/is-absolute-specifier.d.mts +19 -0
  162. package/dist/utils/is-absolute-specifier.mjs +25 -0
  163. package/dist/utils/is-absolute-specifier.mjs.map +6 -0
  164. package/dist/utils/is-bare-specifier.d.mts +19 -0
  165. package/dist/utils/is-bare-specifier.mjs +10 -0
  166. package/dist/utils/is-bare-specifier.mjs.map +6 -0
  167. package/dist/utils/is-exports-sugar.d.mts +25 -0
  168. package/dist/utils/is-exports-sugar.mjs +26 -0
  169. package/dist/utils/is-exports-sugar.mjs.map +6 -0
  170. package/dist/utils/is-relative-specifier.d.mts +20 -0
  171. package/dist/utils/is-relative-specifier.mjs +11 -0
  172. package/dist/utils/is-relative-specifier.mjs.map +6 -0
  173. package/dist/utils/lookup-package-scope.d.mts +24 -0
  174. package/dist/utils/lookup-package-scope.mjs +34 -0
  175. package/dist/utils/lookup-package-scope.mjs.map +6 -0
  176. package/dist/utils/parse-data-url.d.mts +25 -0
  177. package/dist/utils/parse-data-url.mjs +25 -0
  178. package/dist/utils/parse-data-url.mjs.map +6 -0
  179. package/dist/utils/parse-module-id.d.mts +22 -0
  180. package/dist/utils/parse-module-id.mjs +122 -0
  181. package/dist/utils/parse-module-id.mjs.map +6 -0
  182. package/dist/utils/parse-subpath.d.mts +35 -0
  183. package/dist/utils/parse-subpath.mjs +54 -0
  184. package/dist/utils/parse-subpath.mjs.map +6 -0
  185. package/dist/utils/pattern-character.d.mts +11 -0
  186. package/dist/utils/pattern-character.mjs +6 -0
  187. package/dist/utils/pattern-character.mjs.map +6 -0
  188. package/dist/utils/read-package-json.d.mts +26 -0
  189. package/dist/utils/read-package-json.mjs +43 -0
  190. package/dist/utils/read-package-json.mjs.map +6 -0
  191. package/dist/utils/resolve-alias.d.mts +20 -0
  192. package/dist/utils/resolve-alias.mjs +106 -0
  193. package/dist/utils/resolve-alias.mjs.map +6 -0
  194. package/dist/{lib → utils}/resolve-aliases.d.mts +7 -5
  195. package/dist/utils/resolve-aliases.mjs +28 -0
  196. package/dist/utils/resolve-aliases.mjs.map +6 -0
  197. package/dist/utils/resolve-extensions.d.mts +14 -0
  198. package/dist/utils/resolve-extensions.mjs +22 -0
  199. package/dist/utils/resolve-extensions.mjs.map +6 -0
  200. package/dist/utils/resolve-module.d.mts +39 -0
  201. package/dist/utils/resolve-module.mjs +64 -0
  202. package/dist/utils/resolve-module.mjs.map +6 -0
  203. package/dist/utils/resolve-modules.d.mts +25 -0
  204. package/dist/utils/resolve-modules.mjs +26 -0
  205. package/dist/utils/resolve-modules.mjs.map +6 -0
  206. package/dist/{lib → utils}/to-absolute-specifier.d.mts +6 -6
  207. package/dist/utils/to-absolute-specifier.mjs +8 -0
  208. package/dist/utils/to-absolute-specifier.mjs.map +6 -0
  209. package/dist/utils/to-bare-specifier.d.mts +42 -0
  210. package/dist/utils/to-bare-specifier.mjs +90 -0
  211. package/dist/utils/to-bare-specifier.mjs.map +6 -0
  212. package/dist/{lib → utils}/to-data-url.d.mts +6 -5
  213. package/dist/{lib → utils}/to-data-url.mjs +4 -0
  214. package/dist/utils/to-data-url.mjs.map +6 -0
  215. package/dist/utils/to-node-url.d.mts +19 -0
  216. package/dist/utils/to-node-url.mjs +10 -0
  217. package/dist/utils/to-node-url.mjs.map +6 -0
  218. package/dist/{lib → utils}/to-relative-specifier.d.mts +6 -6
  219. package/dist/{lib → utils}/to-relative-specifier.mjs +2 -1
  220. package/dist/utils/to-relative-specifier.mjs.map +6 -0
  221. package/dist/utils/to-url.d.mts +22 -0
  222. package/dist/utils/to-url.mjs +12 -0
  223. package/dist/utils/to-url.mjs.map +6 -0
  224. package/dist/utils/validate-assertions.d.mts +23 -0
  225. package/dist/utils/validate-assertions.mjs +52 -0
  226. package/dist/utils/validate-assertions.mjs.map +6 -0
  227. package/dist/utils/validate-exports.d.mts +24 -0
  228. package/dist/utils/validate-exports.mjs +72 -0
  229. package/dist/utils/validate-exports.mjs.map +6 -0
  230. package/package.json +67 -63
  231. package/changelog.config.cts +0 -204
  232. package/dist/constants.d.mts +0 -21
  233. package/dist/constants.mjs +0 -24
  234. package/dist/enums/kind-syntax.mjs +0 -17
  235. package/dist/interfaces/import-dynamic.mjs +0 -0
  236. package/dist/interfaces/import-static.mjs +0 -0
  237. package/dist/interfaces/options-resolve-alias.mjs +0 -0
  238. package/dist/interfaces/options-resolve.mjs +0 -0
  239. package/dist/interfaces/statement-export.mjs +0 -0
  240. package/dist/interfaces/statement-import.mjs +0 -0
  241. package/dist/interfaces/statement-require.mjs +0 -0
  242. package/dist/interfaces/statement.mjs +0 -0
  243. package/dist/internal/get-compiler-options.d.mts +0 -21
  244. package/dist/internal/get-compiler-options.mjs +0 -14
  245. package/dist/lib/find-static-imports.mjs +0 -25
  246. package/dist/lib/index.d.mts +0 -20
  247. package/dist/lib/index.mjs +0 -34
  248. package/dist/lib/resolve-alias.d.mts +0 -20
  249. package/dist/lib/resolve-alias.mjs +0 -41
  250. package/dist/lib/resolve-aliases.mjs +0 -34
  251. package/dist/lib/resolve-module.d.mts +0 -31
  252. package/dist/lib/resolve-module.mjs +0 -74
  253. package/dist/lib/resolve-modules.d.mts +0 -19
  254. package/dist/lib/resolve-modules.mjs +0 -30
  255. package/dist/lib/to-absolute-specifier.mjs +0 -20
  256. package/dist/lib/to-bare-specifier.d.mts +0 -28
  257. package/dist/lib/to-bare-specifier.mjs +0 -78
  258. package/dist/types/declaration.mjs +0 -0
  259. package/dist/types/mime-type.mjs +0 -0
  260. package/dist/types/module-specifier-type.mjs +0 -0
  261. package/dist/types/syntax-kind-export.mjs +0 -0
  262. package/dist/types/syntax-kind-import.mjs +0 -0
  263. package/dist/types/syntax-kind-require.mjs +0 -0
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@flex-development/mlly",
3
3
  "description": "ECMAScript module utilities",
4
- "version": "1.0.0-alpha.6",
4
+ "version": "1.0.0-alpha.7",
5
5
  "keywords": [
6
- "ecmascript-modules",
6
+ "ecmascript",
7
7
  "esm",
8
8
  "esmodules",
9
9
  "module",
@@ -27,26 +27,24 @@
27
27
  ],
28
28
  "exports": {
29
29
  ".": "./dist/index.mjs",
30
- "./lib/*": "./dist/lib/*.mjs",
31
30
  "./package.json": "./package.json"
32
31
  },
32
+ "imports": {
33
+ "#mkbuild": "@flex-development/mkbuild",
34
+ "#src": "./src/index.ts",
35
+ "#src/*": "./src/*.ts"
36
+ },
33
37
  "module": "./dist/index.mjs",
34
38
  "types": "./dist/index.d.mts",
35
- "typesVersions": {
36
- "*": {
37
- "./lib/*": [
38
- "./dist/lib/*.d.mts"
39
- ]
40
- }
41
- },
42
39
  "scripts": {
43
40
  "build": "mkbuild",
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",
41
+ "changelog": "node --loader=./loader.mjs ./changelog.config.ts",
42
+ "check:ci": "yarn dedupe --check && yarn check:format && yarn check:lint && yarn check:spelling && yarn typecheck && yarn test:cov && NODE_ENV=production yarn pack -o %s-%v.tgz && yarn docs:build && yarn clean:pack && yarn check:types:build",
45
43
  "check:format": "prettier --check .",
46
- "check:lint": "eslint --exit-on-fatal-error --ext cjs,cts,gql,json,jsonc,md,mjs,ts,vue,yml --max-warnings 0 .",
44
+ "check:lint": "eslint --exit-on-fatal-error --ext cjs,cts,gql,js,json,jsonc,md,mjs,ts,vue,yml --max-warnings 0 .",
47
45
  "check:spelling": "cspell lint --color --no-progress --relative $@ \"**\"",
48
46
  "check:types": "vue-tsc -p tsconfig.typecheck.json",
49
- "check:types:build": "vue-tsc -p tsconfig.build.json",
47
+ "check:types:build": "tsc -p tsconfig.build.json",
50
48
  "check:upgrades": "yarn upgrade-interactive",
51
49
  "clean:build": "trash ./{dist,*.tgz}",
52
50
  "clean:coverage": "trash ./coverage",
@@ -55,7 +53,6 @@
55
53
  "clean:test": "yarn clean:coverage && trash ./__tests__/report.json",
56
54
  "codecov": "yarn test:cov && yarn test:cov:upload",
57
55
  "codecov:validate": "cat .codecov.yml | curl --data-binary @- https://codecov.io/validate",
58
- "conventional-changelog": "node --loader=./loader.mjs ./node_modules/.bin/conventional-changelog -n ./changelog.config.cts",
59
56
  "docs:build": "vc pull --environment=preview && vc build",
60
57
  "docs:build:prod": "vc pull --environment=production && vc build --prod",
61
58
  "docs:deploy": "yarn docs:build && vc deploy --prebuilt",
@@ -82,49 +79,46 @@
82
79
  "typecheck:watch": "vitest typecheck"
83
80
  },
84
81
  "dependencies": {
82
+ "@flex-development/errnode": "1.4.0",
85
83
  "@flex-development/export-regex": "1.0.0",
86
- "@flex-development/import-regex": "2.0.0",
84
+ "@flex-development/import-regex": "2.0.1",
87
85
  "@flex-development/is-builtin": "1.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",
91
- "import-meta-resolve": "2.2.0",
92
- "node-package-exports": "1.0.2",
93
- "read-pkg-up": "9.1.0",
94
- "tsconfig-paths": "4.1.1"
86
+ "@flex-development/pathe": "1.0.3",
87
+ "@flex-development/pkg-types": "2.0.0",
88
+ "@flex-development/tutils": "6.0.0-alpha.9"
95
89
  },
96
90
  "devDependencies": {
97
- "@commitlint/cli": "17.3.0",
98
- "@commitlint/config-conventional": "17.3.0",
99
- "@commitlint/types": "17.0.0",
91
+ "@commitlint/cli": "17.4.2",
92
+ "@commitlint/config-conventional": "17.4.2",
93
+ "@commitlint/types": "17.4.0",
100
94
  "@faker-js/faker": "7.6.0",
101
95
  "@flex-development/docast": "1.0.0-alpha.9",
102
96
  "@flex-development/docast-parse": "1.0.0-alpha.4",
103
97
  "@flex-development/mkbuild": "1.0.0-alpha.9",
104
- "@graphql-eslint/eslint-plugin": "3.13.1",
98
+ "@graphql-eslint/eslint-plugin": "3.15.0",
105
99
  "@sindresorhus/slugify": "2.1.1",
106
100
  "@types/chai": "4.3.4",
107
101
  "@types/chai-string": "1.4.2",
108
102
  "@types/conventional-changelog": "3.1.1",
109
- "@types/conventional-changelog-config-spec": "2.1.2",
110
- "@types/conventional-changelog-writer": "4.0.1",
103
+ "@types/conventional-changelog-writer": "4.0.2",
111
104
  "@types/conventional-commits-parser": "3.0.3",
112
105
  "@types/dateformat": "5.0.0",
113
- "@types/dotenv-defaults": "2.0.1",
114
106
  "@types/eslint": "8.4.10",
115
107
  "@types/git-raw-commits": "2.0.1",
116
108
  "@types/is-ci": "3.0.0",
117
109
  "@types/markdown-it": "12.2.3",
118
- "@types/node": "16.18.10",
110
+ "@types/node": "16.18.11",
119
111
  "@types/node-notifier": "8.0.2",
120
112
  "@types/prettier": "2.7.2",
113
+ "@types/semver": "7.3.13",
121
114
  "@types/unist": "2.0.6",
122
- "@typescript-eslint/eslint-plugin": "5.47.0",
123
- "@typescript-eslint/parser": "5.47.0",
115
+ "@typescript-eslint/eslint-plugin": "5.49.0",
116
+ "@typescript-eslint/parser": "5.49.0",
124
117
  "@vates/toggle-scripts": "1.0.0",
125
- "@vitest/coverage-c8": "0.26.2",
126
- "@vitest/ui": "0.26.2",
127
- "@vuedx/typescript-plugin-vue": "0.7.6-next-1666251997.0",
118
+ "@vitest/coverage-c8": "0.28.2",
119
+ "@vitest/ui": "0.28.2",
120
+ "@vuedx/typescript-plugin-vue": "0.7.7-next-1667939290.0",
121
+ "add-stream": "1.0.0",
128
122
  "chai": "4.3.7",
129
123
  "chai-each": "0.0.1",
130
124
  "chai-quantifiers": "1.0.17",
@@ -132,69 +126,79 @@
132
126
  "cheerio": "1.0.0-rc.12",
133
127
  "conventional-changelog-cli": "2.2.2",
134
128
  "conventional-recommended-bump": "6.1.0",
135
- "cspell": "6.18.0",
129
+ "cross-env": "7.0.3",
130
+ "cspell": "6.19.2",
136
131
  "dotenv": "16.0.3",
137
- "esbuild": "0.16.10",
132
+ "esbuild": "0.17.5",
138
133
  "escape-string-regexp": "5.0.0",
139
- "eslint": "8.30.0",
140
- "eslint-config-prettier": "8.5.0",
134
+ "eslint": "8.32.0",
135
+ "eslint-config-prettier": "8.6.0",
141
136
  "eslint-plugin-chai-expect": "3.0.0",
142
137
  "eslint-plugin-jest-formatting": "3.1.0",
143
- "eslint-plugin-jsdoc": "39.6.4",
144
- "eslint-plugin-jsonc": "2.5.0",
138
+ "eslint-plugin-jsdoc": "39.6.9",
139
+ "eslint-plugin-jsonc": "2.6.0",
145
140
  "eslint-plugin-markdown": "3.0.0",
146
141
  "eslint-plugin-markdownlint": "0.4.0",
147
142
  "eslint-plugin-node": "11.1.0",
148
143
  "eslint-plugin-prettier": "4.2.1",
149
144
  "eslint-plugin-promise": "6.1.1",
150
145
  "eslint-plugin-unicorn": "45.0.2",
151
- "eslint-plugin-vue": "9.8.0",
146
+ "eslint-plugin-vue": "9.9.0",
152
147
  "eslint-plugin-yml": "1.4.0",
153
148
  "globby": "13.1.3",
154
149
  "graphql": "16.6.0",
155
- "graphql-config": "4.3.6",
150
+ "graphql-config": "4.4.0",
156
151
  "growl": "1.10.5",
157
- "husky": "8.0.2",
152
+ "husky": "8.0.3",
158
153
  "is-ci": "3.0.1",
159
154
  "jsonc-eslint-parser": "2.1.0",
160
155
  "lint-staged": "13.1.0",
156
+ "node-fetch": "3.3.0",
161
157
  "node-notifier": "10.0.1",
162
- "prettier": "2.8.1",
158
+ "prettier": "2.8.3",
163
159
  "prettier-plugin-sh": "0.12.8",
164
- "pretty-format": "29.3.1",
160
+ "pretty-format": "29.4.1",
165
161
  "pupa": "3.1.0",
166
- "serve": "14.1.2",
162
+ "sade": "1.8.1",
163
+ "semver": "7.3.8",
164
+ "serve": "14.2.0",
167
165
  "sitemap": "7.1.1",
166
+ "tempfile": "4.0.0",
168
167
  "trash-cli": "5.0.0",
169
168
  "ts-dedent": "2.2.0",
170
- "ts-node": "10.9.1",
171
- "typescript": "4.9.4",
169
+ "typescript": "5.0.0-dev.20221215",
172
170
  "unified": "10.1.2",
173
171
  "unist-util-remove": "3.1.0",
174
- "unist-util-source": "4.0.1",
175
- "unist-util-visit": "4.1.1",
176
- "vercel": "28.10.1",
172
+ "unist-util-source": "4.0.2",
173
+ "unist-util-visit": "4.1.2",
174
+ "vercel": "28.14.0",
177
175
  "version-bump-prompt": "6.1.0",
178
- "vite": "4.0.3",
179
- "vite-tsconfig-paths": "4.0.3",
180
- "vitepress": "1.0.0-alpha.32",
181
- "vitest": "0.26.2",
176
+ "vite": "4.0.4",
177
+ "vite-tsconfig-paths": "4.0.5",
178
+ "vitepress": "1.0.0-alpha.34",
179
+ "vitest": "0.28.2",
182
180
  "vitest-github-actions-reporter": "0.9.0",
183
181
  "vue": "3.2.45",
184
182
  "vue-eslint-parser": "9.1.0",
185
- "vue-tsc": "1.0.18",
183
+ "vue-tsc": "1.0.24",
186
184
  "yaml-eslint-parser": "1.1.0"
187
185
  },
186
+ "peerDependencies": {
187
+ "@types/node": ">=14.17.0",
188
+ "node-fetch": ">=3.3.0"
189
+ },
190
+ "peerDependenciesMeta": {
191
+ "@types/node": {
192
+ "optional": true
193
+ }
194
+ },
188
195
  "resolutions": {
189
196
  "@ardatan/sync-fetch": "larsgw/sync-fetch#head=worker_threads",
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"
197
+ "@flex-development/tutils": "6.0.0-alpha.9",
198
+ "vitepress@npm:1.0.0-alpha.34": "patch:vitepress@npm%3A1.0.0-alpha.34#patches/vitepress+1.0.0-alpha.34.dev.patch"
195
199
  },
196
200
  "engines": {
197
- "node": ">=14.16",
201
+ "node": ">=14.17.0",
198
202
  "yarn": "4.0.0-rc.34"
199
203
  },
200
204
  "packageManager": "yarn@4.0.0-rc.34",
@@ -1,204 +0,0 @@
1
- /**
2
- * @file Changelog Configuration
3
- * @module config/changelog
4
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli
5
- */
6
-
7
- import type { Config } from 'conventional-changelog-cli'
8
- import type { Options } from 'conventional-changelog-core'
9
- import type {
10
- CommitGroup,
11
- GeneratedContext
12
- } from 'conventional-changelog-writer'
13
- import type { Commit, CommitRaw } from 'conventional-commits-parser'
14
- import dateformat from 'dateformat'
15
- import fs from 'node:fs'
16
- import pkg from './package.json'
17
-
18
- /**
19
- * Changlog context.
20
- *
21
- * @extends {GeneratedContext}
22
- */
23
- interface Context extends GeneratedContext {
24
- currentTag: string
25
- linkCompare: boolean
26
- previousTag: string
27
- }
28
-
29
- /**
30
- * Changelog configuration options.
31
- *
32
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits
33
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core
34
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer
35
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser
36
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-raw-commits
37
- *
38
- * @const {Config} config
39
- */
40
- const config: Config = {
41
- options: {
42
- preset: {
43
- header: '',
44
- name: 'conventionalcommits',
45
- releaseCommitMessageFormat: 'release: {{currentTag}}',
46
- types: [
47
- { section: ':package: Build', type: 'build' },
48
- { section: ':house_with_garden: Housekeeping', type: 'chore' },
49
- { section: ':robot: Continuous Integration', type: 'ci' },
50
- { section: ':pencil: Documentation', type: 'docs' },
51
- { section: ':sparkles: Features', type: 'feat' },
52
- { section: ':bug: Fixes', type: 'fix' },
53
- { section: ':fire: Performance Improvements', type: 'perf' },
54
- { section: ':zap: Refactors', type: 'refactor' },
55
- { section: ':rewind: Reverts', type: 'revert' },
56
- { hidden: true, type: 'style' },
57
- { section: ':white_check_mark: Testing', type: 'test' },
58
- { hidden: true, type: 'wip' }
59
- ]
60
- },
61
- skipUnstable: false,
62
- tagPrefix: pkg.tagPrefix,
63
- /**
64
- * Raw commit transformer.
65
- *
66
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#transform-1
67
- *
68
- * @param {CommitRaw} commit - Raw commit object
69
- * @param {Options.Transform.Callback} apply - Commit handler
70
- * @return {void} Nothing when complete
71
- */
72
- transform(commit: CommitRaw, apply: Options.Transform.Callback): void {
73
- commit.committerDate = dateformat(commit.committerDate, 'yyyy-mm-dd')
74
-
75
- if (commit.gitTags) {
76
- /**
77
- * Regex expression used to check {@link commit.gitTags} for the release
78
- * {@link commit} belongs to.
79
- *
80
- * @const {RegExp} vgx
81
- */
82
- const vgx: RegExp = pkg.tagPrefix
83
- ? new RegExp(`tag:\\s*[=]?${pkg.tagPrefix}(.+?)[,)]`, 'gi')
84
- : /tag:\s*[=v]?(.+?)[),]/gi
85
-
86
- commit = Object.assign({}, commit, {
87
- version: vgx.exec(commit.gitTags)?.[1] ?? undefined
88
- })
89
- }
90
-
91
- commit.notes = commit.notes.map(note => ({
92
- ...note,
93
- text: note.text.replace(/(\n?\n?Signed-off-by:).+/gm, '')
94
- }))
95
-
96
- return void apply(null, {
97
- ...commit,
98
- raw: commit,
99
- shortHash: commit.hash.slice(0, 7)
100
- })
101
- }
102
- },
103
- parserOpts: {
104
- issuePrefixesCaseSensitive: true
105
- },
106
- writerOpts: {
107
- /**
108
- * Sorts commit groups in descending order by group title.
109
- *
110
- * GitHub emojis in titles will be ignored.
111
- *
112
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#commitgroupssort
113
- *
114
- * @param {CommitGroup} a - Commit group object
115
- * @param {CommitGroup} b - Commit group object to compare to `a`
116
- * @return {number} Compare result
117
- */
118
- commitGroupsSort(a: CommitGroup, b: CommitGroup): number {
119
- if (a.title === false) return 1
120
- if (b.title === false) return -1
121
-
122
- /**
123
- * Regex used to extract commit group titles without GitHub emojis.
124
- *
125
- * @const {RegExp} tgx - Regex used to extract commit group title
126
- */
127
- const tgx: RegExp = /([A-Z])\w+/
128
-
129
- return tgx.exec(a.title)![0]!.localeCompare(tgx.exec(b.title)![0]!)
130
- },
131
- /**
132
- * Sorts commits in descending order by commit header and date.
133
- *
134
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#commitssort
135
- *
136
- * @param {Commit} a - Commit object
137
- * @param {Commit} b - Commit object to compare to `b`
138
- * @return {number} Compare result
139
- */
140
- commitsSort(a: Commit, b: Commit): number {
141
- /**
142
- * Compare result for {@link b.committerDate} & {@link a.committerDate}.
143
- *
144
- * @const {number} by_date
145
- */
146
- const by_date: number =
147
- new Date(b.committerDate).getTime() -
148
- new Date(a.committerDate).getTime()
149
-
150
- return a.header && b.header
151
- ? a.header.localeCompare(b.header) || by_date
152
- : by_date
153
- },
154
- /**
155
- * Modifies `context` before the changelog is generated.
156
- *
157
- * This includes:
158
- *
159
- * - Setting the release date to the current date
160
- * - Setting the current release tag
161
- * - Setting the previous release tag
162
- * - Setting compare link generation
163
- *
164
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#finalizecontext
165
- * @see https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#finalizecontext
166
- *
167
- * @param {GeneratedContext} context - Generated changelog context
168
- * @return {Context} Final changelog context
169
- */
170
- finalizeContext(context: GeneratedContext): Context {
171
- /**
172
- * Use current date as release date instead of date of most recent commit.
173
- *
174
- * @see https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-writer/lib/util.js#L194-L196
175
- */
176
- context.date = dateformat(new Date(), 'yyyy-mm-dd')
177
-
178
- /**
179
- * Release tag for upcoming version.
180
- *
181
- * @const {string} currentTag
182
- */
183
- const currentTag: string = pkg.tagPrefix + pkg.version
184
-
185
- /**
186
- * Release tag for previous version.
187
- *
188
- * @const {string} previousTag
189
- */
190
- const previousTag: string = context.gitSemverTags[0]!
191
-
192
- return {
193
- ...context,
194
- currentTag,
195
- linkCompare: currentTag !== previousTag,
196
- previousTag
197
- }
198
- },
199
- headerPartial: fs.readFileSync('templates/changelog/header.hbs', 'utf8'),
200
- ignoreReverted: false
201
- }
202
- }
203
-
204
- module.exports = config
@@ -1,21 +0,0 @@
1
- /**
2
- * @file Constants
3
- * @module mlly/constants
4
- */
5
- import type { Ext } from '@flex-development/pathe';
6
- /**
7
- * Default export conditions.
8
- *
9
- * @see https://nodejs.org/api/packages.html#conditional-exports
10
- *
11
- * @const {Readonly<Set<string>>} CONDITIONS
12
- */
13
- export declare const CONDITIONS: Readonly<Set<string>>;
14
- /**
15
- * Default resolvable file extensions.
16
- *
17
- * @see {@linkcode Ext}
18
- *
19
- * @const {ReadonlyArray<Ext>} RESOLVE_EXTENSIONS
20
- */
21
- export declare const RESOLVE_EXTENSIONS: readonly Ext[];
@@ -1,24 +0,0 @@
1
- const CONDITIONS = Object.freeze(
2
- /* @__PURE__ */ new Set(["node", "import"])
3
- );
4
- const RESOLVE_EXTENSIONS = Object.freeze([
5
- ".mjs",
6
- ".mts",
7
- ".cjs",
8
- ".cts",
9
- ".js",
10
- ".ts",
11
- ".jsx",
12
- ".tsx",
13
- ".css",
14
- ".json",
15
- ".node",
16
- ".wasm",
17
- ".d.mts",
18
- ".d.cts",
19
- ".d.ts"
20
- ]);
21
- export {
22
- CONDITIONS,
23
- RESOLVE_EXTENSIONS
24
- };
@@ -1,17 +0,0 @@
1
- var SyntaxKind = /* @__PURE__ */ ((SyntaxKind2) => {
2
- SyntaxKind2["DECLARATION"] = "declaration";
3
- SyntaxKind2["DEFAULT"] = "default";
4
- SyntaxKind2["DEFAULT_WITH_NAMED"] = "default-with-named";
5
- SyntaxKind2["DEFAULT_WITH_NAMESPACE"] = "default-with-namespace";
6
- SyntaxKind2["DYNAMIC"] = "dynamic";
7
- SyntaxKind2["LIST"] = "list";
8
- SyntaxKind2["NAMED"] = "named";
9
- SyntaxKind2["NAMESPACE"] = "namespace";
10
- SyntaxKind2["REQUIRE"] = "require";
11
- SyntaxKind2["SIDE_EFFECT"] = "side-effect";
12
- return SyntaxKind2;
13
- })(SyntaxKind || {});
14
- var kind_syntax_default = SyntaxKind;
15
- export {
16
- kind_syntax_default as default
17
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,21 +0,0 @@
1
- /**
2
- * @file Internals - getCompilerOptions
3
- * @module mlly/internal/getCompilerOptions
4
- */
5
- import type { CompilerOptions } from '@flex-development/tsconfig-types';
6
- /**
7
- * Retrieves TypeScript compiler options from `path`.
8
- *
9
- * Supports [`extends`][1].
10
- *
11
- * [1]: https://typescriptlang.org/tsconfig#extends
12
- *
13
- * @internal
14
- *
15
- * @param {string} [path=pathe.resolve('tsconfig.json')] - Tsconfig path
16
- * @param {(path: string) => boolean} [exists] - File existence checker
17
- * @param {(filename: string) => string} [read] - File content reader
18
- * @return {CompilerOptions} User compiler options
19
- */
20
- declare const getCompilerOptions: (path?: string, exists?: ((path: string) => boolean) | undefined, read?: ((filename: string) => string) | undefined) => CompilerOptions;
21
- export default getCompilerOptions;
@@ -1,14 +0,0 @@
1
- import pathe from "@flex-development/pathe";
2
- import { loadTsconfig } from "tsconfig-paths/lib/tsconfig-loader.js";
3
- const getCompilerOptions = (path = pathe.resolve("tsconfig.json"), exists, read) => {
4
- const t = loadTsconfig(
5
- path,
6
- exists,
7
- read
8
- );
9
- return !(t == null ? void 0 : t.compilerOptions) ? {} : t.compilerOptions;
10
- };
11
- var get_compiler_options_default = getCompilerOptions;
12
- export {
13
- get_compiler_options_default as default
14
- };
@@ -1,25 +0,0 @@
1
- import { SpecifierKind, StatementKind, SyntaxKind } from "../enums/index.mjs";
2
- import { STATIC_IMPORT_REGEX } from "@flex-development/import-regex";
3
- const findStaticImports = (code) => {
4
- return [...code.matchAll(STATIC_IMPORT_REGEX)].map((match) => {
5
- const { 0: code2 = "", index: start = 0, groups = {} } = match;
6
- const { assertion = "", imports = "", specifier = "", type = "" } = groups;
7
- const syntax = imports === "" ? SyntaxKind.SIDE_EFFECT : imports.startsWith("* as") ? SyntaxKind.NAMESPACE : imports.startsWith("{") ? SyntaxKind.NAMED : /^\w+$/.test(imports) ? SyntaxKind.DEFAULT : /^\w+,\s*{/.test(imports) ? SyntaxKind.DEFAULT_WITH_NAMED : SyntaxKind.DEFAULT_WITH_NAMESPACE;
8
- return {
9
- assertion,
10
- code: code2,
11
- end: start + code2.length,
12
- imports: syntax === SyntaxKind.SIDE_EFFECT ? [] : syntax === SyntaxKind.NAMED ? imports.replace(/^{|}$/g, "").split(",").map((e) => e.trim()).filter((e) => e.length > 0) : syntax === SyntaxKind.DEFAULT_WITH_NAMED ? imports.split(",").map((i) => i.trim().replace(/^{|}$/g, "")).map((i) => i.trim()).filter((i) => i.length > 0) : syntax === SyntaxKind.DEFAULT_WITH_NAMESPACE ? imports.split(",").map((i) => i.trim()).filter((i) => i.length > 0) : [imports],
13
- kind: StatementKind.IMPORT,
14
- specifier,
15
- specifier_kind: SpecifierKind.STATIC,
16
- start,
17
- syntax,
18
- type: !!type
19
- };
20
- });
21
- };
22
- var find_static_imports_default = findStaticImports;
23
- export {
24
- find_static_imports_default as default
25
- };
@@ -1,20 +0,0 @@
1
- /**
2
- * @file Library
3
- * @module mlly/lib
4
- */
5
- export { default as detectSyntax } from './detect-syntax.mjs';
6
- export { default as extractStatements } from './extract-statements.mjs';
7
- export { default as findDynamicImports } from './find-dynamic-imports.mjs';
8
- export { default as findExports } from './find-exports.mjs';
9
- export { default as findRequires } from './find-requires.mjs';
10
- export { default as findStaticImports } from './find-static-imports.mjs';
11
- export { default as hasCJSSyntax } from './has-cjs-syntax.mjs';
12
- export { default as hasESMSyntax } from './has-esm-syntax.mjs';
13
- export { default as resolveAlias } from './resolve-alias.mjs';
14
- export { default as resolveAliases } from './resolve-aliases.mjs';
15
- export { default as resolveModule } from './resolve-module.mjs';
16
- export { default as resolveModules } from './resolve-modules.mjs';
17
- export { default as toAbsoluteSpecifier } from './to-absolute-specifier.mjs';
18
- export { default as toBareSpecifier } from './to-bare-specifier.mjs';
19
- export { default as toDataURL } from './to-data-url.mjs';
20
- export { default as toRelativeSpecifier } from './to-relative-specifier.mjs';
@@ -1,34 +0,0 @@
1
- import { default as default2 } from "./detect-syntax.mjs";
2
- import { default as default3 } from "./extract-statements.mjs";
3
- import { default as default4 } from "./find-dynamic-imports.mjs";
4
- import { default as default5 } from "./find-exports.mjs";
5
- import { default as default6 } from "./find-requires.mjs";
6
- import { default as default7 } from "./find-static-imports.mjs";
7
- import { default as default8 } from "./has-cjs-syntax.mjs";
8
- import { default as default9 } from "./has-esm-syntax.mjs";
9
- import { default as default10 } from "./resolve-alias.mjs";
10
- import { default as default11 } from "./resolve-aliases.mjs";
11
- import { default as default12 } from "./resolve-module.mjs";
12
- import { default as default13 } from "./resolve-modules.mjs";
13
- import { default as default14 } from "./to-absolute-specifier.mjs";
14
- import { default as default15 } from "./to-bare-specifier.mjs";
15
- import { default as default16 } from "./to-data-url.mjs";
16
- import { default as default17 } from "./to-relative-specifier.mjs";
17
- export {
18
- default2 as detectSyntax,
19
- default3 as extractStatements,
20
- default4 as findDynamicImports,
21
- default5 as findExports,
22
- default6 as findRequires,
23
- default7 as findStaticImports,
24
- default8 as hasCJSSyntax,
25
- default9 as hasESMSyntax,
26
- default10 as resolveAlias,
27
- default11 as resolveAliases,
28
- default12 as resolveModule,
29
- default13 as resolveModules,
30
- default14 as toAbsoluteSpecifier,
31
- default15 as toBareSpecifier,
32
- default16 as toDataURL,
33
- default17 as toRelativeSpecifier
34
- };
@@ -1,20 +0,0 @@
1
- /**
2
- * @file resolveAlias
3
- * @module mlly/lib/resolveAlias
4
- */
5
- import type { ResolveAliasOptions } from '../interfaces/index.mjs';
6
- /**
7
- * Resolves a path alias in `specifier`; does nothing if a path match isn't
8
- * found.
9
- *
10
- * If `options.tsconfig` is found, `options.baseUrl` and `options.paths` will
11
- * be overridden with values from the config file.
12
- *
13
- * @see {@linkcode ResolveAliasOptions}
14
- *
15
- * @param {string} specifier - Module specifier
16
- * @param {ResolveAliasOptions} [options={}] - Resolve alias options
17
- * @return {string} `specifier` unmodified or with path alias resolved
18
- */
19
- declare const resolveAlias: (specifier: string, options?: ResolveAliasOptions) => string;
20
- export default resolveAlias;