@web-remarq/unplugin 0.0.2 → 0.0.3
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/dist/{chunk-PRGGVU7P.cjs → chunk-LXJOI4H7.cjs} +5 -2
- package/dist/{chunk-CRVREGZW.js → chunk-XB3NQOJG.js} +5 -2
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.d.cts +1 -0
- package/dist/esbuild.d.ts +1 -0
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/rollup.cjs +2 -2
- package/dist/rollup.d.cts +1 -0
- package/dist/rollup.d.ts +1 -0
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.d.cts +1 -0
- package/dist/rspack.d.ts +1 -0
- package/dist/rspack.js +1 -1
- package/dist/vite.cjs +2 -2
- package/dist/vite.d.cts +1 -0
- package/dist/vite.d.ts +1 -0
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.d.cts +1 -0
- package/dist/webpack.d.ts +1 -0
- package/dist/webpack.js +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ function findComponentName(ast, jsxStart) {
|
|
|
15
15
|
}
|
|
16
16
|
if (node.type === "ExportDefaultDeclaration") {
|
|
17
17
|
const decl = node.declaration;
|
|
18
|
-
if (decl.type === "FunctionDeclaration" && decl.id && typeof decl.id.name === "string") {
|
|
18
|
+
if ((decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") && decl.id && typeof decl.id.name === "string") {
|
|
19
19
|
return decl.id.name;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -39,6 +39,9 @@ function findComponentName(ast, jsxStart) {
|
|
|
39
39
|
if (decl.type === "FunctionDeclaration" && decl.id && containsPosition(decl, jsxStart)) {
|
|
40
40
|
return decl.id.name;
|
|
41
41
|
}
|
|
42
|
+
if (decl.type === "ClassDeclaration" && decl.id && containsPosition(decl, jsxStart)) {
|
|
43
|
+
return decl.id.name;
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
if (node.type === "ClassDeclaration" && node.id && containsPosition(node, jsxStart)) {
|
|
44
47
|
return node.id.name;
|
|
@@ -162,7 +165,7 @@ var DEFAULT_INCLUDE = ["**/*.jsx", "**/*.tsx", "**/*.vue"];
|
|
|
162
165
|
var DEFAULT_EXCLUDE = ["node_modules/**"];
|
|
163
166
|
function createFilter(include, exclude) {
|
|
164
167
|
function toRegex(glob) {
|
|
165
|
-
const escaped = glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*/g, "\xA7GLOBSTAR\xA7").replace(/\*/g, "[^/]*").replace(/§GLOBSTAR§/g, ".*").replace(/\?/g, "[^/]");
|
|
168
|
+
const escaped = glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*/g, "\xA7GLOBSTAR\xA7").replace(/\*/g, "[^/]*").replace(/\/§GLOBSTAR§\//g, "\xA7OPTPATH\xA7").replace(/§GLOBSTAR§/g, ".*").replace(/\?/g, "[^/]").replace(/§OPTPATH§/g, "/(?:.*/)?");
|
|
166
169
|
return new RegExp(`(?:^|/)${escaped}$`);
|
|
167
170
|
}
|
|
168
171
|
const includePatterns = include.map(toRegex);
|
|
@@ -15,7 +15,7 @@ function findComponentName(ast, jsxStart) {
|
|
|
15
15
|
}
|
|
16
16
|
if (node.type === "ExportDefaultDeclaration") {
|
|
17
17
|
const decl = node.declaration;
|
|
18
|
-
if (decl.type === "FunctionDeclaration" && decl.id && typeof decl.id.name === "string") {
|
|
18
|
+
if ((decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") && decl.id && typeof decl.id.name === "string") {
|
|
19
19
|
return decl.id.name;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -39,6 +39,9 @@ function findComponentName(ast, jsxStart) {
|
|
|
39
39
|
if (decl.type === "FunctionDeclaration" && decl.id && containsPosition(decl, jsxStart)) {
|
|
40
40
|
return decl.id.name;
|
|
41
41
|
}
|
|
42
|
+
if (decl.type === "ClassDeclaration" && decl.id && containsPosition(decl, jsxStart)) {
|
|
43
|
+
return decl.id.name;
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
if (node.type === "ClassDeclaration" && node.id && containsPosition(node, jsxStart)) {
|
|
44
47
|
return node.id.name;
|
|
@@ -162,7 +165,7 @@ var DEFAULT_INCLUDE = ["**/*.jsx", "**/*.tsx", "**/*.vue"];
|
|
|
162
165
|
var DEFAULT_EXCLUDE = ["node_modules/**"];
|
|
163
166
|
function createFilter(include, exclude) {
|
|
164
167
|
function toRegex(glob) {
|
|
165
|
-
const escaped = glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*/g, "\xA7GLOBSTAR\xA7").replace(/\*/g, "[^/]*").replace(/§GLOBSTAR§/g, ".*").replace(/\?/g, "[^/]");
|
|
168
|
+
const escaped = glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*/g, "\xA7GLOBSTAR\xA7").replace(/\*/g, "[^/]*").replace(/\/§GLOBSTAR§\//g, "\xA7OPTPATH\xA7").replace(/§GLOBSTAR§/g, ".*").replace(/\?/g, "[^/]").replace(/§OPTPATH§/g, "/(?:.*/)?");
|
|
166
169
|
return new RegExp(`(?:^|/)${escaped}$`);
|
|
167
170
|
}
|
|
168
171
|
const includePatterns = include.map(toRegex);
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLXJOI4H7cjs = require('./chunk-LXJOI4H7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = _chunkLXJOI4H7cjs.esbuildPlugin;
|
package/dist/esbuild.d.cts
CHANGED
package/dist/esbuild.d.ts
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkLXJOI4H7cjs = require('./chunk-LXJOI4H7.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -13,4 +13,4 @@ var _chunkPRGGVU7Pcjs = require('./chunk-PRGGVU7P.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.default =
|
|
16
|
+
exports.default = _chunkLXJOI4H7cjs.index_default; exports.esbuildPlugin = _chunkLXJOI4H7cjs.esbuildPlugin; exports.rollupPlugin = _chunkLXJOI4H7cjs.rollupPlugin; exports.rspackPlugin = _chunkLXJOI4H7cjs.rspackPlugin; exports.vitePlugin = _chunkLXJOI4H7cjs.vitePlugin; exports.webpackPlugin = _chunkLXJOI4H7cjs.webpackPlugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
2
|
import * as rollup from 'rollup';
|
|
3
|
+
import * as vite from 'vite';
|
|
3
4
|
import * as _unplugin from 'unplugin';
|
|
4
5
|
|
|
5
6
|
interface Options {
|
|
@@ -12,7 +13,7 @@ interface Options {
|
|
|
12
13
|
}
|
|
13
14
|
declare const unplugin: _unplugin.UnpluginInstance<Options, boolean>;
|
|
14
15
|
|
|
15
|
-
declare const vitePlugin: (options: Options) => any;
|
|
16
|
+
declare const vitePlugin: (options: Options) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
16
17
|
declare const rollupPlugin: (options: Options) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
17
18
|
declare const webpackPlugin: (options: Options) => WebpackPluginInstance;
|
|
18
19
|
declare const esbuildPlugin: (options: Options) => esbuild.Plugin;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
2
|
import * as rollup from 'rollup';
|
|
3
|
+
import * as vite from 'vite';
|
|
3
4
|
import * as _unplugin from 'unplugin';
|
|
4
5
|
|
|
5
6
|
interface Options {
|
|
@@ -12,7 +13,7 @@ interface Options {
|
|
|
12
13
|
}
|
|
13
14
|
declare const unplugin: _unplugin.UnpluginInstance<Options, boolean>;
|
|
14
15
|
|
|
15
|
-
declare const vitePlugin: (options: Options) => any;
|
|
16
|
+
declare const vitePlugin: (options: Options) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
16
17
|
declare const rollupPlugin: (options: Options) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
17
18
|
declare const webpackPlugin: (options: Options) => WebpackPluginInstance;
|
|
18
19
|
declare const esbuildPlugin: (options: Options) => esbuild.Plugin;
|
package/dist/index.js
CHANGED
package/dist/rollup.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLXJOI4H7cjs = require('./chunk-LXJOI4H7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = _chunkLXJOI4H7cjs.rollupPlugin;
|
package/dist/rollup.d.cts
CHANGED
package/dist/rollup.d.ts
CHANGED
package/dist/rollup.js
CHANGED
package/dist/rspack.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLXJOI4H7cjs = require('./chunk-LXJOI4H7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = _chunkLXJOI4H7cjs.rspackPlugin;
|
package/dist/rspack.d.cts
CHANGED
package/dist/rspack.d.ts
CHANGED
package/dist/rspack.js
CHANGED
package/dist/vite.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLXJOI4H7cjs = require('./chunk-LXJOI4H7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = _chunkLXJOI4H7cjs.vitePlugin;
|
package/dist/vite.d.cts
CHANGED
package/dist/vite.d.ts
CHANGED
package/dist/vite.js
CHANGED
package/dist/webpack.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLXJOI4H7cjs = require('./chunk-LXJOI4H7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = _chunkLXJOI4H7cjs.webpackPlugin;
|
package/dist/webpack.d.cts
CHANGED
package/dist/webpack.d.ts
CHANGED
package/dist/webpack.js
CHANGED