-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: add scss sample subapp v2 * fix(subappv2): resolve babel runtime dependency * fix(subappv2): resolve babel runtime dependency * fix(subappv2): resolve test case failure issue * fix(subappv2): resolve test case failure issue * chore: update changelog * fix(CEECORE-4406): replace request with axios * fix(snyk): replace request package with node-fetch in subapp-web * fix(snyk): replace request package with node-fetch in subapp-web * fix(chore): update changelog * fix(deprecated): remove electrode-react-webapp package * fix(peer-dependencies): added react-router-dom as peerDependencies * fix(changelog): added change log * fix(jsdom): downgrade jsdom to v21 to work for backward node compatibility * fix(update): replace xclap to xrun * fix(update): replace xclap to xrun * fix(lint): add lint command * fix(lint): add lint command * fix(lint): add lint command * fix(lint): add lint command * fix(lint): add lint command * fix(lint): move tslib to dev dependency * fix(lint): move tslib to dev dependency * fix(lint): move tslib to dev dependency --------- Co-authored-by: Shubham sharma <[email protected]>
- Loading branch information
1 parent
7be7ef8
commit f6e36ce
Showing
9 changed files
with
1,188 additions
and
2,552 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@xarc/index-page/update-xrun_2024-05-28-15-25.json
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,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@xarc/index-page", | ||
"comment": "add lint inside script", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@xarc/index-page" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/subapp-react/update-xrun_2024-05-28-15-25.json
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,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "subapp-react", | ||
"comment": "no change", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "subapp-react" | ||
} |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,4 +91,4 @@ | |
"trailingComma": "none", | ||
"arrowParens": "avoid" | ||
} | ||
} | ||
} |
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,5 @@ | ||
const { eslintRcTestTypeScript } = require("@xarc/module-dev"); | ||
module.exports = { | ||
extends: eslintRcTestTypeScript, | ||
parser: "@typescript-eslint/parser", | ||
}; |
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
20 changes: 11 additions & 9 deletions
20
packages/xarc-index-page/test/fixtures/react-helmet-handler.js
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,35 +1,37 @@ | ||
"use strict"; | ||
|
||
const Helmet = require("react-helmet").Helmet; | ||
import { Helmet } from "react-helmet"; | ||
|
||
const emptyTitleRegex = /<title[^>]*><\/title>/; | ||
|
||
module.exports = handlerContext => { | ||
module.exports = (handlerContext) => { | ||
const routeOptions = handlerContext.user.routeOptions; | ||
const iconStats = handlerContext.user.routeData.iconStats; | ||
|
||
return { | ||
HEAD_INITIALIZE: context => { | ||
HEAD_INITIALIZE: (context) => { | ||
context.user.helmet = Helmet.renderStatic(); | ||
}, | ||
|
||
PAGE_TITLE: context => { | ||
PAGE_TITLE: (context) => { | ||
const helmet = context.user.helmet; | ||
const helmetTitleScript = helmet.title.toString(); | ||
const helmetTitleEmpty = helmetTitleScript.match(emptyTitleRegex); | ||
|
||
return helmetTitleEmpty ? `<title>${routeOptions.pageTitle}</title>` : helmetTitleScript; | ||
return helmetTitleEmpty | ||
? `<title>${routeOptions.pageTitle}</title>` | ||
: helmetTitleScript; | ||
}, | ||
|
||
REACT_HELMET_SCRIPTS: context => { | ||
REACT_HELMET_SCRIPTS: (context) => { | ||
const scriptsFromHelmet = ["link", "style", "script", "noscript"] | ||
.map(tagName => context.user.helmet[tagName].toString()) | ||
.map((tagName) => context.user.helmet[tagName].toString()) | ||
.join(""); | ||
return `<!--scripts from helmet-->${scriptsFromHelmet}`; | ||
}, | ||
|
||
META_TAGS: context => { | ||
META_TAGS: (context) => { | ||
return context.user.helmet.meta.toString() + iconStats; | ||
} | ||
}, | ||
}; | ||
}; |
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