-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): dev server compatibility (#188)
* fix circular imports * refactor: revert to isomorphic-ws package * ci: add bundling test * ci: share js client tarball between jobs * ci: bundling test depends on packaging * ci: wip * ci: only cancel jobs for current wf * ci: temporarily disable integration test * ci: wip * ci: wip * ci: wip * ci: wip * ci: wip * ci: wip * break to verify * ci: enable macos * ci: enable node matrix * ci: re-enable integration test * ci: rename integration test job * fix: shim crypto * bulld: update nix flake * build: revert to hopefully cachixed flake lock
- Loading branch information
Showing
26 changed files
with
168 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Bundling Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
node: [16, 18] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install NPM packages | ||
run: npm ci | ||
|
||
- name: Build client library | ||
run: npm run build | ||
|
||
- name: Create package tarball | ||
run: npm pack | ||
|
||
- name: Upload package tarball | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: client-${{ matrix.node }}.tgz | ||
path: holochain-client-*.tgz | ||
|
||
- name: Setup tmate session if a previous step failed | ||
if: ${{ failure() }} | ||
uses: mxschmitt/action-tmate@v3 | ||
timeout-minutes: 10 | ||
|
||
bundle-test: | ||
needs: build | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
node: [16, 18] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Download package tarball | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: client-${{ matrix.node }}.tgz | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Create a Vite project from template | ||
run: npm create vite@latest test-app -- --template vanilla-ts | ||
|
||
- name: Add JS client to project | ||
run: | | ||
cd test-app | ||
npm i $(ls ../holochain-client-*.tgz) | ||
- name: Write Vite config to set build target to ES2020 | ||
run: | | ||
cd test-app | ||
echo 'export default { build:{ target: "es2020" } }' > vite.config.js | ||
- name: Write client import to main.js | ||
run: | | ||
cd test-app | ||
echo 'import * as client from "@holochain/client";' > main.js | ||
- name: Bundle app for production | ||
run: | | ||
cd test-app | ||
npm run build | ||
- name: Setup tmate session if a previous step failed | ||
if: ${{ failure() }} | ||
uses: mxschmitt/action-tmate@v3 | ||
timeout-minutes: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@holochain/client](./client.md) > [DnaStorageBlob](./client.dnastorageblob.md) > [Dna](./client.dnastorageblob.dna.md) | ||
[Home](./index.md) > [@holochain/client](./client.md) > [DnaStorageBlob](./client.dnastorageblob.md) > [dna](./client.dnastorageblob.dna.md) | ||
|
||
## DnaStorageBlob.Dna property | ||
## DnaStorageBlob.dna property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
Dna: DnaStorageInfo; | ||
dna: DnaStorageInfo; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
The calling agent | ||
|
||
<b>Signature:</b> | ||
**Signature:** | ||
|
||
```typescript | ||
agent_pub_key: AgentPubKey; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ | |
**Signature:** | ||
|
||
```typescript | ||
randomCapSecret: () => Promise<CapSecret> | ||
randomCapSecret: () => CapSecret | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ | |
**Signature:** | ||
|
||
```typescript | ||
randomNonce: () => Promise<Nonce256Bit> | ||
randomNonce: () => Nonce256Bit | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.