Skip to content

Commit baf70ba

Browse files
fix: Rebranch Remix plugin to include Vite (#142)
Rebrand Remix plugin to be more explicit that it only supports Vite version of Remix.
1 parent a2e576f commit baf70ba

25 files changed

+11458
-5986
lines changed

.changeset/big-socks-impress.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
"@codecov/sveltekit-plugin": patch
3-
"@codecov/remix-plugin": patch
3+
"@codecov/remix-vite-plugin": patch
44
"@codecov/bundler-plugin-core": patch
55
"@codecov/nuxt-plugin": patch
66
"@codecov/rollup-plugin": patch

.changeset/shy-turtles-shout.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
"@codecov/sveltekit-plugin": patch
3-
"@codecov/remix-plugin": patch
3+
"@codecov/remix-vite-plugin": patch
44
"@codecov/bundler-plugin-core": patch
55
"@codecov/nuxt-plugin": patch
66
"@codecov/rollup-plugin": patch
77
"@codecov/vite-plugin": patch
88
"@codecov/webpack-plugin": patch
99
---
1010

11-
Add in new Remix plugin
11+
Add in new Remix Vite plugin

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const config = {
2828
"./integration-tests/tsconfig.json",
2929
"./packages/bundler-plugin-core/tsconfig.json",
3030
"./packages/nuxt-plugin/tsconfig.json",
31-
"./packages/remix-plugin/tsconfig.json",
31+
"./packages/remix-vite-plugin/tsconfig.json",
3232
"./packages/rollup-plugin/tsconfig.json",
3333
"./packages/sveltekit-plugin/tsconfig.json",
3434
"./packages/vite-plugin/tsconfig.json",

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ jobs:
423423
[
424424
"bundler-plugin-core",
425425
"nuxt-plugin",
426-
"remix-plugin",
426+
"remix-vite-plugin",
427427
"rollup-plugin",
428428
"sveltekit-plugin",
429429
"vite-plugin",
@@ -489,7 +489,7 @@ jobs:
489489
[
490490
"bundler-plugin-core",
491491
"nuxt-plugin",
492-
"remix-plugin",
492+
"remix-vite-plugin",
493493
"rollup-plugin",
494494
"sveltekit-plugin",
495495
"vite-plugin",

examples/remix/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"react-dom": "^18.2.0"
2020
},
2121
"devDependencies": {
22-
"@codecov/remix-plugin": "workspace:^",
22+
"@codecov/remix-vite-plugin": "workspace:^",
2323
"@remix-run/dev": "^2.9.2",
2424
"@types/react": "^18.2.20",
2525
"@types/react-dom": "^18.2.7",

examples/remix/vite.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { vitePlugin as remix } from "@remix-run/dev";
22
import { defineConfig } from "vite";
33
import tsconfigPaths from "vite-tsconfig-paths";
4-
import { codecovRemixPlugin } from "@codecov/remix-plugin";
4+
import { codecovRemixVitePlugin } from "@codecov/remix-vite-plugin";
55

66
export default defineConfig({
77
plugins: [
@@ -13,7 +13,7 @@ export default defineConfig({
1313
},
1414
}),
1515
tsconfigPaths(),
16-
codecovRemixPlugin({
16+
codecovRemixVitePlugin({
1717
enableBundleAnalysis: true,
1818
bundleName: "@codecov/example-remix-app",
1919
uploadToken: process.env.REMIX_UPLOAD_TOKEN,

integration-tests/fixtures/generate-bundle-stats/remix/__snapshots__/remix-plugin.test.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports[`Generating remix stats 2 {"format":"esm","expected":"esm"} matches the
1414
"modules": ExpectArrayContaining {},
1515
"outputPath": StringContaining "build",
1616
"plugin": {
17-
"name": StringMatching "@codecov/remix-plugin",
17+
"name": StringMatching "@codecov/remix-vite-plugin",
1818
"version": "0.0.1-beta.9",
1919
},
2020
"version": "1",
@@ -35,7 +35,7 @@ exports[`Generating remix stats 2 {"format":"esm","expected":"esm"} matches the
3535
"modules": ExpectArrayContaining {},
3636
"outputPath": StringContaining "build",
3737
"plugin": {
38-
"name": StringMatching "@codecov/remix-plugin",
38+
"name": StringMatching "@codecov/remix-vite-plugin",
3939
"version": "0.0.1-beta.9",
4040
},
4141
"version": "1",

integration-tests/fixtures/generate-bundle-stats/remix/remix-plugin.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe("Generating remix stats", () => {
6565
`test-remix-v${version}-client-${expected}`,
6666
),
6767
plugin: {
68-
name: expect.stringMatching("@codecov/remix-plugin"),
68+
name: expect.stringMatching("@codecov/remix-vite-plugin"),
6969
},
7070
assets: expect.arrayContaining([
7171
{
@@ -108,7 +108,7 @@ describe("Generating remix stats", () => {
108108
`test-remix-v${version}-server-${expected}`,
109109
),
110110
plugin: {
111-
name: expect.stringMatching("@codecov/remix-plugin"),
111+
name: expect.stringMatching("@codecov/remix-vite-plugin"),
112112
},
113113
assets: expect.arrayContaining([
114114
{

integration-tests/fixtures/generate-bundle-stats/remix/vite-base.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { vitePlugin as remix } from "@remix-run/dev";
22
import { defineConfig } from "viteV5";
33
import tsconfigPaths from "vite-tsconfig-paths";
4-
import { codecovRemixPlugin } from "@codecov/remix-plugin";
4+
import { codecovRemixVitePlugin } from "@codecov/remix-vite-plugin";
55

66
export default defineConfig({
77
plugins: [
@@ -13,7 +13,7 @@ export default defineConfig({
1313
},
1414
}),
1515
tsconfigPaths(),
16-
codecovRemixPlugin({
16+
codecovRemixVitePlugin({
1717
enableBundleAnalysis: true,
1818
bundleName: "test-remix-v2",
1919
uploadToken: "test-token",

integration-tests/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"devDependencies": {
2828
"@codecov/bundler-plugin-core": "workspace:^",
2929
"@codecov/nuxt-plugin": "workspace:^",
30-
"@codecov/remix-plugin": "workspace:^",
30+
"@codecov/remix-vite-plugin": "workspace:^",
3131
"@codecov/rollup-plugin": "workspace:^",
3232
"@codecov/sveltekit-plugin": "workspace:^",
3333
"@codecov/vite-plugin": "workspace:^",

integration-tests/test-apps/remix/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"react-dom": "^18.2.0"
2020
},
2121
"devDependencies": {
22-
"@codecov/remix-plugin": "workspace:^",
22+
"@codecov/remix-vite-plugin": "workspace:^",
2323
"@remix-run/dev": "^2.9.2",
2424
"@types/react": "^18.2.20",
2525
"@types/react-dom": "^18.2.7",
File renamed without changes.

packages/remix-plugin/README.md packages/remix-vite-plugin/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
Using npm:
2222

2323
```bash
24-
npm install @codecov/remix-plugin --save-dev
24+
npm install @codecov/remix-vite-plugin --save-dev
2525
```
2626

2727
Using yarn:
2828

2929
```bash
30-
yarn add @codecov/remix-plugin --dev
30+
yarn add @codecov/remix-vite-plugin --dev
3131
```
3232

3333
Using pnpm:
3434

3535
```bash
36-
pnpm add @codecov/remix-plugin --save-dev
36+
pnpm add @codecov/remix-vite-plugin --save-dev
3737
```
3838

3939
## Example
@@ -43,7 +43,7 @@ pnpm add @codecov/remix-plugin --save-dev
4343
import { vitePlugin as remix } from "@remix-run/dev";
4444
import { defineConfig } from "vite";
4545
import tsconfigPaths from "vite-tsconfig-paths";
46-
import { codecovRemixPlugin } from "@codecov/remix-plugin";
46+
import { codecovRemixPlugin } from "@codecov/remix-vite-plugin";
4747

4848
export default defineConfig({
4949
plugins: [

packages/remix-plugin/package.json packages/remix-vite-plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@codecov/remix-plugin",
2+
"name": "@codecov/remix-vite-plugin",
33
"version": "0.0.1-beta.9",
44
"description": "Official Codecov Remix plugin",
55
"author": "Codecov",

packages/remix-plugin/src/index.ts packages/remix-vite-plugin/src/index.ts

+20-20
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { _internal_viteBundleAnalysisPlugin } from "@codecov/vite-plugin";
1515

1616
import { remixBundleAnalysisPlugin } from "./remix-bundle-analysis/remixBundleAnalysisPlugin";
1717

18-
const codecovRemixPluginFactory = createVitePlugin<Options, true>(
18+
const codecovRemixVitePluginFactory = createVitePlugin<Options, true>(
1919
(userOptions, unpluginMetaContext) => {
2020
if (checkNodeVersion(unpluginMetaContext)) {
2121
return [];
@@ -50,27 +50,27 @@ const codecovRemixPluginFactory = createVitePlugin<Options, true>(
5050
*
5151
* @example
5252
* ```typescript
53-
// vite.config.ts
54-
import { vitePlugin as remix } from "@remix-run/dev";
55-
import { defineConfig } from "vite";
56-
import tsconfigPaths from "vite-tsconfig-paths";
57-
import { codecovRemixPlugin } from "@codecov/remix-plugin";
58-
59-
export default defineConfig({
60-
plugins: [
61-
remix(),
62-
tsconfigPaths()
63-
// Put the Codecov SvelteKit plugin after all other plugins
64-
codecovRemixPlugin({
65-
enableBundleAnalysis: true,
66-
bundleName: "example-remix-bundle",
67-
uploadToken: process.env.CODECOV_TOKEN,
68-
}),
69-
],
53+
* // vite.config.ts
54+
* import { vitePlugin as remix } from "@remix-run/dev";
55+
* import { defineConfig } from "vite";
56+
* import tsconfigPaths from "vite-tsconfig-paths";
57+
* import { codecovRemixVitePlugin } from "@codecov/remix-vite-plugin";
58+
*
59+
* export default defineConfig({
60+
* plugins: [
61+
* remix(),
62+
* tsconfigPaths()
63+
* // Put the Codecov SvelteKit plugin after all other plugins
64+
* codecovRemixVitePlugin({
65+
* enableBundleAnalysis: true,
66+
* bundleName: "example-remix-bundle",
67+
* uploadToken: process.env.CODECOV_TOKEN,
68+
* }),
69+
* ],
7070
* });
7171
* ```
7272
*
7373
* @see {@link @codecov/bundler-plugin-core!Options | Options} for list of options.
7474
*/
75-
export const codecovRemixPlugin: (options: Options) => VitePlugin<any>[] =
76-
codecovRemixPluginFactory;
75+
export const codecovRemixVitePlugin: (options: Options) => VitePlugin<any>[] =
76+
codecovRemixVitePluginFactory;

packages/remix-plugin/src/remix-bundle-analysis/__tests__/__snapshots__/remixBundleAnalysisPlugin.test.ts.snap packages/remix-vite-plugin/src/remix-bundle-analysis/__tests__/__snapshots__/remixBundleAnalysisPlugin.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`remixBundleAnalysisPlugin > when called > returns a plugin object 1`] = `
44
{
5-
"name": "@codecov/remix-plugin",
5+
"name": "@codecov/remix-vite-plugin",
66
"pluginVersion": "0.0.1-beta.9",
77
"version": "1",
88
"vite": {
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)