Skip to content

Commit

Permalink
fix: Rebranch Remix plugin to include Vite (#142)
Browse files Browse the repository at this point in the history
Rebrand Remix plugin to be more explicit that it only supports Vite version of Remix.
  • Loading branch information
nicholas-codecov authored Jun 14, 2024
1 parent a2e576f commit baf70ba
Show file tree
Hide file tree
Showing 25 changed files with 11,458 additions and 5,986 deletions.
2 changes: 1 addition & 1 deletion .changeset/big-socks-impress.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
"@codecov/sveltekit-plugin": patch
"@codecov/remix-plugin": patch
"@codecov/remix-vite-plugin": patch
"@codecov/bundler-plugin-core": patch
"@codecov/nuxt-plugin": patch
"@codecov/rollup-plugin": patch
Expand Down
4 changes: 2 additions & 2 deletions .changeset/shy-turtles-shout.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
"@codecov/sveltekit-plugin": patch
"@codecov/remix-plugin": patch
"@codecov/remix-vite-plugin": patch
"@codecov/bundler-plugin-core": patch
"@codecov/nuxt-plugin": patch
"@codecov/rollup-plugin": patch
"@codecov/vite-plugin": patch
"@codecov/webpack-plugin": patch
---

Add in new Remix plugin
Add in new Remix Vite plugin
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config = {
"./integration-tests/tsconfig.json",
"./packages/bundler-plugin-core/tsconfig.json",
"./packages/nuxt-plugin/tsconfig.json",
"./packages/remix-plugin/tsconfig.json",
"./packages/remix-vite-plugin/tsconfig.json",
"./packages/rollup-plugin/tsconfig.json",
"./packages/sveltekit-plugin/tsconfig.json",
"./packages/vite-plugin/tsconfig.json",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ jobs:
[
"bundler-plugin-core",
"nuxt-plugin",
"remix-plugin",
"remix-vite-plugin",
"rollup-plugin",
"sveltekit-plugin",
"vite-plugin",
Expand Down Expand Up @@ -489,7 +489,7 @@ jobs:
[
"bundler-plugin-core",
"nuxt-plugin",
"remix-plugin",
"remix-vite-plugin",
"rollup-plugin",
"sveltekit-plugin",
"vite-plugin",
Expand Down
2 changes: 1 addition & 1 deletion examples/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@codecov/remix-plugin": "workspace:^",
"@codecov/remix-vite-plugin": "workspace:^",
"@remix-run/dev": "^2.9.2",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
Expand Down
4 changes: 2 additions & 2 deletions examples/remix/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { codecovRemixPlugin } from "@codecov/remix-plugin";
import { codecovRemixVitePlugin } from "@codecov/remix-vite-plugin";

export default defineConfig({
plugins: [
Expand All @@ -13,7 +13,7 @@ export default defineConfig({
},
}),
tsconfigPaths(),
codecovRemixPlugin({
codecovRemixVitePlugin({
enableBundleAnalysis: true,
bundleName: "@codecov/example-remix-app",
uploadToken: process.env.REMIX_UPLOAD_TOKEN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`Generating remix stats 2 {"format":"esm","expected":"esm"} matches the
"modules": ExpectArrayContaining {},
"outputPath": StringContaining "build",
"plugin": {
"name": StringMatching "@codecov/remix-plugin",
"name": StringMatching "@codecov/remix-vite-plugin",
"version": "0.0.1-beta.9",
},
"version": "1",
Expand All @@ -35,7 +35,7 @@ exports[`Generating remix stats 2 {"format":"esm","expected":"esm"} matches the
"modules": ExpectArrayContaining {},
"outputPath": StringContaining "build",
"plugin": {
"name": StringMatching "@codecov/remix-plugin",
"name": StringMatching "@codecov/remix-vite-plugin",
"version": "0.0.1-beta.9",
},
"version": "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe("Generating remix stats", () => {
`test-remix-v${version}-client-${expected}`,
),
plugin: {
name: expect.stringMatching("@codecov/remix-plugin"),
name: expect.stringMatching("@codecov/remix-vite-plugin"),
},
assets: expect.arrayContaining([
{
Expand Down Expand Up @@ -108,7 +108,7 @@ describe("Generating remix stats", () => {
`test-remix-v${version}-server-${expected}`,
),
plugin: {
name: expect.stringMatching("@codecov/remix-plugin"),
name: expect.stringMatching("@codecov/remix-vite-plugin"),
},
assets: expect.arrayContaining([
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "viteV5";
import tsconfigPaths from "vite-tsconfig-paths";
import { codecovRemixPlugin } from "@codecov/remix-plugin";
import { codecovRemixVitePlugin } from "@codecov/remix-vite-plugin";

export default defineConfig({
plugins: [
Expand All @@ -13,7 +13,7 @@ export default defineConfig({
},
}),
tsconfigPaths(),
codecovRemixPlugin({
codecovRemixVitePlugin({
enableBundleAnalysis: true,
bundleName: "test-remix-v2",
uploadToken: "test-token",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"@codecov/bundler-plugin-core": "workspace:^",
"@codecov/nuxt-plugin": "workspace:^",
"@codecov/remix-plugin": "workspace:^",
"@codecov/remix-vite-plugin": "workspace:^",
"@codecov/rollup-plugin": "workspace:^",
"@codecov/sveltekit-plugin": "workspace:^",
"@codecov/vite-plugin": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/test-apps/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@codecov/remix-plugin": "workspace:^",
"@codecov/remix-vite-plugin": "workspace:^",
"@remix-run/dev": "^2.9.2",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
Using npm:

```bash
npm install @codecov/remix-plugin --save-dev
npm install @codecov/remix-vite-plugin --save-dev
```

Using yarn:

```bash
yarn add @codecov/remix-plugin --dev
yarn add @codecov/remix-vite-plugin --dev
```

Using pnpm:

```bash
pnpm add @codecov/remix-plugin --save-dev
pnpm add @codecov/remix-vite-plugin --save-dev
```

## Example
Expand All @@ -43,7 +43,7 @@ pnpm add @codecov/remix-plugin --save-dev
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { codecovRemixPlugin } from "@codecov/remix-plugin";
import { codecovRemixPlugin } from "@codecov/remix-vite-plugin";

export default defineConfig({
plugins: [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@codecov/remix-plugin",
"name": "@codecov/remix-vite-plugin",
"version": "0.0.1-beta.9",
"description": "Official Codecov Remix plugin",
"author": "Codecov",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { _internal_viteBundleAnalysisPlugin } from "@codecov/vite-plugin";

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

const codecovRemixPluginFactory = createVitePlugin<Options, true>(
const codecovRemixVitePluginFactory = createVitePlugin<Options, true>(
(userOptions, unpluginMetaContext) => {
if (checkNodeVersion(unpluginMetaContext)) {
return [];
Expand Down Expand Up @@ -50,27 +50,27 @@ const codecovRemixPluginFactory = createVitePlugin<Options, true>(
*
* @example
* ```typescript
// vite.config.ts
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { codecovRemixPlugin } from "@codecov/remix-plugin";
export default defineConfig({
plugins: [
remix(),
tsconfigPaths()
// Put the Codecov SvelteKit plugin after all other plugins
codecovRemixPlugin({
enableBundleAnalysis: true,
bundleName: "example-remix-bundle",
uploadToken: process.env.CODECOV_TOKEN,
}),
],
* // vite.config.ts
* import { vitePlugin as remix } from "@remix-run/dev";
* import { defineConfig } from "vite";
* import tsconfigPaths from "vite-tsconfig-paths";
* import { codecovRemixVitePlugin } from "@codecov/remix-vite-plugin";
*
* export default defineConfig({
* plugins: [
* remix(),
* tsconfigPaths()
* // Put the Codecov SvelteKit plugin after all other plugins
* codecovRemixVitePlugin({
* enableBundleAnalysis: true,
* bundleName: "example-remix-bundle",
* uploadToken: process.env.CODECOV_TOKEN,
* }),
* ],
* });
* ```
*
* @see {@link @codecov/bundler-plugin-core!Options | Options} for list of options.
*/
export const codecovRemixPlugin: (options: Options) => VitePlugin<any>[] =
codecovRemixPluginFactory;
export const codecovRemixVitePlugin: (options: Options) => VitePlugin<any>[] =
codecovRemixVitePluginFactory;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`remixBundleAnalysisPlugin > when called > returns a plugin object 1`] = `
{
"name": "@codecov/remix-plugin",
"name": "@codecov/remix-vite-plugin",
"pluginVersion": "0.0.1-beta.9",
"version": "1",
"vite": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit baf70ba

Please sign in to comment.