Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
40c2235
chore: all building
dOrgJelli Jun 20, 2023
38010ab
chore: lint fix
dOrgJelli 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
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
ae58016
chore: changes based on feedback
dOrgJelli Jun 23, 2023
1f1f714
merge origin-dev
dOrgJelli Jun 23, 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
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
185 changes: 0 additions & 185 deletions packages/client-config-builder/src/bundles/default.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/client-config-builder/src/bundles/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"devDependencies": {
"@polywrap/cli-js": "~0.10.0",
"@polywrap/sys-config-bundle-js": "0.10.1",
"@polywrap/test-cases": "0.10.1",
"@types/jest": "29.5.0",
"@types/prettier": "2.6.0",
Expand All @@ -51,7 +52,6 @@
"typescript": "4.9.5",
"yaml": "2.1.3"
},
"gitHead": "7346adaf5adb7e6bbb70d9247583e995650d390a",
"publishConfig": {
"access": "public"
},
Expand Down
Loading