diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index e334ba72..91eb0759 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -10,16 +10,16 @@ }, "dependencies": { "esbuild-plugin-react18-example": "workspace:*", - "next": "^13.5.2", + "next": "^13.5.4", "nextjs-themes": "^1.0.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { - "@next/eslint-plugin-next": "^13.5.2", - "@types/node": "^20.6.3", - "@types/react": "^18.2.22", - "@types/react-dom": "^18.2.7", + "@next/eslint-plugin-next": "^13.5.4", + "@types/node": "^20.8.3", + "@types/react": "^18.2.25", + "@types/react-dom": "^18.2.11", "esbuild-plugin-react18": "workspace:^", "eslint-config-custom": "workspace:*", "tsconfig": "workspace:*", diff --git a/examples/vite/package.json b/examples/vite/package.json index 76022c14..8e812cc9 100644 --- a/examples/vite/package.json +++ b/examples/vite/package.json @@ -10,23 +10,23 @@ "preview": "vite preview" }, "dependencies": { - "@mayank1513/fork-me": "^1.0.2", + "@mayank1513/fork-me": "^1.1.0", "esbuild-plugin-react18-example": "workspace:*", "react": "^18.2.0", "react-dom": "^18.2.0", "react18-themes": "^1.0.8" }, "devDependencies": { - "@types/react": "^18.2.22", - "@types/react-dom": "^18.2.7", - "@typescript-eslint/eslint-plugin": "^6.7.2", - "@typescript-eslint/parser": "^6.7.2", - "@vitejs/plugin-react-swc": "^3.3.2", + "@types/react": "^18.2.25", + "@types/react-dom": "^18.2.11", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", + "@vitejs/plugin-react-swc": "^3.4.0", "esbuild-plugin-react18": "workspace:^", - "eslint": "^8.50.0", + "eslint": "^8.51.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "typescript": "^5.2.2", - "vite": "^4.4.9" + "vite": "^4.4.11" } } diff --git a/package.json b/package.json index 936bdce3..ab30a94a 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ }, "devDependencies": { "@changesets/cli": "^2.26.2", - "eslint": "^8.50.0", + "eslint": "^8.51.0", "prettier": "^3.0.3", "tsconfig": "workspace:*", - "turbo": "^1.10.14" + "turbo": "^1.10.15" }, "packageManager": "pnpm@8.6.10", "name": "esbuild-plugin-react18" diff --git a/packages/esbuild-plugin-react18-example/package.json b/packages/esbuild-plugin-react18-example/package.json index d34e9483..9ae78240 100644 --- a/packages/esbuild-plugin-react18-example/package.json +++ b/packages/esbuild-plugin-react18-example/package.json @@ -24,25 +24,25 @@ }, "devDependencies": { "@testing-library/react": "^14.0.0", - "@turbo/gen": "^1.10.14", - "@types/node": "^20.6.3", - "@types/react": "^18.2.22", - "@types/react-dom": "^18.2.7", - "@vitejs/plugin-react": "^4.0.4", - "@vitest/coverage-v8": "^0.34.5", - "esbuild-plugin-ignoretests": "^0.0.6", - "esbuild-plugin-removetestid": "^0.0.3", - "esbuild-react18-useclient": "^1.0.5", + "@turbo/gen": "^1.10.15", + "@types/node": "^20.8.3", + "@types/react": "^18.2.25", + "@types/react-dom": "^18.2.11", + "@vitejs/plugin-react": "^4.1.0", + "@vitest/coverage-v8": "^0.34.6", + "esbuild-plugin-ignoretests": "^0.0.7", "esbuild-plugin-react18": "workspace:*", + "esbuild-plugin-removetestid": "^0.0.5", + "esbuild-react18-useclient": "^1.0.7", "eslint-config-custom": "workspace:*", "jsdom": "^22.1.0", - "octokit": "^3.1.0", + "octokit": "^3.1.1", "react": "^18.2.0", "tsconfig": "workspace:*", "tsup": "^7.2.0", "typescript": "^5.2.2", "vite-tsconfig-paths": "^4.2.1", - "vitest": "^0.34.5" + "vitest": "^0.34.6" }, "peerDependencies": { "@types/react": "16.8 - 18", diff --git a/packages/esbuild-plugin-react18/CHANGELOG.md b/packages/esbuild-plugin-react18/CHANGELOG.md index 7c95845b..ebf4be55 100644 --- a/packages/esbuild-plugin-react18/CHANGELOG.md +++ b/packages/esbuild-plugin-react18/CHANGELOG.md @@ -1,5 +1,11 @@ # esbuild-plugin-react18 +## 0.0.4 + +### Patch Changes + +- Fix #8 initialise plugin without passing options + ## 0.0.3 ### Patch Changes diff --git a/packages/esbuild-plugin-react18/package.json b/packages/esbuild-plugin-react18/package.json index 98aaf136..b0c2571b 100644 --- a/packages/esbuild-plugin-react18/package.json +++ b/packages/esbuild-plugin-react18/package.json @@ -2,7 +2,7 @@ "name": "esbuild-plugin-react18", "author": "Mayank Kumar Chaudhari ", "private": false, - "version": "0.0.3", + "version": "0.0.4", "description": "Unleash the Power of React Server Components! ESBuild plugin to build RSC (React18 Server Components) compatible libraries.", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,13 +12,13 @@ "publish-package": "cd dist && npm publish --access public" }, "devDependencies": { - "@types/node": "^18", - "@vitest/coverage-v8": "^0.34.5", - "esbuild": "^0.18.17", - "octokit": "^3.1.0", + "@types/node": "^20.8.3", + "@vitest/coverage-v8": "^0.34.6", + "esbuild": "^0.19.4", + "octokit": "^3.1.1", "tiny-glob": "^0.2.9", - "typescript": "^5.1.6", - "vitest": "^0.34.1" + "typescript": "^5.2.2", + "vitest": "^0.34.6" }, "repository": { "type": "git", diff --git a/packages/esbuild-plugin-react18/src/index.ts b/packages/esbuild-plugin-react18/src/index.ts index 3966bd57..995513a2 100644 --- a/packages/esbuild-plugin-react18/src/index.ts +++ b/packages/esbuild-plugin-react18/src/index.ts @@ -48,10 +48,9 @@ type React18PluginOptions = { }; /** This plugin prevents building test files by esbuild. DTS may still geenrate type files for the tests with only { } as file content*/ -const react18Plugin: (options: React18PluginOptions) => Plugin = options => ({ +const react18Plugin: (options?: React18PluginOptions) => Plugin = (options = {}) => ({ name: "esbuild-plugin-react18-" + uuid(), setup(build) { - if (!options) options = {}; const ignoreNamespace = "mayank1513-ignore-" + uuid(); const keepNamespace = "mayank1513-keep-" + uuid(); const testPathRegExp = /.*\.(test|spec|check)\.(j|t)s(x)?$/i; diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index 1a178c7f..1b9873e1 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -5,6 +5,6 @@ "private": true, "devDependencies": { "@vercel/style-guide": "^5.0.1", - "eslint-config-turbo": "^1.10.14" + "eslint-config-turbo": "^1.10.15" } }