Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
5dfd5d9
added polywrap uri authority inference for common URI formats to Uri
krisbitney Mar 2, 2023
2683b26
generalized URI authority inference
krisbitney Mar 3, 2023
2fec3e0
Merge remote-tracking branch 'origin/origin-dev' into kris/uri-author…
krisbitney Apr 25, 2023
56a07f2
post-merge fix
krisbitney Apr 25, 2023
1be80b9
Merge pull request #19 from polywrap/origin-0.10-dev
dOrgJelli Apr 29, 2023
51ca4e0
implemented comprehensive env tests
nerfZael May 9, 2023
2b4fc8f
fixed issue with wasm not detecting undefined env
nerfZael May 9, 2023
8559ee1
using test wrapper path instead of local path
nerfZael May 9, 2023
6fcfcd2
chore: bump wrap test harness cases version
cbrzn May 10, 2023
bdcfb21
renamed getEnvFromUriHistory to getEnvFromResolutionPath, and finalUr…
nerfZael May 11, 2023
dd43ab5
Merge pull request #30 from polywrap/nerfzael-env-tests-refactor
dOrgJelli May 12, 2023
d354d77
Merge pull request #32 from polywrap/nerfzael-history-resolution-path…
nerfZael May 19, 2023
4b16566
fix: add plugin-js as client-config-builder-js dependency
dOrgJelli May 21, 2023
570aa54
feat: add infinite loop error test for recursive resolver
Niraj-Kamdar Jun 6, 2023
86f849c
feat: add static-resolver redirect test
Niraj-Kamdar Jun 6, 2023
f50898a
feat: add remaining test-cases
Niraj-Kamdar Jun 6, 2023
2e5fc07
feat: add aggregator-resolver test-cases
Niraj-Kamdar Jun 6, 2023
cf35c78
chore: rename packages/client-config-builder to packages/config-builder
dOrgJelli Jun 14, 2023
6570bb2
chore: init config-bundle packages
dOrgJelli Jun 14, 2023
7ddf1f9
chore: init config bundles
dOrgJelli Jun 17, 2023
e6c098c
Update README.md
dOrgJelli Jun 19, 2023
7704260
Merge pull request #46 from polywrap/dOrgJelli-patch-1
dOrgJelli Jun 19, 2023
40c2235
chore: all building
dOrgJelli Jun 20, 2023
38010ab
chore: lint fix
dOrgJelli Jun 20, 2023
38d1c37
fix!: client-config-builder name
Niraj-Kamdar Jun 20, 2023
d27d985
chore: todos
dOrgJelli Jun 20, 2023
a1aab4b
chore: update client-config-builder tests
dOrgJelli Jun 21, 2023
3babce9
Merge branch 'origin-dev' into extract-config-bundles
dOrgJelli Jun 21, 2023
b9d4a92
chore: tests pass
dOrgJelli Jun 21, 2023
037a8a9
Merge branch 'extract-config-bundles' of https://github.com/polywrap/…
dOrgJelli Jun 21, 2023
d16fb9c
fix: issue
Niraj-Kamdar Jun 21, 2023
42cb066
refactor: names
Niraj-Kamdar Jun 21, 2023
65d6716
chore: move 'web' bundle into 'sys'
dOrgJelli Jun 22, 2023
66149a7
chore: move web into sys bundle + add react-app test-integration
dOrgJelli Jun 23, 2023
0e7e5ae
chore: improved platform selection
dOrgJelli Jun 23, 2023
2e270a7
chore: simplify implementation
dOrgJelli Jun 23, 2023
f2cb14c
chore: update tests
dOrgJelli Jun 23, 2023
fb2f271
chore: fix tests
dOrgJelli Jun 23, 2023
3f61440
chore: move integration tests out of packages dir
dOrgJelli Jun 23, 2023
ce2ac3c
chore: lint fix
dOrgJelli Jun 23, 2023
ed8a62a
chore: fix test
dOrgJelli Jun 23, 2023
d769bf3
chore: fix docs build
dOrgJelli Jun 23, 2023
a889953
chore: remove sys-node package & add readmes
dOrgJelli Jun 23, 2023
19aa6e1
chore: remove todo
dOrgJelli Jun 23, 2023
eb1ba30
Merge pull request #37 from polywrap/fix/client-config-builder-plugin…
dOrgJelli Jun 23, 2023
9bd74ec
Merge pull request #42 from polywrap/nk/recursive-resolver-test
dOrgJelli Jun 23, 2023
ec2a1ec
Merge pull request #43 from polywrap/nk/static-resolver-test
dOrgJelli Jun 23, 2023
2a533d0
Merge pull request #44 from polywrap/nk/aggregator-resolver-test
dOrgJelli Jun 23, 2023
ae58016
chore: changes based on feedback
dOrgJelli Jun 23, 2023
1f1f714
merge origin-dev
dOrgJelli Jun 23, 2023
b2f5dcd
Merge pull request #45 from polywrap/extract-config-bundles
dOrgJelli Jun 23, 2023
4ccaeb1
increased asyncify data end to match stack size for built wasm modules
nerfZael Jun 26, 2023
104cb11
chore: update CHANGELOG
dOrgJelli Jun 26, 2023
9aee0cf
Merge pull request #48 from polywrap/nerfzael-asyncify-increase-stack…
dOrgJelli Jun 26, 2023
ed0242f
merge origin-dev
dOrgJelli Jun 26, 2023
2e95ec3
chore: fix bad merge
dOrgJelli Jun 26, 2023
cf8a21c
chore: update CHANGELOG
dOrgJelli Jun 26, 2023
69daf7e
Merge pull request #47 from polywrap/nk/refactor-config-builder
dOrgJelli Jun 26, 2023
20f87a7
Merge branch 'origin-dev' into kris/uri-authority-inference
dOrgJelli Jun 27, 2023
581522e
chore: update CHANGELOG
dOrgJelli Jun 27, 2023
b2ba721
chore: update docs
dOrgJelli Jun 27, 2023
2906388
chore: simplify URI parsing
dOrgJelli Jun 27, 2023
ac7caa2
chore: lint fix
dOrgJelli Jun 27, 2023
e727aab
Merge pull request #6 from polywrap/kris/uri-authority-inference
dOrgJelli Jun 27, 2023
6a968c8
chore: update docs
dOrgJelli Jun 27, 2023
a1169d0
chore: update VERSION
dOrgJelli Jun 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# Polywrap Origin (0.11.0)
## Features
**`@polywrap/core-js`:**
* [PR-6](https://github.com/polywrap/javascript-client/pull/6) **Improved URI Inference**
* Non-wrap URI schemes can now be used (ex: `https://domain.com/path`). The non-wrap scheme will be used as the authority, and all other contents will be shifted into the path.
* Examples:
* `https://domain.com/path` into `wrap://https/domain.com/path`
* `ipfs://QmHASH` into `wrap://ipfs/QmHASH`

**`@polywrap/client-config-builder-js`:**
* [PR-45](https://github.com/polywrap/javascript-client/pull/45) **Modular Config Bundles**
* The `DefaultBundle` has been broken apart into two separate bundles: `sys` and `web3`.
* `addBundle(...)` has been added to the `ClientConfigBuilder` interface.
* `addDefaults()` now calls `addBundle("sys")` and `addBundle("web3")` internally.

**`@polywrap/sys-config-bundle-js`:**
* [PR-45](https://github.com/polywrap/javascript-client/pull/45) **Bundled System-Level Plugins & Resolvers**
* The sys bundle includes: `logger`, `datetime`, `concurrent`, `http`, `httpResolver`
* This package is compiled to run in both node.js and browsers.
* In node.js, the bundle also includes: `fileSystem`, `fileSystemResolver`.

**`@polywrap/web3-config-bundle-js`:**
* [PR-45](https://github.com/polywrap/javascript-client/pull/45) **Bundled Web3 Plugins & Resolvers**
* The web3 bundle includes: `ethereumProviderV1`, `ethereumProviderV2`, `ipfsHttpClient`, `ipfsResolver`, `ensTextRecordResolver`, `ensResolver`, `ensIpfsContenthashResolver`.

**`@polywrap/config-bundle-types-js`:**
* [PR-45](https://github.com/polywrap/javascript-client/pull/45) **Base Typings For Config Bundle Packages**
* Valid config bundle packages are expected to export a `bundle` value, which is of type `Bundle`.

## Breaking Changes
**`@polywrap/client-config-builder-js`:**
* [PR-47](https://github.com/polywrap/javascript-client/pull/47) **Renaming For Improved Accuracy**
* Renamed `ClientConfigBuilder` to `PolywrapClientConfigBuilder`
* Renamed `IClientConfigBuilder` to `ClientConfigBuilder`
* Renamed `addWrapper(s)` to `setWrapper(s)`
* Renamed `addPackage(s)` to `setPackage(s)`
* Renamed `addRedirect(s)` to `setRedirect(s)`

**`@polywrap/core-js`:**
* [PR-32](https://github.com/polywrap/javascript-client/pull/32) **Rename `getEnvFromUriHistory` to `getEnvFromResolutionPath`**

## Bugs
**`@polywrap/client-js`**
* [PR-32](https://github.com/polywrap/javascript-client/pull/32) **Improved Browser Compatability**
* Building the JS client into browser-based applications no longer requires custom polyfills to remove Node.JS dependencies.

**`@polywrap/client-cofig-builder-js`**
* [PR-37](https://github.com/polywrap/javascript-client/pull/37) **Add `@polywrap/plugin-js` as a Dependency**
* This resolves some package resolution warnings that are emitted from npm when installing the client-config-builder.

**`@polywrap/wasm-js`:**
* [PR-30](https://github.com/polywrap/javascript-client/pull/30) **Properly Serialize Empty Wrap Environment**
* The wrap environment was being improperly encoded as an empty object, which had a size > 0 bytes, causing deserialization to fail. This has been fixed and it is now an empty byte array with size of 0.

# Polywrap Origin (0.10.1)
## Features
**`@polywrap/wasm-js`:**
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.1
0.11.0
15 changes: 15 additions & 0 deletions integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "integration-tests-root",
"license": "MIT",
"private": true,
"workspaces": {
"packages": [
"./**",
"../packages/**"
]
},
"scripts": {
"build": "yarn build:react",
"build:react": "cd react-app && yarn build"
}
}
31 changes: 31 additions & 0 deletions integration-tests/react-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "integration-test-react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@polywrap/client-js": "~0.10.1",
"@polywrap/sys-config-bundle-js": "~0.10.1",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Binary file added integration-tests/react-app/public/favicon.ico
Binary file not shown.
28 changes: 28 additions & 0 deletions integration-tests/react-app/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
3 changes: 3 additions & 0 deletions integration-tests/react-app/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
20 changes: 20 additions & 0 deletions integration-tests/react-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import { PolywrapClient } from "@polywrap/client-js";
import { bundle } from "@polywrap/sys-config-bundle-js";

function App() {
const client = new PolywrapClient();

// Make extra sure the sys bundle works in the browser
console.log(bundle);

return (
<div className="App">
<header className="App-header">
<div>Some text...</div>
</header>
</div>
);
}

export default App;
12 changes: 12 additions & 0 deletions integration-tests/react-app/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
1 change: 1 addition & 0 deletions integration-tests/react-app/src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="react-scripts" />
26 changes: 26 additions & 0 deletions integration-tests/react-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
]
}
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ["**/?(*.)+(spec|test).[jt]s?(x)"],
modulePathIgnorePatterns: ['./src/__tests__/apis'],
transform: {
"/.*\.ts$/": ["ts-jest"]
}
Expand Down
16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@
"scripts": {
"reset": "yarn clean && (yarn || yarn || yarn) && yarn build",
"clean": "npx rimraf ./**/node_modules ./**/yarn.lock ./**/build ./**/coverage ./**/.polywrap",
"install:test-wrappers": "lerna run generate:wrappers --scope @polywrap/test-cases",
"build": "yarn build:core && yarn build:config && yarn build:core:client && yarn build:client && yarn install:test-wrappers",
"build:core": "lerna run build --no-private --ignore @polywrap/client-config-builder-js --ignore @polywrap/core-client-js --ignore @polywrap/client-js",
"build:config": "lerna run build --scope @polywrap/client-config-builder-js",
"build:core:client": "lerna run build --scope @polywrap/core-client-js",
"build:client": "lerna run build --scope @polywrap/client-js",
"install:test-wraps": "lerna run generate:wraps --scope @polywrap/test-cases",
"build": "yarn build:common && yarn build:client && yarn install:test-wraps",
"build:common": "lerna run build --ignore @polywrap/core-client-js --ignore @polywrap/client-js --ignore @polywrap/uri-resolver-extensions-js --ignore @polywrap/client-config-builder-js --ignore @polywrap/*-config-bundle-js",
"build:client": "lerna run build --scope @polywrap/core-client-js --scope @polywrap/client-js --scope @polywrap/uri-resolver-extensions-js --scope @polywrap/client-config-builder-js --scope @polywrap/*-config-bundle-js",
"build:docs": "lerna run build:docs",
"lint": "lerna run lint",
"lint:fix": "lerna run lint -- --fix",
"lint:ci": "yarn lint",
"test": "lerna run test --no-private --ignore @polywrap/client-js --concurrency 1 && lerna run test --scope @polywrap/client-js",
"test:integrations": "cd integration-tests && yarn && yarn build",
"version:apply": "lerna version $(cat VERSION) --exact --no-git-tag-version --yes",
"postversion:apply": "git add . && git commit -m \"build(release): migrate to `cat ./VERSION`\"",
"publish:npm": "lerna exec --no-private --concurrency 1 -- yarn publish --access public --non-interactive --verbose",
Expand All @@ -46,10 +45,5 @@
"prettier": "2.2.1",
"ts-node": "10.9.1",
"rimraf": "3.0.2"
},
"resolutions": {
"@types/react": "16.9.0",
"@types/react-dom": "16.9.0"
}
}

1 change: 0 additions & 1 deletion packages/asyncify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"ts-node": "10.9.1",
"typescript": "4.9.5"
},
"gitHead": "7346adaf5adb7e6bbb70d9247583e995650d390a",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/asyncify/src/AsyncWasmInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class AsyncWasmInstance {

private static _dataAddr = 16;
private static _dataStart = AsyncWasmInstance._dataAddr + 8;
private static _dataEnd = 1024;
private static _dataEnd = 24576;

private _instance: WasmInstance;
private _wrappedImports: WasmImports;
Expand Down
Loading