ci: Validate templates using tarball to avoid version conflicts within the wxt/node_modules directory

This commit is contained in:
Aaron Klinker
2023-08-13 08:25:13 -05:00
committed by Aaron
parent ef140dc7f8
commit edfa075030
2 changed files with 15 additions and 6 deletions
+8 -5
View File
@@ -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
View File
@@ -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();