Skip to content

Commit

Permalink
docs: minor enhancements (#120)
Browse files Browse the repository at this point in the history
* Minor docs enhancements

* Updated packages

* Backtrack typescript versions to 5.2.2
  • Loading branch information
patricklafrance authored Nov 28, 2023
1 parent 4864d30 commit c1f6b3f
Show file tree
Hide file tree
Showing 26 changed files with 2,075 additions and 1,806 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ A federated web application shell built on top of [Module Federation](https://we
| [@squide/core](packages/core/README.md) | [![npm version](https://img.shields.io/npm/v/@squide/core)](https://www.npmjs.com/package/@squide/core) |
| [@squide/react-router](packages/react-router/README.md) | [![npm version](https://img.shields.io/npm/v/@squide/react-router)](https://www.npmjs.com/package/@squide/react-router) |
| [@squide/webpack-module-federation](packages/webpack-module-federation/README.md) | [![npm version](https://img.shields.io/npm/v/@squide/webpack-module-federation)](https://www.npmjs.com/package/@squide/webpack-module-federation) |
| [@squide/webpack-configs](packages/webpack-configs/README.md) | [![npm version](https://img.shields.io/npm/v/@squide/webpack-configs)](https://www.npmjs.com/package/@squide/webpack-configs) |
| [@squide/msw](packages/msw/README.md) | [![npm version](https://img.shields.io/npm/v/@squide/msw)](https://www.npmjs.com/package/@squide/msw) |
| [@squide/i18next](packages/i18next/README.md) | [![npm version](https://img.shields.io/npm/v/@squide/i18next)](https://www.npmjs.com/package/@squide/i18next) |
| [@squide/firefly](packages/firefly/README.md) | [![npm version](https://img.shields.io/npm/v/@squide/firefly)](https://www.npmjs.com/package/@squide/firefly) |
Expand Down
4 changes: 4 additions & 0 deletions docs/guides/setup-i18next.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ label: Setup i18next

Most of the applications that forms the [Workleap](https://workleap.com/) platform are either already bilingual or will be in the future. To help feature teams with localized resources, Squide provides a native [plugin](../reference/i18next/i18nextPlugin.md) designed to adapt the [i18next](https://www.i18next.com/) library for federated applications.

!!!warning
The examples in this guide load all the resources from single localized resources files. For a real Workleap application, you probably want to load the resources with an i18next [backend plugin](https://www.i18next.com/overview/plugins-and-utils#backends).
!!!

## Setup the host application

Let's start by configuring the host application. First, open a terminal at the root of the host application and install the following packages:
Expand Down
12 changes: 12 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ icon: question

# Troubleshooting

## Set the runtime mode to development

In an effort to optimize the development experience, Squide can be bootstrapped in `development` or `production` mode. To troubleshoot a persistent issue, make sure that the runtime mode is development:

```ts
import { FireflyRuntime, ConsoleLogger, type LogLevel } from "@squide/firefly";

const runtime = new FireflyRuntime({
mode: "development"
});
```

## React context values are undefined

If you are encountering undefined values when providing a React context from the host application and consuming the context in modules, it is likely due to two possible reasons: either you have two instances of React, or you have multiple instances of that React context.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
"devDependencies": {
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.2",
"@typescript-eslint/parser": "6.10.0",
"@typescript-eslint/parser": "6.13.0",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/typescript-configs": "3.0.2",
"cross-env": "7.0.3",
"eslint": "8.53.0",
"eslint": "8.54.0",
"jest": "29.7.0",
"netlify-cli": "17.1.0",
"netlify-cli": "17.7.0",
"retypeapp": "3.5.0",
"ts-node": "10.9.1",
"typescript": "5.2.2"
Expand Down
12 changes: 6 additions & 6 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
"react-dom": "*"
},
"devDependencies": {
"@swc/core": "1.3.96",
"@swc/core": "1.3.99",
"@swc/helpers": "0.5.3",
"@swc/jest": "0.2.29",
"@testing-library/react": "14.0.0",
"@types/jest": "29.5.7",
"@types/react": "18.2.36",
"@types/react-dom": "18.2.14",
"@testing-library/react": "14.1.2",
"@types/jest": "29.5.10",
"@types/react": "18.2.39",
"@types/react-dom": "18.2.17",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/swc-configs": "2.1.2",
"@workleap/tsup-configs": "3.0.1",
Expand All @@ -50,7 +50,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/fakes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
"build": "tsup --config ./tsup.build.ts"
},
"devDependencies": {
"@types/jest": "29.5.7",
"@types/jest": "29.5.10",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/tsup-configs": "3.0.1",
"@workleap/typescript-configs": "3.0.2",
"jest": "29.7.0",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2"
},
"dependencies": {
Expand Down
16 changes: 8 additions & 8 deletions packages/firefly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,28 @@
},
"devDependencies": {
"@squide/webpack-configs": "workspace:*",
"@swc/core": "1.3.96",
"@swc/core": "1.3.99",
"@swc/helpers": "0.5.3",
"@swc/jest": "0.2.29",
"@testing-library/jest-dom": "6.1.4",
"@testing-library/react": "14.0.0",
"@types/jest": "29.5.7",
"@types/react": "18.2.36",
"@types/react-dom": "18.2.14",
"@testing-library/react": "14.1.2",
"@types/jest": "29.5.10",
"@types/react": "18.2.39",
"@types/react-dom": "18.2.17",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/swc-configs": "2.1.2",
"@workleap/tsup-configs": "3.0.1",
"@workleap/typescript-configs": "3.0.2",
"@workleap/webpack-configs": "1.2.1",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"msw": "2.0.3",
"msw": "2.0.9",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-error-boundary": "4.0.11",
"react-router-dom": "6.18.0",
"react-router-dom": "6.20.0",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2",
"webpack": "5.89.0"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/i18next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"react-i18next": "*"
},
"devDependencies": {
"@swc/core": "1.3.96",
"@swc/core": "1.3.99",
"@swc/helpers": "0.5.3",
"@swc/jest": "0.2.29",
"@types/jest": "29.5.7",
"@types/react": "18.2.36",
"@types/react-dom": "18.2.14",
"@types/jest": "29.5.10",
"@types/react": "18.2.39",
"@types/react-dom": "18.2.17",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/swc-configs": "2.1.2",
"@workleap/tsup-configs": "3.0.1",
Expand All @@ -56,12 +56,12 @@
"react-dom": "18.2.0",
"react-i18next": "13.5.0",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2"
},
"dependencies": {
"@squide/core": "workspace:*",
"@formatjs/intl-localematcher": "0.5.2"
"@formatjs/intl-localematcher": "0.5.2",
"@squide/core": "workspace:*"
},
"sideEffects": false,
"engines": {
Expand Down
8 changes: 4 additions & 4 deletions packages/msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
}
},
"devDependencies": {
"@types/react": "18.2.36",
"@types/react-dom": "18.2.14",
"@types/react": "18.2.39",
"@types/react-dom": "18.2.17",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/tsup-configs": "3.0.1",
"@workleap/typescript-configs": "3.0.2",
"msw": "2.0.3",
"msw": "2.0.9",
"react": "18.2.0",
"react-dom": "18.2.0",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2"
},
"dependencies": {
Expand Down
16 changes: 8 additions & 8 deletions packages/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
"react-router-dom": "*"
},
"devDependencies": {
"@swc/core": "1.3.96",
"@swc/core": "1.3.99",
"@swc/helpers": "0.5.3",
"@swc/jest": "0.2.29",
"@testing-library/react": "14.0.0",
"@types/jest": "29.5.7",
"@types/react": "18.2.36",
"@types/react-dom": "18.2.14",
"@types/react-test-renderer": "18.0.5",
"@testing-library/react": "14.1.2",
"@types/jest": "29.5.10",
"@types/react": "18.2.39",
"@types/react-dom": "18.2.17",
"@types/react-test-renderer": "18.0.7",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/swc-configs": "2.1.2",
"@workleap/tsup-configs": "3.0.1",
Expand All @@ -52,10 +52,10 @@
"jest-environment-jsdom": "29.7.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router-dom": "6.18.0",
"react-router-dom": "6.20.0",
"react-test-renderer": "18.2.0",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2"
},
"dependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/webpack-configs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
"webpack": ">=5.0.0"
},
"devDependencies": {
"@swc/core": "1.3.96",
"@swc/core": "1.3.99",
"@swc/helpers": "0.5.3",
"@swc/jest": "0.2.29",
"@testing-library/react": "14.0.0",
"@types/jest": "29.5.7",
"@types/node": "20.8.10",
"@testing-library/react": "14.1.2",
"@types/jest": "29.5.10",
"@types/node": "20.10.0",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/swc-configs": "2.1.2",
"@workleap/tsup-configs": "3.0.1",
Expand All @@ -50,7 +50,7 @@
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2",
"webpack": "5.89.0"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/webpack-module-federation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
}
},
"devDependencies": {
"@swc/core": "1.3.96",
"@swc/core": "1.3.99",
"@swc/helpers": "0.5.3",
"@swc/jest": "0.2.29",
"@testing-library/react": "14.0.0",
"@types/jest": "29.5.7",
"@types/node": "20.8.10",
"@types/react": "18.2.36",
"@types/react-dom": "18.2.14",
"@testing-library/react": "14.1.2",
"@types/jest": "29.5.10",
"@types/node": "20.10.0",
"@types/react": "18.2.39",
"@types/react-dom": "18.2.17",
"@workleap/eslint-plugin": "3.0.0",
"@workleap/swc-configs": "2.1.2",
"@workleap/tsup-configs": "3.0.1",
Expand All @@ -59,7 +59,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"ts-jest": "29.1.1",
"tsup": "7.2.0",
"tsup": "8.0.1",
"typescript": "5.2.2",
"webpack": "5.89.0"
},
Expand Down
Loading

0 comments on commit c1f6b3f

Please sign in to comment.