ci: Validate templates using tarball to avoid version conflicts within the wxt/node_modules directory
This commit is contained in:
@@ -72,11 +72,14 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Local Tarball
|
||||
run: pnpm pack
|
||||
|
||||
- name: Validate Vanilla
|
||||
working-directory: templates/vanilla
|
||||
run: |
|
||||
npm i
|
||||
npm i ../../
|
||||
npm i -D ../../wxt-*.tgz
|
||||
npm ls vite
|
||||
npm run build
|
||||
npm run compile
|
||||
@@ -85,7 +88,7 @@ jobs:
|
||||
working-directory: templates/vue
|
||||
run: |
|
||||
npm i
|
||||
npm i ../../
|
||||
npm i -D ../../wxt-*.tgz
|
||||
npm ls vite
|
||||
npm run build
|
||||
npm run compile
|
||||
@@ -94,7 +97,7 @@ jobs:
|
||||
working-directory: templates/react
|
||||
run: |
|
||||
npm i
|
||||
npm i ../../
|
||||
npm i -D ../../wxt-*.tgz
|
||||
npm ls vite
|
||||
npm run build
|
||||
npm run compile
|
||||
@@ -103,7 +106,7 @@ jobs:
|
||||
working-directory: templates/svelte
|
||||
run: |
|
||||
npm i
|
||||
npm i ../../
|
||||
npm i -D ../../wxt-*.tgz
|
||||
npm ls vite
|
||||
npm run build
|
||||
npm run check
|
||||
@@ -112,7 +115,7 @@ jobs:
|
||||
working-directory: templates/solid
|
||||
run: |
|
||||
npm i
|
||||
npm i ../../
|
||||
npm i -D ../../wxt-*.tgz
|
||||
npm ls vite
|
||||
npm run build
|
||||
npm run compile
|
||||
|
||||
+7
-1
@@ -23,12 +23,14 @@ await Promise.all([
|
||||
sourcemap: true,
|
||||
dts: true,
|
||||
silent: true,
|
||||
external: ['vite'],
|
||||
}),
|
||||
tsup.build({
|
||||
entry: { cli: 'src/cli/index.ts' },
|
||||
format: ['cjs'],
|
||||
sourcemap: 'inline',
|
||||
silent: true,
|
||||
external: ['vite'],
|
||||
}),
|
||||
tsup.build({
|
||||
entry: { client: 'src/client/index.ts' },
|
||||
@@ -36,6 +38,7 @@ await Promise.all([
|
||||
sourcemap: 'inline',
|
||||
dts: true,
|
||||
silent: true,
|
||||
external: ['vite'],
|
||||
}),
|
||||
tsup.build({
|
||||
entry: { browser: 'src/client/browser.ts' },
|
||||
@@ -43,6 +46,7 @@ await Promise.all([
|
||||
sourcemap: 'inline',
|
||||
dts: true,
|
||||
silent: true,
|
||||
external: ['vite'],
|
||||
}),
|
||||
...virtualEntrypoints.map((entryName) =>
|
||||
tsup.build({
|
||||
@@ -52,7 +56,7 @@ await Promise.all([
|
||||
format: ['esm'],
|
||||
sourcemap: true,
|
||||
silent: true,
|
||||
external: [`virtual:user-${entryName}`],
|
||||
external: [`virtual:user-${entryName}`, 'vite'],
|
||||
}),
|
||||
),
|
||||
tsup.build({
|
||||
@@ -62,6 +66,7 @@ await Promise.all([
|
||||
format: ['esm'],
|
||||
sourcemap: true,
|
||||
silent: true,
|
||||
external: ['vite'],
|
||||
}),
|
||||
tsup.build({
|
||||
entry: {
|
||||
@@ -69,6 +74,7 @@ await Promise.all([
|
||||
},
|
||||
format: ['esm', 'cjs'],
|
||||
silent: true,
|
||||
external: ['vite'],
|
||||
}),
|
||||
]).catch((err) => {
|
||||
spinner.fail();
|
||||
|
||||
Reference in New Issue
Block a user