@ryanatkn/gro 0.149.1 → 0.149.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild_plugin_sveltekit_shim_alias.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/esbuild_plugin_sveltekit_shim_alias.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AAIxC,MAAM,WAAW,2CAA2C;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,mCAAmC,GAAI,iBAGjD,2CAA2C,KAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"esbuild_plugin_sveltekit_shim_alias.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/esbuild_plugin_sveltekit_shim_alias.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AAIxC,MAAM,WAAW,2CAA2C;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,mCAAmC,GAAI,iBAGjD,2CAA2C,KAAG,OAAO,CAAC,MAcvD,CAAC"}
|
|
@@ -4,11 +4,14 @@ export const esbuild_plugin_sveltekit_shim_alias = ({ dir = process.cwd(), alias
|
|
|
4
4
|
name: 'sveltekit_shim_alias',
|
|
5
5
|
setup: (build) => {
|
|
6
6
|
const aliases = { $lib: 'src/lib', ...alias };
|
|
7
|
-
|
|
8
|
-
const filter = new RegExp(
|
|
7
|
+
// Create a Go-compatible regexp
|
|
8
|
+
const filter = new RegExp(`^(?:${Object.keys(aliases).map(escape_regexp).join('|')})`);
|
|
9
9
|
build.onResolve({ filter }, async (args) => {
|
|
10
10
|
const { path, ...rest } = args;
|
|
11
|
-
|
|
11
|
+
// Find which alias prefix matches
|
|
12
|
+
const prefix = Object.keys(aliases).find((key) => path.startsWith(key));
|
|
13
|
+
if (!prefix)
|
|
14
|
+
return null;
|
|
12
15
|
return build.resolve(join(dir, aliases[prefix] + path.substring(prefix.length)), rest);
|
|
13
16
|
});
|
|
14
17
|
},
|
package/dist/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// generated by src/lib/package.gen.ts
|
|
2
2
|
export const package_json = {
|
|
3
3
|
name: '@ryanatkn/gro',
|
|
4
|
-
version: '0.149.
|
|
4
|
+
version: '0.149.2',
|
|
5
5
|
description: 'task runner and toolkit extending SvelteKit',
|
|
6
6
|
motto: 'generate, run, optimize',
|
|
7
7
|
glyph: '🌰',
|
|
@@ -263,7 +263,7 @@ export const package_json = {
|
|
|
263
263
|
};
|
|
264
264
|
export const src_json = {
|
|
265
265
|
name: '@ryanatkn/gro',
|
|
266
|
-
version: '0.149.
|
|
266
|
+
version: '0.149.2',
|
|
267
267
|
modules: {
|
|
268
268
|
'.': {
|
|
269
269
|
path: 'index.ts',
|
package/package.json
CHANGED
|
@@ -14,11 +14,13 @@ export const esbuild_plugin_sveltekit_shim_alias = ({
|
|
|
14
14
|
name: 'sveltekit_shim_alias',
|
|
15
15
|
setup: (build) => {
|
|
16
16
|
const aliases: Record<string, string> = {$lib: 'src/lib', ...alias};
|
|
17
|
-
|
|
18
|
-
const filter = new RegExp(
|
|
17
|
+
// Create a Go-compatible regexp
|
|
18
|
+
const filter = new RegExp(`^(?:${Object.keys(aliases).map(escape_regexp).join('|')})`);
|
|
19
19
|
build.onResolve({filter}, async (args) => {
|
|
20
20
|
const {path, ...rest} = args;
|
|
21
|
-
|
|
21
|
+
// Find which alias prefix matches
|
|
22
|
+
const prefix = Object.keys(aliases).find((key) => path.startsWith(key));
|
|
23
|
+
if (!prefix) return null;
|
|
22
24
|
return build.resolve(join(dir, aliases[prefix] + path.substring(prefix.length)), rest);
|
|
23
25
|
});
|
|
24
26
|
},
|
package/src/lib/package.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {Src_Json} from './src_json.js';
|
|
|
5
5
|
|
|
6
6
|
export const package_json = {
|
|
7
7
|
name: '@ryanatkn/gro',
|
|
8
|
-
version: '0.149.
|
|
8
|
+
version: '0.149.2',
|
|
9
9
|
description: 'task runner and toolkit extending SvelteKit',
|
|
10
10
|
motto: 'generate, run, optimize',
|
|
11
11
|
glyph: '🌰',
|
|
@@ -269,7 +269,7 @@ export const package_json = {
|
|
|
269
269
|
|
|
270
270
|
export const src_json = {
|
|
271
271
|
name: '@ryanatkn/gro',
|
|
272
|
-
version: '0.149.
|
|
272
|
+
version: '0.149.2',
|
|
273
273
|
modules: {
|
|
274
274
|
'.': {
|
|
275
275
|
path: 'index.ts',
|