@rc312/effect-snowflake 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +0 -0
  3. package/README.md +2 -4
  4. package/dist/adbc-driver.d.ts +0 -0
  5. package/dist/adbc-driver.d.ts.map +0 -0
  6. package/dist/adbc-driver.js +0 -0
  7. package/dist/adbc-driver.js.map +0 -0
  8. package/dist/index.d.ts +0 -0
  9. package/dist/index.d.ts.map +0 -0
  10. package/dist/index.js +0 -0
  11. package/dist/index.js.map +0 -0
  12. package/dist/internal/client.d.ts +0 -0
  13. package/dist/internal/client.d.ts.map +0 -0
  14. package/dist/internal/client.js +0 -0
  15. package/dist/internal/client.js.map +0 -0
  16. package/dist/internal/configuration.d.ts +0 -0
  17. package/dist/internal/configuration.d.ts.map +0 -0
  18. package/dist/internal/configuration.js +0 -0
  19. package/dist/internal/configuration.js.map +0 -0
  20. package/dist/internal/connection.d.ts +0 -0
  21. package/dist/internal/connection.d.ts.map +0 -0
  22. package/dist/internal/connection.js +0 -0
  23. package/dist/internal/connection.js.map +0 -0
  24. package/dist/internal/lifecycle.d.ts +0 -0
  25. package/dist/internal/lifecycle.d.ts.map +0 -0
  26. package/dist/internal/lifecycle.js +0 -0
  27. package/dist/internal/lifecycle.js.map +0 -0
  28. package/dist/internal/native.d.ts +0 -0
  29. package/dist/internal/native.d.ts.map +0 -0
  30. package/dist/internal/native.js +0 -0
  31. package/dist/internal/native.js.map +0 -0
  32. package/dist/internal/session.d.ts +0 -0
  33. package/dist/internal/session.d.ts.map +0 -0
  34. package/dist/internal/session.js +0 -0
  35. package/dist/internal/session.js.map +0 -0
  36. package/dist/internal/transaction.d.ts +0 -0
  37. package/dist/internal/transaction.d.ts.map +0 -0
  38. package/dist/internal/transaction.js +0 -0
  39. package/dist/internal/transaction.js.map +0 -0
  40. package/dist/models.d.ts +0 -0
  41. package/dist/models.d.ts.map +0 -0
  42. package/dist/models.js +0 -0
  43. package/dist/models.js.map +0 -0
  44. package/dist/snowflake-error.d.ts +0 -0
  45. package/dist/snowflake-error.d.ts.map +0 -0
  46. package/dist/snowflake-error.js +0 -0
  47. package/dist/snowflake-error.js.map +0 -0
  48. package/examples/.env.example +0 -0
  49. package/examples/README.md +1 -1
  50. package/examples/check.ts +0 -0
  51. package/examples/composition.ts +0 -0
  52. package/examples/options.ts +0 -0
  53. package/examples/query.ts +0 -0
  54. package/examples/run.ts +0 -0
  55. package/examples/scenarios.ts +0 -0
  56. package/examples/stream.ts +0 -0
  57. package/examples/transaction.ts +0 -0
  58. package/package.json +4 -4
  59. package/src/adbc-driver.ts +0 -0
  60. package/src/index.ts +0 -0
  61. package/src/internal/client.ts +0 -0
  62. package/src/internal/configuration.ts +0 -0
  63. package/src/internal/connection.ts +0 -0
  64. package/src/internal/lifecycle.ts +0 -0
  65. package/src/internal/native.ts +0 -0
  66. package/src/internal/session.ts +0 -0
  67. package/src/internal/transaction.ts +0 -0
  68. package/src/models.ts +0 -0
  69. package/src/snowflake-error.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @rc312/effect-snowflake
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Upgrade Effect support to 4.1.2 and require Node.js 22.19 or newer to match Effect's runtime requirements.
8
+
9
+ Effect 4.1 promotes typed failures to defects when combined with cleanup defects. Snowflake transaction failures retain both the original error and the cleanup error in the combined Cause.
10
+
3
11
  ## 0.1.0
4
12
 
5
13
  ### Minor Changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -8,7 +8,7 @@ An Effect 4 client for Snowflake through Apache Arrow ADBC. Queries return Arrow
8
8
  bun add @rc312/effect-snowflake effect apache-arrow@^21.1.0
9
9
  ```
10
10
 
11
- Use Node.js 22.12 or newer. This is a server-only package with a native dependency. The package includes the JavaScript ADBC driver manager; install the Snowflake shared-library driver separately:
11
+ Use Node.js 22.19 or newer. This is a server-only package with a native dependency. The package includes the JavaScript ADBC driver manager; install the Snowflake shared-library driver separately:
12
12
 
13
13
  ```sh
14
14
  npm install -g @columnar-tech/dbc
