Skip to content

Commit

Permalink
Version 2.1.0-beta.0 (#490)
Browse files Browse the repository at this point in the history
* Add deffer for target iframe + improve TS definition

* Update github workflow

* Update demo-react

* Allow to defer the iframe creation + add option to handle reconnect and disabling content reset at reconnect

* Allow defer target on Coriolis object and trigger disconnected event if communication breaks

* Update changelog

---------

Co-authored-by: Jean-Philippe Zolesio <[email protected]>
  • Loading branch information
holblin and Jean-Philippe Zolesio authored Jan 25, 2024
1 parent d395d09 commit 7e7288c
Show file tree
Hide file tree
Showing 21 changed files with 11,271 additions and 9,380 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ build/
dist/
reporting/
node_modules/
docs/
docs/
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 20
cache: 'yarn'
- name: install
run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ unsafe-perm = true

//registry.npmjs.org/:always-auth=false
//registry.yarnpkg.com/:always-auth=false
@adobe:registry=https://registry.npmjs.com/
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for

## Changelog

### Version 2.1.0

* Allow to defer the target of PostMessage (create coriolis object before the iframe)
* Fix contentModule that rewrite the content even when not used
* Allow contentModule and StoreModule to handle reconnect or not
* Send a disconnect event if the connection is lost (eventlistener for unload)
* Improve typescript definition

### Version 2.0.0

* Drop support of Internet Explorer
Expand Down
8 changes: 8 additions & 0 deletions demo-react/app/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
always-auth = true

registry=https://registry.npmjs.com/
unsafe-perm = true

//registry.npmjs.org/:always-auth=false
//registry.yarnpkg.com/:always-auth=false
@adobe:registry=https://registry.npmjs.com/
23 changes: 13 additions & 10 deletions demo-react/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"private": true,
"dependencies": {
"@adobe/coriolis": "file:../../",
"@adobe/react-spectrum": "^3.22.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.2.5",
"@types/node": "^18.11.18",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"@adobe/react-spectrum": "^3.33.1",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.4",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typescript": "^4.8.4",
"web-vitals": "^3.1.1"
"typescript": "^5.3.3",
"web-vitals": "^3.5.1"
},
"scripts": {
"start": "PORT=8080 react-scripts start",
Expand All @@ -41,5 +41,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@typescript-eslint/parser": "^6.19.0"
}
}
1 change: 1 addition & 0 deletions demo-react/app/src/CoriolisIframe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const CoriolisIframe = ({html, coriolisUrl, setRef}: Props) => {
autoConnect: false,
contentModule: { initialContent: html, keepInitialCss: true },
});

if (setRef) {
setRef(coriolisRef.current);
}
Expand Down
Loading

0 comments on commit 7e7288c

Please sign in to comment.