diff --git a/.changeset/large-yaks-push.md b/.changeset/large-yaks-push.md new file mode 100644 index 0000000000..1162f9a01d --- /dev/null +++ b/.changeset/large-yaks-push.md @@ -0,0 +1,34 @@ +--- +"@effect/cli": patch +"@effect/cluster": patch +"@effect/cluster-browser": patch +"@effect/cluster-node": patch +"@effect/cluster-workflow": patch +"effect": patch +"@effect/experimental": patch +"@effect/opentelemetry": patch +"@effect/platform": patch +"@effect/platform-browser": patch +"@effect/platform-bun": patch +"@effect/platform-node": patch +"@effect/platform-node-shared": patch +"@effect/printer": patch +"@effect/printer-ansi": patch +"@effect/rpc": patch +"@effect/rpc-http": patch +"@effect/schema": patch +"@effect/sql": patch +"@effect/sql-d1": patch +"@effect/sql-drizzle": patch +"@effect/sql-mssql": patch +"@effect/sql-mysql2": patch +"@effect/sql-pg": patch +"@effect/sql-sqlite-bun": patch +"@effect/sql-sqlite-node": patch +"@effect/sql-sqlite-react-native": patch +"@effect/sql-sqlite-wasm": patch +"@effect/typeclass": patch +"@effect/vitest": patch +--- + +Added additional pure annotations to improve tree-shakeability diff --git a/package.json b/package.json index 5bd4b71f7d..451a3a073c 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,8 @@ "pnpm": { "patchedDependencies": { "@changesets/get-github-info@0.6.0": "patches/@changesets__get-github-info@0.6.0.patch", - "@changesets/assemble-release-plan@6.0.3": "patches/@changesets__assemble-release-plan@6.0.3.patch" + "@changesets/assemble-release-plan@6.0.3": "patches/@changesets__assemble-release-plan@6.0.3.patch", + "babel-plugin-annotate-pure-calls@0.4.0": "patches/babel-plugin-annotate-pure-calls@0.4.0.patch" }, "updateConfig": { "ignoreDependencies": [ diff --git a/patches/babel-plugin-annotate-pure-calls@0.4.0.patch b/patches/babel-plugin-annotate-pure-calls@0.4.0.patch new file mode 100644 index 0000000000..6659c82909 --- /dev/null +++ b/patches/babel-plugin-annotate-pure-calls@0.4.0.patch @@ -0,0 +1,13 @@ +diff --git a/lib/index.js b/lib/index.js +index 2182884e21874ebb37261e2375eec08ad956fc9a..ef5630199121c2830756e00c7cc48cf1078c8207 100644 +--- a/lib/index.js ++++ b/lib/index.js +@@ -78,7 +78,7 @@ const isInAssignmentContext = path => { + + parentPath = _ref.parentPath; + +- if (parentPath.isVariableDeclaration() || parentPath.isAssignmentExpression()) { ++ if (parentPath.isVariableDeclaration() || parentPath.isAssignmentExpression() || parentPath.isClassDeclaration()) { + return true; + } + } while (parentPath !== statement); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a04dfcb3fc..1fba5e85c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ patchedDependencies: '@changesets/get-github-info@0.6.0': hash: 4nwpuevfciovsbhi25hd4g5r7y path: patches/@changesets__get-github-info@0.6.0.patch + babel-plugin-annotate-pure-calls@0.4.0: + hash: lz2aochwly4t7pzapzh4fqay4m + path: patches/babel-plugin-annotate-pure-calls@0.4.0.patch importers: @@ -87,7 +90,7 @@ importers: version: 1.6.0(vitest@1.6.0(@edge-runtime/vm@4.0.1)(@types/node@20.14.11)(@vitest/browser@1.6.0)(happy-dom@14.12.3)(terser@5.31.3)) babel-plugin-annotate-pure-calls: specifier: ^0.4.0 - version: 0.4.0(@babel/core@7.24.9) + version: 0.4.0(patch_hash=lz2aochwly4t7pzapzh4fqay4m)(@babel/core@7.24.9) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -9248,7 +9251,7 @@ snapshots: dependencies: '@babel/core': 7.24.9 - babel-plugin-annotate-pure-calls@0.4.0(@babel/core@7.24.9): + babel-plugin-annotate-pure-calls@0.4.0(patch_hash=lz2aochwly4t7pzapzh4fqay4m)(@babel/core@7.24.9): dependencies: '@babel/core': 7.24.9