= {
@@ -20,3 +20,9 @@ describe('getNameFromFilePath', () => {
expect(getNameFromFilePath(inComponentFilePath, options as ResolvedOptions)).toBe('a1-b2-c3-d4-ef-ghi')
})
})
+
+describe('escapeSpecialChars', () => {
+ it('should escape parentheses', () => {
+ expect(escapeSpecialChars('component()')).toBe('component\\(\\)')
+ })
+})
diff --git a/tsconfig.json b/tsconfig.json
index 85659df5..62c450c5 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,6 +8,7 @@
"resolveJsonModule": true,
"strict": true,
"strictNullChecks": true,
+ "noEmit": true,
"esModuleInterop": true,
"skipLibCheck": true
},
diff --git a/tsdown.config.ts b/tsdown.config.ts
new file mode 100644
index 00000000..2cf55521
--- /dev/null
+++ b/tsdown.config.ts
@@ -0,0 +1,6 @@
+import { defineConfig } from 'tsdown'
+
+export default defineConfig({
+ entry: ['src/*.ts'],
+ format: ['esm', 'cjs'],
+})
diff --git a/tsup.config.ts b/tsup.config.ts
deleted file mode 100644
index 674d9e4d..00000000
--- a/tsup.config.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { Options } from 'tsup'
-
-export const tsup: Options = {
- entry: [
- 'src/*.ts',
- ],
- format: ['cjs', 'esm'],
- dts: true,
- splitting: true,
- clean: true,
- shims: false,
-}
diff --git a/vitest.config.ts b/vitest.config.ts
index 637aa94f..93c91c41 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -2,10 +2,12 @@ import { defineConfig } from 'vite'
export default defineConfig({
test: {
- deps: {
- inline: [
- '@babel/types',
- ],
+ server: {
+ deps: {
+ inline: [
+ '@babel/types',
+ ],
+ },
},
},
})
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy