@visulima/packem-rollup 1.0.0-alpha.15 → 1.0.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## @visulima/packem-rollup [1.0.0-alpha.16](https://github.com/visulima/packem/compare/@visulima/packem-rollup@1.0.0-alpha.15...@visulima/packem-rollup@1.0.0-alpha.16) (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-share:** upgraded to 1.0.0-alpha.12
|
|
11
|
+
|
|
1
12
|
## @visulima/packem-rollup [1.0.0-alpha.15](https://github.com/visulima/packem/compare/@visulima/packem-rollup@1.0.0-alpha.14...@visulima/packem-rollup@1.0.0-alpha.15) (2025-09-17)
|
|
2
13
|
|
|
3
14
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -49,9 +49,7 @@ The `dataUriPlugin` converts files to data URIs for inline embedding. It support
|
|
|
49
49
|
import { dataUriPlugin } from "@visulima/packem-rollup";
|
|
50
50
|
|
|
51
51
|
export default {
|
|
52
|
-
|
|
53
|
-
dataUriPlugin()
|
|
54
|
-
]
|
|
52
|
+
plugins: [dataUriPlugin()],
|
|
55
53
|
};
|
|
56
54
|
```
|
|
57
55
|
|
|
@@ -66,16 +64,16 @@ export default {
|
|
|
66
64
|
|
|
67
65
|
```typescript
|
|
68
66
|
// Tiny SVG encoding (default)
|
|
69
|
-
import icon from
|
|
67
|
+
import icon from "./icon.svg?data-uri";
|
|
70
68
|
|
|
71
69
|
// CSS-optimized SVG encoding
|
|
72
|
-
import icon from
|
|
70
|
+
import icon from "./icon.svg?data-uri&encoding=css";
|
|
73
71
|
|
|
74
72
|
// Tiny SVG with srcset compatibility
|
|
75
|
-
import icon from
|
|
73
|
+
import icon from "./icon.svg?data-uri&srcset";
|
|
76
74
|
|
|
77
75
|
// CSS encoding with srcset compatibility
|
|
78
|
-
import icon from
|
|
76
|
+
import icon from "./icon.svg?data-uri&encoding=css&srcset";
|
|
79
77
|
```
|
|
80
78
|
|
|
81
79
|
### Lazy Barrel Plugin
|
|
@@ -86,14 +84,14 @@ The `lazyBarrelPlugin` implements lazy barrel optimization similar to Rspack's `
|
|
|
86
84
|
import { lazyBarrelPlugin } from "@visulima/packem-rollup";
|
|
87
85
|
|
|
88
86
|
export default {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
plugins: [
|
|
88
|
+
lazyBarrelPlugin({
|
|
89
|
+
sideEffectsCheck: true,
|
|
90
|
+
lazyThreshold: 2,
|
|
91
|
+
include: [/\.ts$/, /\.js$/],
|
|
92
|
+
exclude: [/\.test\.ts$/],
|
|
93
|
+
}),
|
|
94
|
+
],
|
|
97
95
|
};
|
|
98
96
|
```
|
|
99
97
|
|
|
@@ -121,12 +119,12 @@ The `urlPlugin` handles asset URLs, either inlining them as data URIs or copying
|
|
|
121
119
|
import { urlPlugin } from "@visulima/packem-rollup";
|
|
122
120
|
|
|
123
121
|
export default {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
plugins: [
|
|
123
|
+
urlPlugin({
|
|
124
|
+
limit: 14336, // 14kb
|
|
125
|
+
fileName: "[hash][extname]",
|
|
126
|
+
}),
|
|
127
|
+
],
|
|
130
128
|
};
|
|
131
129
|
```
|
|
132
130
|
|
|
@@ -145,8 +143,8 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
145
143
|
|
|
146
144
|
## Credits
|
|
147
145
|
|
|
148
|
-
-
|
|
149
|
-
-
|
|
146
|
+
- [Daniel Bannert](https://github.com/prisis)
|
|
147
|
+
- [All Contributors](https://github.com/visulima/packem/graphs/contributors)
|
|
150
148
|
|
|
151
149
|
## License
|
|
152
150
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var b=Object.defineProperty;var d=(t,e)=>b(t,"name",{value:e,configurable:!0});import{isAbsolute as k,join as P,dirname as O,resolve as $}from"@visulima/path";import{isRelative as y}from"@visulima/path/utils";var j=Object.defineProperty,o=d((t,e)=>j(t,"name",{value:e,configurable:!0}),"
|
|
1
|
+
var b=Object.defineProperty;var d=(t,e)=>b(t,"name",{value:e,configurable:!0});import{isAbsolute as k,join as P,dirname as O,resolve as $}from"@visulima/path";import{isRelative as y}from"@visulima/path/utils";var j=Object.defineProperty,o=d((t,e)=>j(t,"name",{value:e,configurable:!0}),"a");const S=42,U=o(t=>{let e=!1;for(let s=0;s<t.length;s++)if(t.codePointAt(s)===S){if(e)return!1;e=!0}return!0},"hasZeroOrOneAsteriskCharacter"),W=o(t=>{const e=t.indexOf("*");return e===-1?void 0:{prefix:t.slice(0,e),suffix:t.slice(e+1)}},"tryParsePattern"),A=o(({prefix:t,suffix:e},s)=>s.length>=t.length+e.length&&s.startsWith(t)&&s.endsWith(e),"isPatternMatch"),T=o((t,e,s)=>{let i,r=-1;for(const f of t){const a=e(f);A(a,s)&&a.prefix.length>r&&(r=a.prefix.length,i=f)}return i},"findBestPatternMatch"),B=o((t,e)=>{const s=[];for(const i of t){if(!U(i))continue;const r=W(i);if(r)s.push(r);else if(i===e)return i}return T(s,i=>i,e)},"matchPatternOrExact"),q=o((t,e)=>e.substring(t.prefix.length,e.length-t.suffix.length),"matchedText"),R=o(({prefix:t,suffix:e})=>`${t}*${e}`,"patternText"),w=o((t,e,s)=>{let i=O(e.path);e.config.compilerOptions?.baseUrl&&(i=$(t,e.config.compilerOptions.baseUrl)),s?.debug({message:`Resolved baseUrl to ${i}`,prefix:"plugin:packem:resolve-tsconfig-paths"});const r=e.config.compilerOptions?.paths??{};return Object.keys(r).length===0&&s?.debug({message:"No paths found in tsconfig.json",prefix:"plugin:packem:resolve-tsconfig-paths"}),{paths:r,resolvedBaseUrl:i}},"getTsconfigPaths"),C=o((t,e,s,i)=>{const{paths:r,resolvedBaseUrl:f}=w(t,e,s),a=Object.keys(r);return{name:"packem:resolve-tsconfig-paths",async resolveId(n,m,v){if(a.length===0)return;if(n.includes("\0")){s.debug({message:`Skipping resolution of ${n} as it is a virtual module`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}if(n.includes("node_modules")){s.debug({message:`Skipping request as it is inside node_modules ${n}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}if(!i.resolveAbsolutePath&&k(n)){s.debug({message:`Skipping request as it is an absolute path ${n}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}if(y(n)){s.debug({message:`Skipping request as it is a relative path ${n}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}const l=B(a,n);if(!l){s.debug({message:`moduleName did not match any paths pattern ${n}`,prefix:"plugin:packem:resolve-tsconfig-paths"});return}const u=typeof l=="string"?void 0:q(l,n),x=typeof l=="string"?l:R(l);for await(const g of r[x]){const p=u?g.replace("*",u):g;if(p.endsWith(".d.ts")||p.endsWith(".d.cts")||p.endsWith(".d.mts"))continue;const h=P(f,p);try{const c=await this.resolve(h,m,{skipSelf:!0,...v});if(c)return c}catch(c){s.debug({context:[c],message:`Failed to resolve ${h} from ${n}`,prefix:"plugin:packem:resolve-tsconfig-paths"})}}}}},"resolveTsconfigPathsPlugin");export{C as resolveTsconfigPathsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as s}from"../../packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo.mjs";import{patchTypescriptTypes as o,patchTypescriptTypes as p}from"../../packem_shared/patchTypescriptTypes-BEdkvKxL.mjs";import{resolveTsconfigPathsPlugin as i}from"../../packem_shared/resolveTsconfigPathsPlugin-
|
|
1
|
+
import{default as s}from"../../packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo.mjs";import{patchTypescriptTypes as o,patchTypescriptTypes as p}from"../../packem_shared/patchTypescriptTypes-BEdkvKxL.mjs";import{resolveTsconfigPathsPlugin as i}from"../../packem_shared/resolveTsconfigPathsPlugin-wQWtmSdv.mjs";import{default as l}from"../../packem_shared/resolveTsconfigRootDirectoriesPlugin-_93afm2q.mjs";import{default as T}from"../../packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM.mjs";export{s as isolatedDeclarationsTypescriptTransformer,o as patchTypescriptTypes,p as patchTypescriptTypesPlugin,i as resolveTsconfigPathsPlugin,l as resolveTsconfigRootDirectoriesPlugin,T as resolveTypescriptMjsCtsPlugin};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/packem-rollup",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.16",
|
|
4
4
|
"description": "Rollup plugins for packem",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visulima",
|
|
@@ -75,23 +75,23 @@
|
|
|
75
75
|
"@rollup/plugin-replace": "6.0.2",
|
|
76
76
|
"@rollup/plugin-wasm": "6.2.2",
|
|
77
77
|
"@rollup/pluginutils": "5.3.0",
|
|
78
|
-
"@visulima/find-cache-dir": "1.0.
|
|
79
|
-
"@visulima/fs": "3.1.
|
|
80
|
-
"@visulima/package": "3.5.
|
|
81
|
-
"@visulima/packem-share": "1.0.0-alpha.
|
|
78
|
+
"@visulima/find-cache-dir": "1.0.34",
|
|
79
|
+
"@visulima/fs": "3.1.8",
|
|
80
|
+
"@visulima/package": "3.5.11",
|
|
81
|
+
"@visulima/packem-share": "1.0.0-alpha.12",
|
|
82
82
|
"@visulima/path": "1.4.0",
|
|
83
83
|
"@visulima/source-map": "1.0.20",
|
|
84
84
|
"glob-parent": "6.0.2",
|
|
85
85
|
"magic-string": "0.30.19",
|
|
86
86
|
"mlly": "1.8.0",
|
|
87
|
-
"oxc-parser": "0.
|
|
88
|
-
"oxc-resolver": "11.8.
|
|
87
|
+
"oxc-parser": "0.91.0",
|
|
88
|
+
"oxc-resolver": "11.8.2",
|
|
89
89
|
"rollup-plugin-dts": "6.2.3",
|
|
90
90
|
"rollup-plugin-license": "3.6.0",
|
|
91
91
|
"rollup-plugin-polyfill-node": "0.13.0",
|
|
92
92
|
"rollup-plugin-pure": "^0.4.0",
|
|
93
93
|
"rollup-plugin-visualizer": "6.0.3",
|
|
94
|
-
"rs-module-lexer": "^2.
|
|
94
|
+
"rs-module-lexer": "^2.6.0",
|
|
95
95
|
"semver": "7.7.2",
|
|
96
96
|
"tinyglobby": "0.2.15"
|
|
97
97
|
},
|