@@ -128,7 +128,7 @@ const insert = db.transaction((tx) =>
128
128
 
129
129
  Transactions reserve the connection, disable autocommit, and serialize work on the supplied session. Use `tx` inside the callback and await its work. Returning from the callback closes its child scope and expires the session before commit. Typed failures, defects, and interruption trigger rollback. Failed commits also attempt rollback. Successful completion or rollback restores autocommit.
130
130
 
131
- Failed reader/statement cleanup, rollback, or autocommit restoration invalidates the client; no further operation is accepted. Recovering a cleanup defect within the callback still prevents commit: the transaction fails with operation `transaction.invalidated` and attempts rollback. Autocommit is never re-enabled after a failed rollback, because doing so could commit pending changes. Cleanup failures are preserved as defects alongside the original failure. Acquire a new client after invalidation.
131
+ Failed reader/statement cleanup, rollback, or autocommit restoration invalidates the client; no further operation is accepted. Recovering a cleanup defect within the callback still prevents commit: the transaction fails with operation `transaction.invalidated` and attempts rollback. Autocommit is never re-enabled after a failed rollback, because doing so could commit pending changes. Cleanup failures are preserved as defects alongside the original failure. In Effect 4.1, a cleanup defect also promotes the original typed failure to a defect in the combined Cause. Acquire a new client after invalidation.
132
132
 
133
133
  Only the callback is interruptible. Once commit starts, the adapter finishes commit and autocommit restoration before releasing the connection. Interruption during a successful commit does not trigger a subsequent rollback; the caller may still observe interruption after the commit completes.
134
134
 
@@ -173,5 +173,3 @@ bun run lint
173
173
  ```
174
174
 
175
175
  Unit tests use real Arrow IPC and controlled native resources for precision, acquisition and reader failures, serialized work, combined cleanup causes, transaction interruption, scope retirement, and tracing redaction. The examples and E2E sources are included in typechecking. Coverage reports are written under the package's ignored `coverage/` directory; the live suite runs separately from ordinary unit tests.
176
-
177
- The lifecycle ownership helpers were adapted from the provided `effect-extensions-copy/src/waddler/snowflake.ts` reference implementation.
File without changes
File without changes
File without changes
File without changes
package/dist/index.d.ts CHANGED
File without changes
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/index.js.map CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/models.d.ts CHANGED
File without changes
File without changes
package/dist/models.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -15,7 +15,7 @@ cp packages/effect-snowflake/examples/.env.example packages/effect-snowflake/.en
15
15
 
16
16
  Edit `packages/effect-snowflake/.env` for a development account, warehouse, database, and schema. The template uses JWT authentication and a private-key file path. For inline keys, remove `SNOWFLAKE_PRIVATE_KEY_PATH` and set `SNOWFLAKE_PRIVATE_KEY` to a PKCS#8 PEM. `SNOWFLAKE_PRIVATE_KEY_PASS` supplies an encrypted inline key's passphrase. For password authentication, set `SNOWFLAKE_AUTHENTICATOR=auth_snowflake` and `SNOWFLAKE_PASSWORD`; for OAuth use `auth_oauth` and `SNOWFLAKE_TOKEN`.
17
17
 
18
- The examples need Node.js 22.12+ and Bun for workspace build scripts. The Node entrypoints load the package-local `.env` using `--env-file-if-exists`; exported environment variables take precedence. Real `.env` files are ignored by Git. Do not commit credentials. Secrets are loaded through `Config.Redacted`, and the configuration check never prints their values.
18
+ The examples need Node.js 22.19+ and Bun for workspace build scripts. The Node entrypoints load the package-local `.env` using `--env-file-if-exists`; exported environment variables take precedence. Real `.env` files are ignored by Git. Do not commit credentials. Secrets are loaded through `Config.Redacted`, and the configuration check never prints their values.
19
19
 
20
20
  If manifest discovery is unavailable, set `SNOWFLAKE_ADBC_DRIVER` to the absolute path of an installed driver library or manifest. The shared configuration sets native login and network timeouts to 30 seconds and request retries to 60 seconds. These bound individual native operations; they are not an overall scenario deadline.
21
21
 
package/examples/check.ts CHANGED
File without changes
File without changes
File without changes
package/examples/query.ts CHANGED
File without changes
package/examples/run.ts CHANGED
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc312/effect-snowflake",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Scoped Effect 4 Snowflake client with Apache Arrow ADBC queries, streams, and transactions.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,16 +46,16 @@
46
46
  "@apache-arrow/adbc-driver-manager": "~0.24.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@effect/vitest": "^4.0.5",
49
+ "@effect/vitest": "^4.1.2",
50
50
  "@types/node": "^26.6.5",
51
51
  "@vitest/coverage-v8": "5.0.4",
52
52
  "vitest": "^5.0.4"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "apache-arrow": "^21.1.0",
56
- "effect": "^4.0.5"
56
+ "effect": "^4.1.2"
57
57
  },
58
58
  "engines": {
59
- "node": ">=22.12.0"
59
+ "node": ">=22.19.0"
60
60
  }
61
61
  }
File without changes
package/src/index.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/models.ts CHANGED
File without changes
File without changes