@visulima/packem 2.0.0-alpha.2 → 2.0.0-alpha.21
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 +263 -1
- package/README.md +15 -11
- package/dist/builder/typedoc/index.d.ts +8 -8
- package/dist/builder/typedoc/index.js +3 -0
- package/dist/cli/index.js +55 -0
- package/dist/config/index.d.ts +9 -10
- package/dist/index.d.ts +9 -8
- package/dist/index.js +1 -0
- package/dist/packem_shared/default-BYM_JvQL.js +1 -0
- package/dist/packem_shared/default-B_dUKZ_J.js +1 -0
- package/dist/packem_shared/default-DjNIGH2Y.js +1 -0
- package/dist/packem_shared/default-DpHYpsSt.js +1 -0
- package/dist/packem_shared/default-DqRcOUe1.js +1 -0
- package/dist/packem_shared/esbuildPlugin-CXr7ud3R-CwR2FCHj.js +3 -0
- package/dist/packem_shared/index-CFFENGTN.js +145 -0
- package/dist/packem_shared/{index-Sedl0fV9.d.mts → index-zrs6Po_w.d.ts} +2745 -58
- package/dist/packem_shared/oxcTransformPlugin-DfVQouIB-Cpfv95eA.js +4 -0
- package/dist/packem_shared/swcPlugin-Boip4lWG-CwJ-HVJc.js +1 -0
- package/dist/packem_shared/types-5psa8MJc.d.ts +165 -0
- package/dist/rollup/plugins/css/loaders/less.d.ts +1 -2
- package/dist/rollup/plugins/css/loaders/less.js +1 -0
- package/dist/rollup/plugins/css/loaders/lightningcss.d.ts +1 -2
- package/dist/rollup/plugins/css/loaders/lightningcss.js +1 -0
- package/dist/rollup/plugins/css/loaders/postcss.d.ts +1 -2
- package/dist/rollup/plugins/css/loaders/postcss.js +1 -0
- package/dist/rollup/plugins/css/loaders/sass.d.ts +1 -2
- package/dist/rollup/plugins/css/loaders/sass.js +1 -0
- package/dist/rollup/plugins/css/loaders/sourcemap.d.ts +9 -9
- package/dist/rollup/plugins/css/loaders/sourcemap.js +1 -0
- package/dist/rollup/plugins/css/loaders/stylus.d.ts +1 -2
- package/dist/rollup/plugins/css/loaders/stylus.js +1 -0
- package/dist/rollup/plugins/css/{minifiers/lightningcss.mjs → loaders/tailwindcss.d.ts} +1 -1
- package/dist/rollup/plugins/css/loaders/tailwindcss.js +1 -0
- package/dist/rollup/plugins/css/minifiers/cssnano.d.ts +1 -2
- package/dist/rollup/plugins/css/minifiers/cssnano.js +1 -0
- package/dist/rollup/plugins/css/minifiers/lightningcss.d.ts +1 -2
- package/dist/rollup/plugins/css/minifiers/lightningcss.js +1 -0
- package/dist/rollup/plugins/esbuild/index.d.ts +7 -5
- package/dist/rollup/plugins/esbuild/index.js +1 -0
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.ts +25 -10
- package/dist/rollup/plugins/oxc/{isolated-declarations-oxc-transformer.mjs → isolated-declarations-oxc-transformer.js} +1 -1
- package/dist/rollup/plugins/oxc/oxc-transformer.d.ts +7 -6
- package/dist/rollup/plugins/oxc/{oxc-transformer.mjs → oxc-transformer.js} +1 -1
- package/dist/rollup/plugins/sucrase/index.d.ts +5 -4
- package/dist/rollup/plugins/sucrase/index.js +1 -0
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.ts +6 -5
- package/dist/rollup/plugins/swc/{isolated-declarations-swc-transformer.mjs → isolated-declarations-swc-transformer.js} +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.d.ts +26 -10
- package/dist/rollup/plugins/swc/swc-plugin.js +1 -0
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.ts +6 -4
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.js +1 -0
- package/files.d.ts +37 -0
- package/package.json +67 -55
- package/dist/builder/typedoc/index.d.mts +0 -27
- package/dist/builder/typedoc/index.mjs +0 -3
- package/dist/cli/index.mjs +0 -55
- package/dist/config/index.d.mts +0 -29
- package/dist/index.d.mts +0 -35
- package/dist/index.mjs +0 -1
- package/dist/packem_shared/default-CBa9Nwy_.mjs +0 -1
- package/dist/packem_shared/default-DlLVgYRF.mjs +0 -1
- package/dist/packem_shared/default-DrXMWF-8.mjs +0 -1
- package/dist/packem_shared/default-DuCyCmG2.mjs +0 -1
- package/dist/packem_shared/default-lC8LWTO_.mjs +0 -1
- package/dist/packem_shared/esbuildPlugin-BAwyhG6L-BTISgbUT.mjs +0 -3
- package/dist/packem_shared/index-CG57YXz-.mjs +0 -138
- package/dist/packem_shared/index-Sedl0fV9.d.ts +0 -2554
- package/dist/packem_shared/oxcTransformPlugin-DfVQouIB-Bxgxc0jX.mjs +0 -4
- package/dist/packem_shared/swcPlugin-Boip4lWG-DWNziB_j.mjs +0 -1
- package/dist/packem_shared/types-Bgf1bUQM.d.mts +0 -2765
- package/dist/packem_shared/types-C-wHDExv.d.ts +0 -2765
- package/dist/rollup/plugins/css/loaders/less.d.mts +0 -1
- package/dist/rollup/plugins/css/loaders/less.mjs +0 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.d.mts +0 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.mjs +0 -1
- package/dist/rollup/plugins/css/loaders/postcss.d.mts +0 -1
- package/dist/rollup/plugins/css/loaders/postcss.mjs +0 -1
- package/dist/rollup/plugins/css/loaders/sass.d.mts +0 -1
- package/dist/rollup/plugins/css/loaders/sass.mjs +0 -1
- package/dist/rollup/plugins/css/loaders/sourcemap.d.mts +0 -8
- package/dist/rollup/plugins/css/loaders/sourcemap.mjs +0 -1
- package/dist/rollup/plugins/css/loaders/stylus.d.mts +0 -1
- package/dist/rollup/plugins/css/loaders/stylus.mjs +0 -1
- package/dist/rollup/plugins/css/minifiers/cssnano.d.mts +0 -1
- package/dist/rollup/plugins/css/minifiers/cssnano.mjs +0 -1
- package/dist/rollup/plugins/css/minifiers/lightningcss.d.mts +0 -1
- package/dist/rollup/plugins/esbuild/index.d.mts +0 -22
- package/dist/rollup/plugins/esbuild/index.mjs +0 -1
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.mts +0 -23
- package/dist/rollup/plugins/oxc/oxc-transformer.d.mts +0 -18
- package/dist/rollup/plugins/sucrase/index.d.mts +0 -17
- package/dist/rollup/plugins/sucrase/index.mjs +0 -1
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.mts +0 -18
- package/dist/rollup/plugins/swc/swc-plugin.d.mts +0 -24
- package/dist/rollup/plugins/swc/swc-plugin.mjs +0 -1
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.mts +0 -22
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.mjs +0 -1
- /package/dist/config/{index.mjs → index.js} +0 -0
- /package/dist/packem_shared/{browserslistToEsbuild-C0IWmbNe-C6xPL1oW.mjs → browserslistToEsbuild-C0IWmbNe-C6xPL1oW.js} +0 -0
- /package/dist/packem_shared/{create-or-update-key-storage-GwAIWW7R.mjs → create-or-update-key-storage-GwAIWW7R.js} +0 -0
- /package/dist/packem_shared/{index-CUp9WuCG.mjs → index-CUp9WuCG.js} +0 -0
- /package/dist/packem_shared/{isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.mjs → isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.js} +0 -0
- /package/dist/packem_shared/{isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.mjs → isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.js} +0 -0
- /package/dist/packem_shared/{isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.mjs → isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js} +0 -0
- /package/dist/packem_shared/{oxcResolvePlugin-BJpi-eSG-BsYx9cDO.mjs → oxcResolvePlugin-BJpi-eSG-BsYx9cDO.js} +0 -0
- /package/dist/packem_shared/{resolveTypescriptMjsCtsPlugin-DcZrZTmM-BEkYWTsH.mjs → resolveTypescriptMjsCtsPlugin-DcZrZTmM-BEkYWTsH.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,265 @@
|
|
|
1
|
+
## @visulima/packem [2.0.0-alpha.21](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.20...@visulima/packem@2.0.0-alpha.21) (2025-09-22)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated deps, added usage of pnpm catalog ([14987df](https://github.com/visulima/packem/commit/14987dff37121ca7aab6f9d0a07b24a1a2f5284a))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Dependencies
|
|
9
|
+
|
|
10
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.16
|
|
11
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.12
|
|
12
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.6
|
|
13
|
+
|
|
14
|
+
## @visulima/packem [2.0.0-alpha.20](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.19...@visulima/packem@2.0.0-alpha.20) (2025-09-17)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* update dependencies and versions across multiple packages ([b17ec3b](https://github.com/visulima/packem/commit/b17ec3b30f1bfa6267e9eede14fbb569c55b09cf))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Dependencies
|
|
22
|
+
|
|
23
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.15
|
|
24
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.11
|
|
25
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.5
|
|
26
|
+
|
|
27
|
+
## @visulima/packem [2.0.0-alpha.19](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.18...@visulima/packem@2.0.0-alpha.19) (2025-09-05)
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* update dependencies and versions across multiple packages ([1bf21ee](https://github.com/visulima/packem/commit/1bf21ee3bf5e06c6ac53872ec33d64b4ad7cf588))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Dependencies
|
|
35
|
+
|
|
36
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.14
|
|
37
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.10
|
|
38
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.4
|
|
39
|
+
|
|
40
|
+
## @visulima/packem [2.0.0-alpha.18](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.17...@visulima/packem@2.0.0-alpha.18) (2025-09-03)
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* enhance integration tests for CSS and raw data handling ([67aecd3](https://github.com/visulima/packem/commit/67aecd337192d8ea284425db7230661e87de7ad5))
|
|
45
|
+
|
|
46
|
+
### Code Refactoring
|
|
47
|
+
|
|
48
|
+
* update integration tests to use toContain for better readability ([f4015b1](https://github.com/visulima/packem/commit/f4015b10f9910e6f6e4f214a9e0a423c57c0291f))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Dependencies
|
|
52
|
+
|
|
53
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.13
|
|
54
|
+
|
|
55
|
+
## @visulima/packem [2.0.0-alpha.17](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.16...@visulima/packem@2.0.0-alpha.17) (2025-09-03)
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* update .gitignore and enhance tests for CSS processing ([4e706a2](https://github.com/visulima/packem/commit/4e706a267ee2d7b9a89796b7227ae65f80823b71))
|
|
60
|
+
|
|
61
|
+
### Miscellaneous Chores
|
|
62
|
+
|
|
63
|
+
* update dependencies and versions in package.json and pnpm-lock.yaml ([df62809](https://github.com/visulima/packem/commit/df628094fc6fd5e79cbb939a61bab79d6c89b833))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Dependencies
|
|
67
|
+
|
|
68
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.3
|
|
69
|
+
|
|
70
|
+
## @visulima/packem [2.0.0-alpha.16](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.15...@visulima/packem@2.0.0-alpha.16) (2025-09-01)
|
|
71
|
+
|
|
72
|
+
### Features
|
|
73
|
+
|
|
74
|
+
* add inline CSS processing mode to rollup-plugin-css ([2605997](https://github.com/visulima/packem/commit/2605997bc1e76a80b22529fd71ec053c02111ea2))
|
|
75
|
+
|
|
76
|
+
### Miscellaneous Chores
|
|
77
|
+
|
|
78
|
+
* update dependencies and versions in package.json and pnpm-lock.yaml ([e6086fb](https://github.com/visulima/packem/commit/e6086fbd6ad21bbc35b8365b03e8a5d543354154))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Dependencies
|
|
82
|
+
|
|
83
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.2
|
|
84
|
+
|
|
85
|
+
## @visulima/packem [2.0.0-alpha.15](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.14...@visulima/packem@2.0.0-alpha.15) (2025-08-29)
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
* added the first migration for the rolldown-plugin-dts for rollup ([fb3321f](https://github.com/visulima/packem/commit/fb3321fedb5101368bdf8e711db30d00d9ef26f3))
|
|
90
|
+
* enhance jiti import resolution in create-stub ([6c4ddb3](https://github.com/visulima/packem/commit/6c4ddb32238fd5cb3ac94e9f98ce27999c58034a))
|
|
91
|
+
* implement lazy barrel optimization in rollup-plugin ([2cdcb34](https://github.com/visulima/packem/commit/2cdcb342f41940b4b277698740153953b905acd0))
|
|
92
|
+
* introduce debarrel optimization for improved import handling ([129435e](https://github.com/visulima/packem/commit/129435ee941f2cd9f003046225e2a8862eb2cba7))
|
|
93
|
+
* update rollup-plugin-dts with new dependencies and type handling improvements ([b9ca7f8](https://github.com/visulima/packem/commit/b9ca7f802247977c5cd0a4debf8fe3a376c525df))
|
|
94
|
+
|
|
95
|
+
### Code Refactoring
|
|
96
|
+
|
|
97
|
+
* rename rollup-css-plugin to rollup-plugin-css and update related imports ([876e241](https://github.com/visulima/packem/commit/876e241ec8cf727e9f1666902733996752b18295))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Dependencies
|
|
101
|
+
|
|
102
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.12
|
|
103
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.9
|
|
104
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.1
|
|
105
|
+
|
|
106
|
+
## @visulima/packem [2.0.0-alpha.14](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.13...@visulima/packem@2.0.0-alpha.14) (2025-08-25)
|
|
107
|
+
|
|
108
|
+
### Features
|
|
109
|
+
|
|
110
|
+
* Add Data URI plugin support for SVG files ([8528648](https://github.com/visulima/packem/commit/852864828d09a70367c93228b1bee8699e1e00f2))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Dependencies
|
|
114
|
+
|
|
115
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.11
|
|
116
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.8
|
|
117
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.10
|
|
118
|
+
|
|
119
|
+
## @visulima/packem [2.0.0-alpha.13](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.12...@visulima/packem@2.0.0-alpha.13) (2025-08-21)
|
|
120
|
+
|
|
121
|
+
### Bug Fixes
|
|
122
|
+
|
|
123
|
+
* Introduce Button and Card components with Tailwind CSS styles ([bd9d5c3](https://github.com/visulima/packem/commit/bd9d5c371afbc6adf030ade6a64b572f6eb4c2cc))
|
|
124
|
+
|
|
125
|
+
### Code Refactoring
|
|
126
|
+
|
|
127
|
+
* Update component imports and CSS references for Tailwind integration ([46a1293](https://github.com/visulima/packem/commit/46a1293c5694fccd79670f9c9f51565374f26069))
|
|
128
|
+
* Update CSS imports and component structure for Tailwind integration ([8f4535a](https://github.com/visulima/packem/commit/8f4535a6cf762ae8a5369154fdc870e76e817ffc))
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
### Dependencies
|
|
132
|
+
|
|
133
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.10
|
|
134
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.9
|
|
135
|
+
|
|
136
|
+
## @visulima/packem [2.0.0-alpha.12](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.11...@visulima/packem@2.0.0-alpha.12) (2025-08-21)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Dependencies
|
|
140
|
+
|
|
141
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.8
|
|
142
|
+
|
|
143
|
+
## @visulima/packem [2.0.0-alpha.11](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.10...@visulima/packem@2.0.0-alpha.11) (2025-08-20)
|
|
144
|
+
|
|
145
|
+
### Bug Fixes
|
|
146
|
+
|
|
147
|
+
* update raw plugin to handle .js?raw imports and improve file reading ([670dad5](https://github.com/visulima/packem/commit/670dad559e535af5c883556e6a7af7794465c669))
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Dependencies
|
|
151
|
+
|
|
152
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.9
|
|
153
|
+
|
|
154
|
+
## @visulima/packem [2.0.0-alpha.10](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.9...@visulima/packem@2.0.0-alpha.10) (2025-08-20)
|
|
155
|
+
|
|
156
|
+
### Bug Fixes
|
|
157
|
+
|
|
158
|
+
* fixed the custom resolver for tailwind loader ([1fd0b43](https://github.com/visulima/packem/commit/1fd0b4345aa90f5c250eba9fd8c741e569b84abc))
|
|
159
|
+
|
|
160
|
+
### Miscellaneous Chores
|
|
161
|
+
|
|
162
|
+
* update dependencies for Tailwind CSS and CSS Style Inject ([ef84f41](https://github.com/visulima/packem/commit/ef84f4193be1008b630e9bb29b2cbc78a6d93532))
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### Dependencies
|
|
166
|
+
|
|
167
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.8
|
|
168
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.7
|
|
169
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.7
|
|
170
|
+
|
|
171
|
+
## @visulima/packem [2.0.0-alpha.9](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.8...@visulima/packem@2.0.0-alpha.9) (2025-08-17)
|
|
172
|
+
|
|
173
|
+
### Features
|
|
174
|
+
|
|
175
|
+
* added tailwindcss oxide loader ([#166](https://github.com/visulima/packem/issues/166)) ([acbbc59](https://github.com/visulima/packem/commit/acbbc59071e771a94d1a0c5435b267e483e3ad73))
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
### Dependencies
|
|
179
|
+
|
|
180
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.7
|
|
181
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.6
|
|
182
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.6
|
|
183
|
+
|
|
184
|
+
## @visulima/packem [2.0.0-alpha.8](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.7...@visulima/packem@2.0.0-alpha.8) (2025-08-11)
|
|
185
|
+
|
|
186
|
+
### Bug Fixes
|
|
187
|
+
|
|
188
|
+
* fixed undefined based on exitCode ([9bd9a54](https://github.com/visulima/packem/commit/9bd9a5413d78163b56efda75c18270ad9f099106))
|
|
189
|
+
|
|
190
|
+
## @visulima/packem [2.0.0-alpha.7](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.6...@visulima/packem@2.0.0-alpha.7) (2025-08-10)
|
|
191
|
+
|
|
192
|
+
### Features
|
|
193
|
+
|
|
194
|
+
* add lucide-static integration and SVG comment stripping ([ac344b3](https://github.com/visulima/packem/commit/ac344b3eb9566e479764625cd877617379d10c16))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Dependencies
|
|
198
|
+
|
|
199
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.6
|
|
200
|
+
|
|
201
|
+
## @visulima/packem [2.0.0-alpha.6](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.5...@visulima/packem@2.0.0-alpha.6) (2025-08-10)
|
|
202
|
+
|
|
203
|
+
### Bug Fixes
|
|
204
|
+
|
|
205
|
+
* update dependencies and add data-uri plugin support ([a52dab5](https://github.com/visulima/packem/commit/a52dab541290324218949ad5ea9502b127d0b0dd))
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### Dependencies
|
|
209
|
+
|
|
210
|
+
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.5
|
|
211
|
+
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.5
|
|
212
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.5
|
|
213
|
+
|
|
214
|
+
## @visulima/packem [2.0.0-alpha.5](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.4...@visulima/packem@2.0.0-alpha.5) (2025-07-31)
|
|
215
|
+
|
|
216
|
+
### Bug Fixes
|
|
217
|
+
|
|
218
|
+
* add comprehensive tests for glob pattern validation in package exports ([00cdaf1](https://github.com/visulima/packem/commit/00cdaf1770ce8997174392a5e6ef3f53c3e54da7))
|
|
219
|
+
|
|
220
|
+
## @visulima/packem [2.0.0-alpha.4](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.3...@visulima/packem@2.0.0-alpha.4) (2025-07-31)
|
|
221
|
+
|
|
222
|
+
### Bug Fixes
|
|
223
|
+
|
|
224
|
+
* enhance `ignoreExportKeys` functionality to support wildcard patterns ([18370ae](https://github.com/visulima/packem/commit/18370ae4d298119ccc3ccfdb95b1c82968990209))
|
|
225
|
+
|
|
226
|
+
### Tests
|
|
227
|
+
|
|
228
|
+
* adjust assertions in package-json-exports integration test ([1b75e29](https://github.com/visulima/packem/commit/1b75e29d2c9e04e27c8ef00a64374c374c6a8f24))
|
|
229
|
+
|
|
230
|
+
## @visulima/packem [2.0.0-alpha.3](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.2...@visulima/packem@2.0.0-alpha.3) (2025-07-31)
|
|
231
|
+
|
|
232
|
+
### Features
|
|
233
|
+
|
|
234
|
+
* add support for ignoring export keys and allowed export extensions ([3a49564](https://github.com/visulima/packem/commit/3a4956481e6896b7f86670e7df8efb521f30e6e6))
|
|
235
|
+
* enhance file extension handling and update package dependencies ([42764b0](https://github.com/visulima/packem/commit/42764b0f0bfc56104c30cc91f43d23e6e8ffbc33))
|
|
236
|
+
* set default TypeScript declaration option for ESM-only builds ([7064518](https://github.com/visulima/packem/commit/706451805bab49cadbf597b052cd44e20a55a493))
|
|
237
|
+
|
|
238
|
+
### Bug Fixes
|
|
239
|
+
|
|
240
|
+
* add new configuration options for build process ([f2f6b25](https://github.com/visulima/packem/commit/f2f6b25338b92dc2d17e103281de4523177a8356))
|
|
241
|
+
* fixed isolated types ([2926425](https://github.com/visulima/packem/commit/29264250a4adb0407fe1a78e613c84d9f5ce9279))
|
|
242
|
+
* **tests:** improve test descriptions and mock implementation ([8a11cdd](https://github.com/visulima/packem/commit/8a11cdd08277ef9d2229e81bd693c73ee28d4c56))
|
|
243
|
+
* update .npmrc and package.json for dependency management ([71104f0](https://github.com/visulima/packem/commit/71104f0718aee2b66e548723c06c220a8a71cab7))
|
|
244
|
+
* update package dependencies and improve compatibility ([0db341b](https://github.com/visulima/packem/commit/0db341b4e8c90e21d6bda36612d880168f183b7c))
|
|
245
|
+
|
|
246
|
+
### Styles
|
|
247
|
+
|
|
248
|
+
* cs fix ([9566a74](https://github.com/visulima/packem/commit/9566a74136eb8e78ae209997c652ce66a56afbf7))
|
|
249
|
+
|
|
250
|
+
### Miscellaneous Chores
|
|
251
|
+
|
|
252
|
+
* update package dependencies and improve TypeScript compatibility ([d0d337f](https://github.com/visulima/packem/commit/d0d337fe20558e1626cbcbeec19e9c2052f15aa2))
|
|
253
|
+
* update package dependencies to version 2.0.3 for @anolilab/semantic-release-pnpm and @anolilab/semantic-release-preset; bump oxc-transform and oxc-parser to 0.79.1 ([ce60668](https://github.com/visulima/packem/commit/ce606682c65afcb710e7a923429c2c543f52d88f))
|
|
254
|
+
* update semantic-release workflow and clean up test files ([04101d0](https://github.com/visulima/packem/commit/04101d0ea9936dc8231dce23c54e8bbef249e5c8))
|
|
255
|
+
* update semantic-release workflow and refine integration tests ([d5a800f](https://github.com/visulima/packem/commit/d5a800fadb5037ec9c398ceba93f7b2b25fa6fb5))
|
|
256
|
+
|
|
257
|
+
### Code Refactoring
|
|
258
|
+
|
|
259
|
+
* consolidate file extension logic and update package dependencies ([ceff776](https://github.com/visulima/packem/commit/ceff776bbc5eaa6bd85819271942aab7faf77cd2))
|
|
260
|
+
* **tests:** streamline file existence checks and update output extensions ([4567e62](https://github.com/visulima/packem/commit/4567e62dfa6ffdcc153c6d19ba26c88d209ccc95))
|
|
261
|
+
* update output extension handling and improve TypeScript declaration mapping ([bca86e4](https://github.com/visulima/packem/commit/bca86e4fc1d5c3934f2ba5fff74c2f017d98068f))
|
|
262
|
+
|
|
1
263
|
## @visulima/packem [2.0.0-alpha.2](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.1...@visulima/packem@2.0.0-alpha.2) (2025-07-02)
|
|
2
264
|
|
|
3
265
|
### Bug Fixes
|
|
@@ -130,7 +392,7 @@
|
|
|
130
392
|
|
|
131
393
|
* **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.1
|
|
132
394
|
* **@visulima/packem-share:** upgraded to 1.0.0-alpha.1
|
|
133
|
-
* **@visulima/rollup-css
|
|
395
|
+
* **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.1
|
|
134
396
|
|
|
135
397
|
## @visulima/packem [1.28.2](https://github.com/visulima/packem/compare/@visulima/packem@1.28.1...@visulima/packem@1.28.2) (2025-06-24)
|
|
136
398
|
|
package/README.md
CHANGED
|
@@ -163,13 +163,9 @@ Enable the automatic `node 10` typesVersions generation in packem.config.js:
|
|
|
163
163
|
```js
|
|
164
164
|
export default defineConfig({
|
|
165
165
|
// ...
|
|
166
|
-
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
typeScriptVersion: ">=5.0", // Chose the version of TypeScript you want to support
|
|
170
|
-
writeToPackageJson: true,
|
|
171
|
-
},
|
|
172
|
-
// ...
|
|
166
|
+
node10Compatibility: {
|
|
167
|
+
typeScriptVersion: ">=5.0", // Chose the version of TypeScript you want to support
|
|
168
|
+
writeToPackageJson: true,
|
|
173
169
|
},
|
|
174
170
|
transformer,
|
|
175
171
|
});
|
|
@@ -454,13 +450,13 @@ Native Node.js import mapping supports conditional imports (eg. resolving differ
|
|
|
454
450
|
{
|
|
455
451
|
// ...
|
|
456
452
|
|
|
457
|
-
|
|
453
|
+
imports: {
|
|
458
454
|
// Mapping '~utils' to './src/utils.js'
|
|
459
455
|
"~utils": "./src/utils.js",
|
|
460
456
|
|
|
461
457
|
// Native Node.js import mapping (can't reference ./src)
|
|
462
|
-
"#internal-package": "./vendors/package/index.js"
|
|
463
|
-
}
|
|
458
|
+
"#internal-package": "./vendors/package/index.js",
|
|
459
|
+
},
|
|
464
460
|
}
|
|
465
461
|
```
|
|
466
462
|
|
|
@@ -895,7 +891,15 @@ Will look for `_custom` first (_with the appropriate extension(s)_), and then fo
|
|
|
895
891
|
styles({
|
|
896
892
|
mode: "inject", // Unnecessary, set by default
|
|
897
893
|
// ...or with custom options for injector
|
|
898
|
-
mode: [
|
|
894
|
+
mode: [
|
|
895
|
+
"inject",
|
|
896
|
+
{
|
|
897
|
+
attributes: { id: "global" },
|
|
898
|
+
container: "body",
|
|
899
|
+
prepend: true,
|
|
900
|
+
singleTag: true,
|
|
901
|
+
},
|
|
902
|
+
],
|
|
899
903
|
// ...or with custom injector
|
|
900
904
|
mode: ["inject", (varname, id) => `console.log(${varname},${JSON.stringify(id)})`],
|
|
901
905
|
});
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../../packem_shared/
|
|
3
|
-
import '@rollup/pluginutils';
|
|
4
|
-
import 'rollup';
|
|
1
|
+
import { B as BuildContext } from '../../packem_shared/index-zrs6Po_w.js';
|
|
2
|
+
import { I as InternalBuildOptions } from '../../packem_shared/types-5psa8MJc.js';
|
|
5
3
|
import '@rollup/plugin-alias';
|
|
6
4
|
import '@rollup/plugin-commonjs';
|
|
7
5
|
import '@rollup/plugin-json';
|
|
8
6
|
import '@rollup/plugin-node-resolve';
|
|
9
7
|
import '@rollup/plugin-replace';
|
|
10
8
|
import '@rollup/plugin-wasm';
|
|
9
|
+
import '@rollup/pluginutils';
|
|
10
|
+
import 'rollup';
|
|
11
11
|
import 'rollup-plugin-dts';
|
|
12
12
|
import 'rollup-plugin-polyfill-node';
|
|
13
13
|
import 'rollup-plugin-pure';
|
|
14
14
|
import 'rollup-plugin-visualizer';
|
|
15
15
|
import 'esbuild';
|
|
16
|
+
import '@visulima/package';
|
|
17
|
+
import '@visulima/colorize';
|
|
16
18
|
import 'oxc-resolver';
|
|
17
19
|
import 'oxc-transform';
|
|
18
20
|
import 'sucrase';
|
|
19
|
-
import '@visulima/
|
|
20
|
-
import '@visulima/colorize';
|
|
21
|
-
import '@visulima/rollup-css-plugin';
|
|
21
|
+
import '@visulima/rollup-plugin-css';
|
|
22
22
|
import 'jiti';
|
|
23
23
|
import 'typedoc';
|
|
24
24
|
|
|
25
25
|
declare const builder: (context: BuildContext<InternalBuildOptions>, cachePath: string | undefined, _: never, logged: boolean) => Promise<void>;
|
|
26
26
|
|
|
27
|
-
export
|
|
27
|
+
export { builder as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var j=Object.defineProperty;var g=(e,o)=>j(e,"name",{value:o,configurable:!0});import{cyan as v}from"@visulima/colorize";import{join as h}from"@visulima/path";import{p as $,d as P}from"../../packem_shared/create-or-update-key-storage-GwAIWW7R.js";import{readdirSync as A}from"node:fs";import{readFileSync as w,writeFileSync as F}from"@visulima/fs";import{Application as b}from"typedoc";var T=Object.defineProperty,_=g((e,o)=>T(e,"name",{value:o,configurable:!0}),"w");const C=_(async(e,o,a,s)=>{if(o.length===0)return;const{format:t,jsonFileName:n,marker:i,output:x,plugin:k,readmePath:p,...y}=e;if(t==="inline"&&p===void 0)throw new Error("The `readmePath` option is required when using the `inline` format.");if(t!=="inline"&&typeof p=="string"&&s.warn({message:"The `readmePath` option is only used when the `inline` format is used.",prefix:"typedoc"}),t==="json"){if(n===void 0)throw new Error("The `jsonFileName` option is required when using the `json` format.");if(!n.endsWith(".json"))throw new Error("The `jsonFileName` option must end with `.json`.")}t!=="json"&&typeof n=="string"&&s.warn({message:"The `jsonFileName` option is only used when the `json` format is used.",prefix:"typedoc"});const E=o.map(m=>m.input),u=k??[];u.push("typedoc-plugin-rename-defaults"),(t==="inline"||t==="markdown")&&u.push("typedoc-plugin-markdown");const l=await b.bootstrapWithPlugins({...y,compilerOptions:{allowJs:!0,declaration:!1,declarationMap:!1,esModuleInterop:!0,module:99,moduleResolution:100,noEmit:!0,noImplicitAny:!1,skipLibCheck:!0,sourceMap:!1,target:99,...y.compilerOptions},entryPoints:E,hideGenerator:!0,out:a,plugin:u,...t==="inline"?{hideBreadcrumbs:!0,hidePageHeader:!0,navigation:!1,outputFileStrategy:"modules",useCodeBlocks:!0}:{}},[]),d=await l.convert();if(d){if(t==="json")await l.generateJson(d,n);else if(t==="html")await l.generateDocs(d,a);else if(await l.generateOutputs(d),t==="inline"){if(i===void 0)throw new Error("The `marker` option is required when using the `inline` format.");const m=A(a,{withFileTypes:!0}).filter(r=>r.isFile());let f="";for(const r of m)r.name==="README.md"&&o.length>1||(f+=w(h(a,r.name)).replaceAll(`<!-- ${i}`,`<!-- _REPLACE_${i}`).replaceAll("<!-- ${marker}",`<!-- _REPLACE_\\${i}`));if(f!==""){const r=w(p),c=$(r,i,`
|
|
2
|
+
${f}`);if(!c){s.error({message:`Could not find the typedoc marker: <!-- ${i} --><!-- /${i} --> in ${p}`,prefix:"typedoc"});return}if(r===c)return;c&&F(p,c.replaceAll(`<!-- _REPLACE_${i}`,`<!-- ${i}`).replaceAll(`<!-- _REPLACE_\\${i}`,"<!-- ${marker}"),{overwrite:!0})}}}},"generateReferenceDocumentation");var R=Object.defineProperty,D=g((e,o)=>R(e,"name",{value:o,configurable:!0}),"r");const B=D(async(e,o,a,s)=>{if(e.options.typedoc&&e.options.typedoc.format!==void 0){let t="unknown";e.pkg.dependencies?.typedoc?t=e.pkg.dependencies.typedoc:e.pkg.devDependencies?.typedoc&&(t=e.pkg.devDependencies.typedoc),o&&P("typedoc",o,e.logger,!0),s&&e.logger.raw(`
|
|
3
|
+
`),e.logger.info({message:`Using ${v("typedoc")} ${t} to generate reference documentation`,prefix:"typedoc"}),await e.hooks.callHook("typedoc:before",e);let n=e.options.rootDir;e.options.typedoc.output?n=e.options.typedoc.output:e.options.typedoc.format==="inline"&&o?n=h(o,"typedoc"):e.options.typedoc.format!=="json"&&(n=h(n,"api-docs")),await C(e.options.typedoc,e.options.entries,n,e.logger),await e.hooks.callHook("typedoc:done",e)}},"builder");export{B as default};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var Y=Object.defineProperty;var k=(s,t)=>Y(s,"name",{value:t,configurable:!0});import Q from"@visulima/cerebro";import{SimpleReporter as Z}from"@visulima/pail/reporter";import{cwd as A,exit as ee}from"node:process";import{installPackage as N}from"@antfu/install-pkg";import{spinner as K,select as $,multiselect as F,confirm as w,intro as se,log as G,cancel as te,outro as oe}from"@clack/prompts";import{isAccessible as ie,readFile as ne,writeFile as ae,isAccessibleSync as S,collectSync as re,writeJsonSync as le,writeFileSync as ce}from"@visulima/fs";import{join as x,resolve as M,extname as W,toNamespacedPath as pe}from"@visulima/path";import de from"magic-string";import{t as I,E as V,e as ue,N as q,_ as me,c as fe}from"../packem_shared/index-CUp9WuCG.js";import{defu as ye}from"defu";import{createJiti as ge}from"jiti";import{cyan as be,bold as O,gray as ve}from"@visulima/colorize";import{e as we,i as J,c as he,b as ke}from"../packem_shared/index-CFFENGTN.js";import{parsePackageJson as $e}from"@visulima/package/package-json";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
3
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
4
|
+
const Se="@visulima/packem",xe="2.0.0-alpha.20";var je=Object.defineProperty,Ce=k((s,t)=>je(s,"name",{value:t,configurable:!0}),"t$2");const _=Ce(async(s,t="")=>{let e=t;if(!e){const r=["packem.config.js","packem.config.mjs","packem.config.cjs","packem.config.ts","packem.config.cts","packem.config.mts"];for(const n of r)if(await ie(x(s,n))){e=`./${n}`;break}}if(!/\.(?:js|mjs|cjs|ts|cts|mts)$/.test(e))throw new Error("Invalid packem config file extension. Only .js, .mjs, .cjs, .ts, .cts and .mts extensions are allowed.");return e},"findPackemFile"),X={less:["less"],lightningcss:["lightningcss"],"node-sass":["node-sass"],postcss:["postcss","postcss-load-config","postcss-modules-extract-imports","postcss-modules-local-by-default","postcss-modules-scope","postcss-modules-values","postcss-value-parser","@csstools/css-parser-algorithms","@csstools/css-tokenizer","@csstools/postcss-slow-plugins","icss-utils","@visulima/css-style-inject"],sass:["sass"],"sass-embedded":["sass-embedded"],stylus:["stylus"],tailwindcss:["@tailwindcss/node","@tailwindcss/oxide","tailwindcss"]};var Ee=Object.defineProperty,R=k((s,t)=>Ee(s,"name",{value:t,configurable:!0}),"g");const De=["typedoc","typedoc-plugin-markdown","typedoc-plugin-rename-defaults"],Pe=R(s=>{s.addCommand({argument:{description:"Add a packem feature to your project",name:"feature",required:!0},description:"Add a optional packem feature to your project",execute:R(async({argument:t,logger:e,options:r})=>{const n=K(),i=M(A(),r.dir??".");let d;try{d=await _(i,r.config)}catch{e.error("Could not find a packem config file, please run `packem init` first.");return}const f=await ne(d,{buffer:!1});let y="cjs";f.includes("import")&&(y="esm");const o=new de(f),u=" transformer,";let p=" transformer";if(f.includes(" transformer,")&&(p=" transformer,"),t.includes("typedoc")){if(f.includes("typedoc: typedocBuilder")||f.includes("@visulima/packem/builder/typedoc")){e.warn("Typedoc has already been added to the packem config.");return}y==="cjs"?o.prepend(`const typedocBuilder = require("@visulima/packem/builder/typedoc");
|
|
5
|
+
`):o.prepend(`import typedocBuilder from "@visulima/packem/builder/typedoc";
|
|
6
|
+
`),f.includes("builder: {")?o.replace("builder: {",`builder: {
|
|
7
|
+
typedoc: typedocBuilder,
|
|
8
|
+
`):o.replace(p,`${u}
|
|
9
|
+
builder: {
|
|
10
|
+
typedoc: typedocBuilder,
|
|
11
|
+
},`),e.info("Adding typedoc dependencies..."),n.start("Installing packages"),await N(De,{cwd:i,dev:!0,silent:!0}),n.stop("Installed packages"),e.success(`
|
|
12
|
+
Typedoc added!`)}if(t.includes("css")){if(f.includes("css: {")||f.includes("@visulima/packem/css")){e.warn("Css loaders have already been added to the packem config.");return}const l=[],b=await $({message:"Pick a css loader",options:[{label:"PostCSS",value:"postcss"},{hint:"experimental",label:"Lightning CSS",value:"lightningcss"},{hint:"Tailwind Css Oxide",label:"Tailwind CSS",value:"tailwindcss"}]});if(l.push(b),b!=="tailwindcss"){let m=await F({message:"Pick extra loaders",options:[{label:"Sass",value:"sass"},{label:"Stylus",value:"stylus"},{label:"Less",value:"less"}],required:!1});if(m.includes("sass")){const h=await $({message:"Pick a sass loader",options:[{hint:"recommended",label:"Sass embedded",value:"sass-embedded"},{label:"Sass",value:"sass"},{hint:"legacy",label:"Node Sass",value:"node-sass"}]});h!=="sass"&&(m=m.filter(j=>j!=="sass"),m.push(h))}l.push(...m)}const v=[];for(const m of l)v.push(...X[m]);b!=="tailwindcss"&&l.push("sourceMap");for(let m of l)(m==="sass-embedded"||m==="node-sass")&&(m="sass"),y==="cjs"?o.prepend(`const ${m}Loader = require("@visulima/packem/css/loader/${m.toLowerCase()}");
|
|
13
|
+
`):o.prepend(`import ${m}Loader from "@visulima/packem/css/loader/${m.toLowerCase()}";
|
|
14
|
+
`);const c=await w({initialValue:!1,message:"Do you want to minify your css?"});let a;c&&(a=await $({message:"Pick a css minifier",options:[{label:"CSSNano",value:"cssnano"},{label:"Lightning CSS",value:"lightningcss"}]}),l.includes("lightningcss")||v.push(a),y==="cjs"?o.prepend(`const ${a}Minifier = require("@visulima/packem/css/minifier/${a.toLowerCase()}");
|
|
15
|
+
`):o.prepend(`import ${a}Minifier from "@visulima/packem/css/minifier/${a.toLowerCase()}";
|
|
16
|
+
`));const g=l.map(m=>((m==="sass-embedded"||m==="node-sass")&&(m="sass"),`${m}Loader`)).join(", ");f.includes("rollup: {")?o.replace("rollup: {",`rollup: {
|
|
17
|
+
css: {${a?`
|
|
18
|
+
minifier: ${a}Minifier,`:""}
|
|
19
|
+
loaders: [${g}],
|
|
20
|
+
},
|
|
21
|
+
`):o.replace(p,`${u}
|
|
22
|
+
rollup: {
|
|
23
|
+
css: {${a?`
|
|
24
|
+
minifier: ${a}Minifier,`:""}
|
|
25
|
+
loaders: [${g}],
|
|
26
|
+
},
|
|
27
|
+
},`),n.start("Installing packages"),await N(v,{cwd:i,dev:!0,silent:!0}),n.stop("Installed packages"),e.success(`
|
|
28
|
+
CSS loaders added!`)}await ae(d,o.toString(),{overwrite:!0})},"execute"),name:"add",options:[{defaultValue:".",description:"The directory to build",name:"dir",type:String},{description:"Use a custom config file",name:"config",type:String}]})},"createAddCommand");var Ie=Object.defineProperty,Me=k((s,t)=>Ie(s,"name",{value:t,configurable:!0}),"e$1");const Te=Me(async(s,t,e,r,n)=>{const i=await _(t,n);let d=await s.import(i,{default:!0,try:!0})||{};return typeof d=="function"&&(d=await d(e,r)),{config:d,path:i}},"loadPackemConfig");var Be=Object.defineProperty,T=k((s,t)=>Be(s,"name",{value:t,configurable:!0}),"E$1");const Le=T((s,t)=>s.key==="exports"&&s.subKey===I?I:s.key==="exports"&&s.subKey===V?V:t,"getEnvironment"),P=T((s,t,e,r,n,i,d)=>{const f=Le(n,i.environment);let y=i.options.runtime;for(const p of ue)if(n.file.includes(`.${p}.`)||n.subKey===p){y=p;break}let o=s.find(p=>p.input===t&&p.environment===f&&p.runtime===y);o===void 0?o=s[s.push({environment:f,exportKey:new Set([n.exportKey].filter(Boolean)),input:t,runtime:y})-1]:o.exportKey&&n.exportKey&&o.exportKey.add(n.exportKey),d&&(o.isGlob=!0),e&&(o.outDir=r),n.isExecutable?(o.executable=!0,o.declaration=!1,n.type==="cjs"?o.cjs=!0:n.type==="esm"&&(o.esm=!0)):(/\.d\.[mc]?ts$/.test(n.file)&&i.options.declaration!==!1&&(o.declaration=i.options.declaration),n.type==="cjs"?o.cjs=!0:n.type==="esm"&&(o.esm=!0));const u=n.file.replace(W(n.file),"").replace(new RegExp(`^./${i.options.outDir.replace(/^\.\//,"")}/`),"");q.has(n.subKey)&&!t.includes(u)&&(o.fileAlias=u)},"createOrUpdateEntry");let U=!1;const z=T(s=>{if(s.pkg?.dependencies?.typescript===void 0&&s.pkg?.devDependencies?.typescript===void 0)throw new Error("You tried to use a `.ts`, `.cts` or `.mts` file but `typescript` was not found in your package.json.")},"validateIfTypescriptIsInstalled"),Oe=T((s,t,e)=>{const r=(e.options.outputExtensionMap?.cjs??"cjs").replaceAll(".",String.raw`\.`),n=(e.options.outputExtensionMap?.esm??"mjs").replaceAll(".",String.raw`\.`),i=[];t.sort((o,u)=>o.split("/").length-u.split("/").length);const d=s.type==="module"?"esm":"cjs";d==="esm"&&(e.options.emitESM=!0),d==="cjs"&&(e.options.emitCJS=!0);const f=we(s.exports,d,e.options.declaration,[],e.options.ignoreExportKeys).filter(o=>!o.ignored);if(s.bin){const o=(typeof s.bin=="string"?[s.bin]:Object.values(s.bin)).filter(Boolean);for(const u of o){const p=J(u);if(p&&p!==d)throw new Error(`Exported file "${u}" has an extension that does not match the package.json type "${s.type??"commonjs"}".`);f.push({file:u,isExecutable:!0,key:"bin",type:p??d})}}s.main&&f.push({file:s.main,key:"main",type:J(s.main)??d}),s.module&&f.push({file:s.module,key:"module",type:"esm"}),(s.types||s.typings)&&(z(e),e.options.declaration===void 0&&(e.options.declaration="compatible"),f.push({file:s.types??s.typings,key:"types"}));const y=[];for(const o of f){const u=W(o.file);if(u!==""&&!me.includes(u))continue;e.options.declaration===void 0&&(o.key==="types"||o.subKey==="types")&&(e.options.declaration=o.file.includes(".d.ts")?"compatible":!0),e.options.emitCJS===void 0&&o.type==="cjs"&&(e.options.emitCJS=!0),e.options.emitESM===void 0&&o.type==="esm"&&(e.options.emitESM=!0);const p=o.file.replace(new RegExp(String.raw`(?:\*[^/\\]|\.d\.[mc]?ts|\.\w+|${[`\\.${r}`,`\\.${n}`].join("|")})$`),""),l=p.endsWith("/");if(l&&["./","/"].includes(p))continue;const b=p.replace(new RegExp(`(./)?${e.options.outDir}`),e.options.sourceDir).replace("./",""),v="(?<=/|$)",c=l?"":String.raw`(\.d\.[cm]?ts|(\.[cm]?[tj]sx?)|${[`\\.${r}`,`\\.${n}`].join("|")})$`;if(o.file.includes("/*")&&o.key==="exports"){U||(e.logger.debug("Private subfolders are not supported, if you need this feature please open an issue on GitHub."),U=!0);const h=[],j=new RegExp(v+b.replace("*","(.*)")+c),L=b.replace(/^(.+?)\.[^.]*$/,"$1"),H=new RegExp(v+L.replace("*","(.*)")+c);for(const C of t)(j.test(C)||q.has(o.subKey)&&H.test(C))&&h.push(C);if(h.length===0){i.push(`Could not find entrypoint for \`${o.file}\``);continue}for(const C of h)P(y,C,l,p,o,e,!0);continue}const a=new RegExp(v+b+c);let g=t.find(h=>a.test(h));if(q.has(o.subKey)&&g===void 0){const h=b.replace(/^(.+?)\.[^.]*$/,"$1"),j=new RegExp(v+h+c);g=t.find(L=>j.test(L))}if(g===void 0){S(M(e.options.rootDir,o.file))||i.push(`Could not find entrypoint for \`${o.file}\``);continue}S(g)&&/\.[cm]?tsx?$/.test(g)&&z(e);const m=pe(g.replace(fe,""));S(`${m}.cts`)&&S(`${m}.mts`)?(P(y,`${m}.cts`,l,p,{...o,type:"cjs"},e,!1),P(y,`${m}.mts`,l,p,{...o,type:"esm"},e,!1)):P(y,g,l,p,o,e,!1)}return e.options.emitESM&&!e.options.emitCJS&&e.options.declaration===void 0&&(e.options.declaration="node16"),{entries:y,warnings:i}},"inferEntries");var Ne=Object.defineProperty,Ke=k((s,t)=>Ne(s,"name",{value:t,configurable:!0}),"o");const Ve=Ke((s,t)=>{const{publishConfig:e}=s;return e&&(e.bin&&(typeof e.bin=="object"||typeof e.bin=="string")&&(s.bin=e.bin),e.type&&typeof e.type=="string"&&e.type!==""&&(s.type=e.type),e.main&&typeof e.main=="string"&&e.main!==""&&(s.main=e.main),e.module&&typeof e.module=="string"&&e.module!==""&&(s.module=e.module),t===void 0&&e.types&&typeof e.types=="string"&&e.types!==""?s.types=e.types:t===void 0&&e.typings&&typeof e.typings=="string"&&e.typings!==""&&(s.typings=e.typings),e.exports&&typeof e.exports=="object"&&(s.exports=e.exports)),s},"overwriteWithPublishConfig");var qe=Object.defineProperty,Ae=k((s,t)=>qe(s,"name",{value:t,configurable:!0}),"t$1");const Ge={hooks:{"build:prepare":Ae(function(s){if(s.options.entries.length>0)return;const t=x(s.options.rootDir,s.options.sourceDir);if(!S(t))throw new Error("No 'src' directory found. Please provide entries manually.");const e=re(t,{extensions:[],includeDirs:!1,includeSymlinks:!1,skip:[/.*\/node_modules\/.*/,/.*\/dist\/.*/]});if(e.length===0)throw new Error("No source files found in 'src' directory. Please provide entries manually.");let r={...s.pkg};r.publishConfig&&(s.logger.info(`Using publishConfig found in package.json, to override the default key-value pairs of "${Object.keys(r.publishConfig).join(", ")}".`),s.logger.debug(r.publishConfig),r=Ve(r,s.options.declaration));const n=Oe(r,e,s);for(const i of n.warnings)he(s,i);if(s.options.entries.push(...n.entries),s.options.entries.length===0)throw new Error("No entries detected. Please provide entries manually.");s.logger.info("Automatically detected entries:",be(s.options.entries.map(i=>i.fileAlias?`${O(i.fileAlias)} => ${O(i.input.replace(`${s.options.rootDir}/`,"").replace(/\/$/,"/*"))}`:O(i.input.replace(`${s.options.rootDir}/`,"").replace(/\/$/,"/*"))).join(", ")),ve([s.options.emitESM&&"esm",s.options.emitCJS&&"cjs",s.options.declaration&&"dts"].filter(Boolean).map(i=>`[${i}]`).join(" ")))},"build:prepare")}};var Je=Object.defineProperty,Re=k((s,t)=>Je(s,"name",{value:t,configurable:!0}),"t");const Ue=Re(async(s,t)=>{if(s==="auto")s=Ge;else{if(s==="none")return{};typeof s=="string"&&(s=await t.import(s)||{})}return typeof s=="function"&&(s=s()),s},"loadPreset");var ze=Object.defineProperty,E=k((s,t)=>ze(s,"name",{value:t,configurable:!0}),"r");const Fe=E(s=>{s.addCommand({description:"Demonstrate options required",execute:E(async({logger:t,options:e})=>{let r="build";e.watch?r="watch":e.jit&&(r="jit");const n={};let i;if(e.env)for(const l of e.env)l.key==="NODE_ENV"?i=l.value:n[`process.env.${l.key}`]=JSON.stringify(l.value);i===void 0&&(e.production?i=I:e.development&&(i=V));const d=[];if(e.external)for(const l of e.external)d.push(l.split(","));const f=M(A(),e.dir??"."),y=ge(f,{debug:e.debug}),{config:o,path:u}=await Te(y,f,i,r,e.config??void 0);t.debug("Using packem config found at",u);const p=await Ue(o.preset??"auto",y);e.minify&&e.sourcemap===void 0&&(e.sourcemap=!0);try{await ke(f,r,i,t,e.debug,ye(o,p,{analyze:e.analyze,cjsInterop:e.cjsInterop,clean:e.clean,dtsOnly:e.dtsOnly,externals:d,killSignal:e.killSignal,minify:e.minify===void 0?i===I:e.minify,onSuccess:e.onSuccess,rollup:{esbuild:{target:e.target},license:{path:e.license},metafile:e.metafile,replace:{values:n},resolveExternals:e.noExternal?{builtins:!1,deps:!1,devDeps:!1,optDeps:!1,peerDeps:!1}:{}},runtime:e.runtime,sourcemap:e.metafile||e.analyze||e.sourcemap,validation:e.validation===!1?!1:{},...e.typedoc?{typedoc:{format:"html"}}:{}}),e.tsconfig??void 0)}catch(l){t.error(l),ee(1)}},"execute"),name:"build",options:[{defaultValue:".",description:"The directory to build",name:"dir",type:String},{alias:"t",description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",name:"target"},{description:"Use a custom config file",name:"config",type:String},{description:"Path to the tsconfig.json file",name:"tsconfig",type:String},{description:"Minify the output",name:"minify",type:Boolean},{description:"Generate sourcemaps (experimental)",name:"sourcemap",type:Boolean},{conflicts:"jit",description:"Watch for changes",name:"watch",type:Boolean},{conflicts:"watch",description:"Stub the package for JIT compilation",name:"jit",type:Boolean},{description:"Compile-time environment variables (eg. --env.NODE_ENV=production)",multiple:!0,name:"env",type:E(t=>{const[e,r]=t.split("=");return{key:e,value:r}},"type")},{defaultValue:!1,description:"Generate meta file (experimental)",name:"metafile",type:Boolean},{description:"Path to the license file",name:"license",type:String},{conflicts:"watch",description:"Visualize and analyze the bundle",name:"analyze",type:Boolean},{description:"CJS interop mode, can export default and named export, (experimental).",name:"cjsInterop",type:Boolean},{conflicts:"development",description:"Run code in production environment",name:"production",type:Boolean},{conflicts:"production",description:"Run code in development environment",name:"development",type:Boolean},{description:"Do not clean the dist directory before building",name:"no-clean",type:Boolean},{description:"Only generate .d.ts files",name:"dts-only",type:Boolean},{description:"Disable the output validation",name:"no-validation",type:Boolean},{description:"Disable the cache",name:"no-cache",type:Boolean},{description:"Generate type documentation",name:"typedoc",type:Boolean},{description:"Execute command after successful build, specially useful for watch mode",name:"onSuccess",type:String},{description:'Signal to kill child process, "SIGTERM" or "SIGKILL"',name:"killSignal",type:E(t=>{if(t==="SIGTERM"||t==="SIGKILL")return t;throw new Error("Invalid kill signal. Use 'SIGTERM' or 'SIGKILL'.")},"type")},{description:"Specify an external dependency, separate by comma (eg. --external lodash,react,react-dom)",multiple:!0,name:"external",typeLabel:"string[]"},{description:"do not bundle external dependencies",name:"no-external",type:Boolean},{description:"Specify the build runtime (nodejs, browser).",name:"runtime",type:E(t=>{if(t==="node"||t==="browser")return t;throw new Error("Invalid runtime. Use 'node' or 'browser'.")},"type")}]})},"createBuildCommand");var We=Object.defineProperty,D=k((s,t)=>We(s,"name",{value:t,configurable:!0}),"f");const _e=D(s=>{s.addCommand({description:"Initialize packem configuration",execute:D(async({logger:t,options:e})=>{if(se("Welcome to packem setup"),S(x(e.dir,"packem.config.mjs"))){t.info("Packem project already initialized, you can use `packem build` to build your project");return}const r=M(A(),e.dir??"."),n=x(r,"package.json");if(!S(n))throw new Error("No package.json found in the directory");const i=$e(n),d=[];i.dependencies&&d.push(...Object.keys(i.dependencies)),i.devDependencies&&d.push(...Object.keys(i.devDependencies));const f=!!(i.devDependencies?.typescript??i.dependencies?.typescript),y=[];if(e.typescript===void 0&&!f?(e.typescript=await w({message:"Do you want to install TypeScript?"}),e.typescript&&y.push("typescript@latest")):G.message(`TypeScript version ${i.devDependencies?.typescript??i.dependencies?.typescript} is already installed`),!S(x(r,"tsconfig.json"))){const c=await w({message:"Do you want to use generate a tsconfig.json?"}),a=await w({message:"Do you want to run your code in the DOM?"});if(c){const g=K();g.start("Generating tsconfig.json"),le(x(r,"tsconfig.json"),{compilerOptions:{esModuleInterop:!0,skipLibCheck:!0,target:"es2022",allowJs:!0,resolveJsonModule:!0,moduleDetection:"force",isolatedModules:!0,verbatimModuleSyntax:!0,strict:!0,noUncheckedIndexedAccess:!0,noImplicitOverride:!0,module:"NodeNext",outDir:"dist",sourceMap:!0,declaration:!0,lib:a?["es2022","dom","dom.iterable"]:["es2022"]}}),g.stop("")}}if(e.runtime===void 0&&(e.runtime=await $({message:"Pick a build runtime",options:[{label:"Node",value:"node"},{label:"Browser",value:"browser"}]})),d.includes("esbuild")?e.transformer="esbuild":d.includes("@swc/core")?e.transformer="swc":d.includes("sucrase")&&(e.transformer="sucrase"),e.transformer===void 0?(e.transformer=await $({message:"Pick a transformer",options:[{label:"esbuild",value:"esbuild"},{label:"swc",value:"swc"},{label:"Sucrase",value:"sucrase"},{label:"OXC",value:"oxc"}]}),e.transformer&&e.transformer!=="oxc"&&!d.includes(e.transformer)&&await w({message:`Do you want to install ${e.transformer}?`})&&y.push(e.transformer==="swc"?"@swc/core":e.transformer)):G.message(`Transformer ${e.transformer} is already installed.`),e.isolatedDeclarationTransformer===void 0&&(e.isolatedDeclarationTransformer=await w({message:"Do you want to use an isolated declaration types?",initialValue:!1})),e.isolatedDeclarationTransformer===void 0&&(e.isolatedDeclarationTransformer=await $({message:"Pick a isolated declaration transformer",options:[{label:"Typescript",value:"typescript"},{label:"swc",value:"swc"},{label:"OXC",value:"oxc"},{label:"None",value:void 0}]}),e.isolatedDeclarationTransformer!==void 0)){let c;switch(e.isolatedDeclarationTransformer){case"oxc":{c="oxc-transform";break}case"swc":{c="@swc/core";break}case"typescript":{c="typescript";break}default:te("Invalid isolated declaration transformer")}c!==void 0&&!d.includes(c)&&await w({message:`Do you want to install ${c}?`})&&y.push(c)}e.css===void 0&&(e.css=await w({message:"Do you want to use css in your project?",initialValue:!1}));const o=[];if(e.css){const c=await $({message:"Pick a css loader",options:[{label:"PostCSS",value:"postcss"},{hint:"experimental",label:"Lightning CSS",value:"lightningcss"}]});o.push(c);let a=await F({message:"Pick your loaders",options:[{label:"Sass",value:"sass"},{label:"Stylus",value:"stylus"},{label:"Less",value:"less"}],required:!1});if(a.includes("sass")){const g=await $({message:"Pick a sass loader",options:[{label:"Sass embedded",value:"sass-embedded",hint:"recommended"},{label:"Sass",value:"sass"},{label:"Node Sass",value:"node-sass",hint:"legacy"}]});g!=="sass"&&(a=a.filter(m=>m!=="sass"),a.push(g))}if(o.push(...a),await w({message:`Do you want to install "${o.join('", "')}"?`}))for(const g of o)y.push(...X[g]);o.push("sourceMap")}e.cssMinifier===void 0&&(e.cssMinifier=await w({message:"Do you want to minify your css?",initialValue:!1}));let u;e.cssMinifier&&(u=await $({message:"Pick a css minifier",options:[{label:"CSSNano",value:"cssnano"},{label:"Lightning CSS",value:"lightningcss"}]}),o.includes("lightningcss")||await w({message:`Do you want to install "${u}"?`})&&y.push(u));let p="",l="";if(e.isolatedDeclarationTransformer&&(l+=`,
|
|
29
|
+
isolatedDeclarationTransformer`),(e.css||e.cssMinifier)&&(l+=`,
|
|
30
|
+
rollup: {
|
|
31
|
+
css: {`),e.css){const c=o.map(a=>((a==="sass-embedded"||a==="node-sass")&&(a="sass"),`${a}Loader`)).join(", ");l+=`
|
|
32
|
+
loaders: [${c}],`}if(e.cssMinifier&&u&&(l+=`
|
|
33
|
+
minifier: ${u}Minifier,`),(e.css||e.cssMinifier)&&(l+=`
|
|
34
|
+
}
|
|
35
|
+
}`),f||i.type==="module"){let c="";if(e.isolatedDeclarationTransformer&&(c+=`import isolatedDeclarationTransformer from "@visulima/packem/dts/isolated/transformer/${e.isolatedDeclarationTransformer}";
|
|
36
|
+
`),e.css)for(let a of o)(a==="sass-embedded"||a==="node-sass")&&(a="sass"),c+=`import ${a}Loader from "@visulima/packem/css/loader/${a.toLowerCase()}";
|
|
37
|
+
`;e.cssMinifier&&u&&(c+=`import ${u}Minifier from "@visulima/packem/css/minifier/${u.toLowerCase()}";
|
|
38
|
+
`),p=`import { defineConfig } from "@visulima/packem/config";
|
|
39
|
+
import transformer from "@visulima/packem/transformer/${e.transformer}";
|
|
40
|
+
${c}
|
|
41
|
+
export default defineConfig({
|
|
42
|
+
runtime: "${e.runtime}",
|
|
43
|
+
transformer${l}
|
|
44
|
+
});
|
|
45
|
+
`}else{let c="";if(e.isolatedDeclarationTransformer&&(c+=`const isolatedDeclarationTransformer = require("@visulima/packem/dts/isolated/transformer/${e.isolatedDeclarationTransformer}");
|
|
46
|
+
`),e.css)for(let a of o)(a==="sass-embedded"||a==="node-sass")&&(a="sass"),c+=`const ${a}Loader = require("@visulima/packem/css/loader/${a.toLowerCase()}");
|
|
47
|
+
`;e.cssMinifier&&u&&(c+=`const ${u}Minifier = require("@visulima/packem/css/minifier/${u.toLowerCase()}");
|
|
48
|
+
`),p=`const { defineConfig } = require("@visulima/packem/config");
|
|
49
|
+
const transformer = require("@visulima/packem/transformer/${e.transformer}");
|
|
50
|
+
${c}
|
|
51
|
+
module.exports = defineConfig({
|
|
52
|
+
runtime: ${e.runtime},
|
|
53
|
+
transformer${l}
|
|
54
|
+
});
|
|
55
|
+
`}const b=K(),v=f?"ts":"js";y.length>0&&(b.start("Installing packages"),await N(y,{cwd:r,dev:!0,silent:!0}),b.stop("Installed packages")),b.start(`Creating packem.config.${v}`),ce(x(r,`packem.config.${v}`),p),b.stop(`Created packem.config.${v}`),oe("Now you can run `packem build` to build your project")},"execute"),name:"init",options:[{defaultValue:".",description:"The directory to initialize",name:"dir",type:String},{description:"Choose a transformer",name:"transformer",type:D(t=>{if(typeof t=="string"&&["esbuild","sucrase","swc"].includes(t))return t;throw new Error("Invalid transformer, please choose one of 'swc', 'sucrase' or 'esbuild'")},"type")},{description:"Choose a isolated declaration transformer",name:"isolated-declaration-transformer",type:D(t=>{if(typeof t=="string"&&["none","oxc","swc","typescript"].includes(t))return t;throw new Error("Invalid isolated declaration isolated declaration, please choose one of 'none', 'oxc', 'swc' or 'typescript'")},"type")},{description:"Use CSS",name:"css",type:Boolean},{description:"Use CSS minifier",name:"css-minifier",type:Boolean},{Description:"Use TypeScript",name:"typescript",type:Boolean},{description:"Specify the build runtime (nodejs, browser).",name:"runtime",type:D(t=>{if(t==="node"||t==="browser")return t;throw new Error("Invalid runtime. Use 'node' or 'browser'.")},"type")}]})},"createInitCommand");try{require("node:module")?.enableCompileCache?.()||require("v8-compile-cache")}catch{}const B=new Q("packem",{logger:{reporters:[new Z({error:{hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0}})],scope:"packem"},packageName:Se,packageVersion:xe});_e(B);Fe(B);Pe(B);B.run({shouldExitProcess:!1});
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { B as BuildConfig,
|
|
2
|
-
export {
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
1
|
+
import { B as BuildConfig, c as BuildConfigFunction, d as BuildPreset } from '../packem_shared/types-5psa8MJc.js';
|
|
2
|
+
export { d as BuildHooks } from '../packem_shared/index-zrs6Po_w.js';
|
|
3
|
+
import '@visulima/rollup-plugin-css';
|
|
4
|
+
import 'jiti';
|
|
5
|
+
import 'typedoc';
|
|
6
6
|
import '@rollup/plugin-alias';
|
|
7
7
|
import '@rollup/plugin-commonjs';
|
|
8
8
|
import '@rollup/plugin-json';
|
|
9
9
|
import '@rollup/plugin-node-resolve';
|
|
10
10
|
import '@rollup/plugin-replace';
|
|
11
11
|
import '@rollup/plugin-wasm';
|
|
12
|
+
import '@rollup/pluginutils';
|
|
13
|
+
import 'rollup';
|
|
12
14
|
import 'rollup-plugin-dts';
|
|
13
15
|
import 'rollup-plugin-polyfill-node';
|
|
14
16
|
import 'rollup-plugin-pure';
|
|
15
17
|
import 'rollup-plugin-visualizer';
|
|
16
18
|
import 'esbuild';
|
|
19
|
+
import '@visulima/package';
|
|
20
|
+
import '@visulima/colorize';
|
|
17
21
|
import 'oxc-resolver';
|
|
18
22
|
import 'oxc-transform';
|
|
19
23
|
import 'sucrase';
|
|
20
|
-
import '@visulima/package';
|
|
21
|
-
import '@visulima/colorize';
|
|
22
|
-
import '@visulima/rollup-css-plugin';
|
|
23
|
-
import 'jiti';
|
|
24
|
-
import 'typedoc';
|
|
25
24
|
|
|
26
25
|
declare const defineConfig: (config: BuildConfig | BuildConfigFunction) => BuildConfig | BuildConfigFunction;
|
|
27
26
|
declare const definePreset: (preset: BuildPreset) => BuildPreset;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { ConstructorOptions } from '@visulima/pail';
|
|
2
|
-
import { B as BuildConfig
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import '@visulima/
|
|
7
|
-
import 'rollup';
|
|
8
|
-
import '@visulima/rollup-css-plugin';
|
|
2
|
+
import { B as BuildConfig } from './packem_shared/types-5psa8MJc.js';
|
|
3
|
+
export { a as BuildEntry, b as BuildOptions, R as RollupBuildOptions } from './packem_shared/types-5psa8MJc.js';
|
|
4
|
+
import { E as Environment, M as Mode } from './packem_shared/index-zrs6Po_w.js';
|
|
5
|
+
export { B as BuildContext, b as BuildContextBuildAssetAndChunk, c as BuildContextBuildEntry, d as BuildHooks, I as IsolatedDeclarationsTransformer, R as Runtime, T as TransformerFn, a as TransformerName } from './packem_shared/index-zrs6Po_w.js';
|
|
6
|
+
import '@visulima/rollup-plugin-css';
|
|
9
7
|
import 'jiti';
|
|
10
8
|
import 'typedoc';
|
|
11
|
-
import '@rollup/pluginutils';
|
|
12
9
|
import '@rollup/plugin-alias';
|
|
13
10
|
import '@rollup/plugin-commonjs';
|
|
14
11
|
import '@rollup/plugin-json';
|
|
15
12
|
import '@rollup/plugin-node-resolve';
|
|
16
13
|
import '@rollup/plugin-replace';
|
|
17
14
|
import '@rollup/plugin-wasm';
|
|
15
|
+
import '@rollup/pluginutils';
|
|
16
|
+
import 'rollup';
|
|
18
17
|
import 'rollup-plugin-dts';
|
|
19
18
|
import 'rollup-plugin-polyfill-node';
|
|
20
19
|
import 'rollup-plugin-pure';
|
|
21
20
|
import 'rollup-plugin-visualizer';
|
|
22
21
|
import 'esbuild';
|
|
22
|
+
import '@visulima/package';
|
|
23
|
+
import '@visulima/colorize';
|
|
23
24
|
import 'oxc-resolver';
|
|
24
25
|
import 'oxc-transform';
|
|
25
26
|
import 'sucrase';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var o=(e,r)=>c(e,"name",{value:r,configurable:!0});import{createPail as s}from"@visulima/pail";import{SimpleReporter as u}from"@visulima/pail/reporter";import{b as g}from"./packem_shared/index-CFFENGTN.js";var f=Object.defineProperty,l=o((e,r)=>f(e,"name",{value:r,configurable:!0}),"r");const C=l(async(e,r={})=>{const{debug:t,environment:i,logger:a,mode:n,tsconfigPath:m,...d}={debug:!1,environment:"production",logger:{},mode:"build",tsconfigPath:void 0,...r},p=s({reporters:[new u({error:{hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0}})],scope:"packem",...a});await g(e,n,i,p,t,d,m)},"packem");export{C as packem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as a}from"./isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.js";import{t as e}from"./swcPlugin-Boip4lWG-CwJ-HVJc.js";export{a as isolatedDeclarationsSwcTransformer,e as swcPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.defineProperty;var n=(e,r)=>m(e,"name",{value:r,configurable:!0});import{createFilter as f}from"@rollup/pluginutils";import{f as l}from"./index-CUp9WuCG.js";import{transform as p}from"sucrase";var d=Object.defineProperty,v=n((e,r)=>d(e,"name",{value:r,configurable:!0}),"n"),b=Object.defineProperty,P=v((e,r)=>b(e,"name",{value:r,configurable:!0}),"a"),g=Object.defineProperty,y=P((e,r)=>g(e,"name",{value:r,configurable:!0}),"n");const o=y(({exclude:e,include:r,...t})=>{const c=f(r,e??l);return{name:"packem:sucrase",async transform(u,a){if(!c(a))return;const{code:s,sourceMap:i}=p(u,{...t,filePath:a,sourceMapOptions:{compiledFilename:a}});return{code:s,map:i}}}},"sucraseTransformPlugin");o.NAME="sucrase";const F=o;export{F as sucrasePlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a}from"./isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.js";import{z as s}from"./oxcResolvePlugin-BJpi-eSG-BsYx9cDO.js";import{n as x}from"./oxcTransformPlugin-DfVQouIB-Cpfv95eA.js";export{a as isolatedDeclarationsOxcTransformer,s as oxcResolvePlugin,x as oxcTransformPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./browserslistToEsbuild-C0IWmbNe-C6xPL1oW.js";import{z as e}from"./esbuildPlugin-CXr7ud3R-CwR2FCHj.js";export{r as browserslistToEsbuild,e as esbuildPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as r}from"./isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js";import{B as o,B as p,N as t,D as a,i as c}from"./resolveTypescriptMjsCtsPlugin-DcZrZTmM-BEkYWTsH.js";export{r as isolatedDeclarationsTypescriptTransformer,o as patchTypescriptTypes,p as patchTypescriptTypesPlugin,t as resolveTsconfigPathsPlugin,a as resolveTsconfigRootDirectoriesPlugin,c as resolveTypescriptMjsCtsPlugin};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var x=Object.defineProperty;var v=(e,r)=>x(e,"name",{value:r,configurable:!0});import{createFilter as O}from"@rollup/pluginutils";import{a as k}from"./index-CUp9WuCG.js";import{extname as M,join as P}from"@visulima/path";import{transform as y,formatMessages as E,build as $}from"esbuild";import{findCacheDirSync as A}from"@visulima/find-cache-dir";import{readFileSync as S}from"@visulima/fs";import*as W from"rs-module-lexer";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
+
var C=Object.defineProperty,F=v((e,r)=>C(e,"name",{value:r,configurable:!0}),"h"),I=Object.defineProperty,f=F((e,r)=>I(e,"name",{value:r,configurable:!0}),"u"),R=Object.defineProperty,q=f((e,r)=>R(e,"name",{value:r,configurable:!0}),"n$1");const w=q(async(e,r)=>{r.length>0&&(await E(r,{color:!0,kind:"warning"})).forEach(s=>e.warn(s))},"warn");var L=Object.defineProperty,D=f((e,r)=>L(e,"name",{value:r,configurable:!0}),"t");const N=D(e=>{if(e==="es")return"esm";if(e==="cjs")return e},"getEsbuildFormat"),T=D(({sourceMap:e=!0,...r})=>async function(s,n,i){if(r.minify||r.minifyWhitespace||r.minifyIdentifiers||r.minifySyntax){const t=N(i.format),c=await y(s,{format:t,loader:"js",sourcemap:e,...r});if(await w(this,c.warnings),c.code)return{code:c.code,map:c.map||void 0}}},"getRenderChunk");var B=Object.defineProperty,j=f((e,r)=>B(e,"name",{value:r,configurable:!0}),"n");const h=j(e=>e.replaceAll("\\","/"),"slash"),G=j(async e=>{const r=A("@visulima/packem/optimize-deps",{create:!0,cwd:e.cwd});if(!r)throw new Error('[packem:optimize-deps]: failed to find or create cache directory "node_modules/.cache/packem/optimize_deps".');await $({absWorkingDir:e.cwd,bundle:!0,entryPoints:e.include,format:"esm",ignoreAnnotations:!0,metafile:!0,outdir:r,sourcemap:e.sourceMap,splitting:!0,...e.esbuildOptions,plugins:[{name:"optimize-deps",async setup(n){n.onResolve({filter:/.*/},async i=>{if(e.exclude?.includes(i.path))return{external:!0};if(!i.pluginData?.__resolving_dep_path__&&e.include.includes(i.path)){const t=await n.resolve(i.path,{kind:"import-statement",pluginData:{__resolving_dep_path__:!0},resolveDir:i.resolveDir});return t.errors.length>0||t.warnings.length>0?t:{namespace:"optimize-deps",path:i.path,pluginData:{absolute:t.path,resolveDir:i.resolveDir}}}}),n.onLoad({filter:/.*/,namespace:"optimize-deps"},async i=>{const{absolute:t,resolveDir:c}=i.pluginData,p=S(t),{output:g}=await W.parseAsync({input:[{code:p,filename:t}]});return{contents:(g[0]?.exports??[]).length>0?`export * from '${h(t)}'`:`module.exports = require('${h(t)}')`,resolveDir:c}})}},...e.esbuildOptions?.plugins??[]]});const s=new Map;for(const n of e.include)s.set(n,{file:P(r,`${n}.js`)});return{cacheDir:r,optimized:s}},"optimizeDeps");var U=Object.defineProperty,H=f((e,r)=>U(e,"name",{value:r,configurable:!0}),"g");const J=H(({exclude:e,include:r,loaders:s,logger:n,optimizeDeps:i,sourceMap:t,...c})=>{const p=k;if(s!==void 0)for(let[o,a]of Object.entries(s)){const l=o.startsWith(".")?o:`.${o}`;typeof a=="string"?p[l]=a:a||delete p[l]}const g=Object.keys(p),z=new RegExp(`\\.(${g.map(o=>o.slice(1)).join("|")})$`),_=O(r??z,e);let u,b=process.cwd();return{async buildStart(){!i||u||(u=await G({cwd:b,sourceMap:t??!1,...i}),n.debug("optimized %O",u.optimized))},name:"packem:esbuild",options({context:o}){o&&(b=o)},renderChunk:T({...c,sourceMap:t}),async resolveId(o){if(u?.optimized.has(o)){const a=u.optimized.get(o);if(a)return n.debug("resolved %s to %s",o,a.file),a.file}},async transform(o,a){if(!_(a)||u?.optimized.has(a))return;const l=M(a),d=p[l];if(n.debug("transforming %s with %s loader",a,d),!d)return;const m=await y(o,{format:["base64","binary","dataurl","text","json"].includes(d)?"esm":void 0,loader:d,sourcefile:a.replace(/\.[cm]ts/,".ts"),sourcemap:t,...c});if(await w(this,m.warnings),m.code)return{code:m.code,map:m.map||void 0}}}},"esbuildTransformer");J.NAME="esbuild";export{J as z};
|