Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Abstract transports into package to leverage conditional exports #1221

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

blaine-arcjet
Copy link
Contributor

This moves our transport logic into its own package. This allows us to leverage conditional exports to support bun and edge-light which need additional considerations for their transports.

Right now, this package is very thin, as it just calls out to the correct Connect-RPC functions for the correct runtime, but we'll also be able to consolidate our HTTP/2 Session logic from #1201 and build our custom transport in a single place (in the future).

During development, I added console.log statements to verify the correct createTransport was being called based on the runtime, but I don't want to thread the logger into here so I just removed them before submitting the PR.

@blaine-arcjet blaine-arcjet requested a review from a team as a code owner July 30, 2024 18:08
Copy link

trunk-io bot commented Jul 30, 2024

😎 Merged successfully - details.

Copy link

socket-security bot commented Jul 30, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@arcjet/transport@1.0.0-alpha.20 None 0 0 B

View full report↗︎

README.md Outdated Show resolved Hide resolved
@trunk-io trunk-io bot merged commit 27776f7 into main Jul 30, 2024
21 checks passed
@trunk-io trunk-io bot deleted the phated/transport-package branch July 30, 2024 18:47
trunk-io bot pushed a commit that referenced this pull request Aug 5, 2024
Automatically generated with [Release Please](https://github.com/googleapis/release-please).
---


<details><summary>@arcjet/analyze: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/analyze-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/analyze:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/protocol bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/bun: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/bun-v1.0.0-alpha.21) (2024-08-05)


### 🚀 New Features

* Abstract transports into package to leverage conditional exports ([#1221](#1221)) ([27776f7](27776f7))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/env bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/headers bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/ip bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/logger bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/protocol bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/transport bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * arcjet bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/decorate: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/decorate-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/decorate:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/protocol bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/sprintf bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/duration: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/duration-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/duration:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/env: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/env-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/env:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/eslint-config: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/eslint-config-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/eslint-config:** Synchronize arcjet-js versions
</details>

<details><summary>@arcjet/headers: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/headers-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/headers:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/ip: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/ip-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/ip:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/logger: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/logger-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/logger:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/sprintf bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/next: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/next-v1.0.0-alpha.21) (2024-08-05)


### 🚀 New Features

* Abstract transports into package to leverage conditional exports ([#1221](#1221)) ([27776f7](27776f7))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/env bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/headers bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/ip bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/logger bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/protocol bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/transport bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * arcjet bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/node: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/node-v1.0.0-alpha.21) (2024-08-05)


### 🚀 New Features

* Abstract transports into package to leverage conditional exports ([#1221](#1221)) ([27776f7](27776f7))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/env bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/headers bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/ip bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/logger bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/protocol bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/transport bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * arcjet bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/protocol: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/protocol-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/protocol:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/rollup-config: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/rollup-config-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/rollup-config:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/runtime: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/runtime-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/runtime:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/sprintf: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/sprintf-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/sprintf:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/sveltekit: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/sveltekit-v1.0.0-alpha.21) (2024-08-05)


### 🚀 New Features

* Abstract transports into package to leverage conditional exports ([#1221](#1221)) ([27776f7](27776f7))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/env bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/headers bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/ip bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/logger bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/protocol bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/transport bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * arcjet bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/transport: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/transport-v1.0.0-alpha.21) (2024-08-05)


### 🚀 New Features

* Abstract transports into package to leverage conditional exports ([#1221](#1221)) ([27776f7](27776f7))
* Attempt to warm http2 connection upon SDK startup ([#1201](#1201)) ([a5c2571](a5c2571))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>@arcjet/tsconfig: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.20...@arcjet/tsconfig-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **@arcjet/tsconfig:** Synchronize arcjet-js versions
</details>

<details><summary>arcjet: 1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](v1.0.0-alpha.20...arcjet-v1.0.0-alpha.21) (2024-08-05)


### 🧹 Miscellaneous Chores

* **arcjet:** Synchronize arcjet-js versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @arcjet/analyze bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/duration bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/headers bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/protocol bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/runtime bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
  * devDependencies
    * @arcjet/eslint-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/rollup-config bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
    * @arcjet/tsconfig bumped from 1.0.0-alpha.20 to 1.0.0-alpha.21
</details>

<details><summary>1.0.0-alpha.21</summary>

## [1.0.0-alpha.21](v1.0.0-alpha.20...v1.0.0-alpha.21) (2024-08-05)


### 🚀 New Features

* Abstract transports into package to leverage conditional exports ([#1221](#1221)) ([27776f7](27776f7))
* Attempt to warm http2 connection upon SDK startup ([#1201](#1201)) ([a5c2571](a5c2571))


### 🧹 Miscellaneous Chores

* **ci:** Change the dependabot commit prefix for Actions PRs ([#1231](#1231)) ([4dac6d5](4dac6d5))
* **ci:** Ignore typescript-eslint 8 until we upgrade to eslint 9 ([#1263](#1263)) ([b089de2](b089de2)), closes [#539](#539)
* **ci:** Leverage Dependabot to update our GitHub Actions ([#1222](#1222)) ([ffde70a](ffde70a))
* **ci:** Switch release-please-action location & update to latest version ([#1229](#1229)) ([e44d81d](e44d81d))
* **deps:** bump actions/checkout from 3 to 4 ([#1226](#1226)) ([7d5242c](7d5242c))
* **deps:** bump step-security/harden-runner from 2.7.0 to 2.9.0 ([#1225](#1225)) ([76755e1](76755e1))
* **examples:** Ensure bun examples have updated dependencies ([#1213](#1213)) ([e766029](e766029))
* Remove Dependencies section from release notes ([#1211](#1211)) ([1708f6a](1708f6a))
</details>

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants