-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(changesets): version packages (#169)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
89ace29
commit c48448b
Showing
19 changed files
with
733 additions
and
120 deletions.
There are no files selected for viewing
This file was deleted.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# @squide/firefly-webpack-configs | ||
|
||
## 2.0.0 | ||
|
||
### Major Changes | ||
|
||
- [#168](https://github.com/gsoft-inc/wl-squide/pull/168) [`89ace29`](https://github.com/gsoft-inc/wl-squide/commit/89ace29b9aeadbbe83cfa71dd137b9f1a115c283) Thanks [@patricklafrance](https://github.com/patricklafrance)! - This release Migrates Squide from Webpack Module Federation to [Module Federation 2.0](https://module-federation.io/guide/start/quick-start.html). | ||
|
||
This release deprecates the following packages: | ||
|
||
- `@squide/webpack-module-federation`, use `@squide/module-federation` instead. | ||
- `@squide/firefly-configs`, use `@squide/firefly-webpack-configs` instead. | ||
|
||
And introduce a few changes to existing API: | ||
|
||
- The `FireflyRuntime` nows accept a `useMsw` option and expose a new `isMswEnabled` getter: | ||
|
||
```ts | ||
// bootstrap.tsx | ||
|
||
import { FireflyRuntime } from "@squide/firefly"; | ||
|
||
const runtime = new FireflyRuntime({ | ||
useMsw: true, | ||
}); | ||
|
||
// Use the runtime to determine if MSW handlers should be registered. | ||
if (runtime.isMswEnabled) { | ||
// ... | ||
} | ||
``` | ||
|
||
- The `registerRemoteModules` function doesn't accept the remotes URL anymore. The remotes URL should be configured in the webpack configuration files. | ||
|
||
Previously: | ||
|
||
```ts | ||
// bootstrap.tsx | ||
|
||
import { | ||
registerRemoteModules, | ||
type RemoteDefinition, | ||
} from "@squide/firefly"; | ||
|
||
const Remotes: RemoteDefinition = [ | ||
{ | ||
name: "remote1", | ||
url: "http://localhost:8081", | ||
}, | ||
]; | ||
|
||
await registerRemoteModules(Remotes, runtime); | ||
``` | ||
|
||
```js | ||
// webpack.dev.js | ||
|
||
import { defineDevHostConfig } from "@squide/firefly-webpack-configs"; | ||
import { swcConfig } from "./swc.dev.js"; | ||
|
||
export default defineDevHostConfig(swcConfig, "host", 8080, { | ||
overlay: false, | ||
}); | ||
``` | ||
|
||
Now: | ||
|
||
```ts | ||
// bootstrap.tsx | ||
|
||
import { | ||
registerRemoteModules, | ||
type RemoteDefinition, | ||
} from "@squide/firefly"; | ||
|
||
const Remotes: RemoteDefinition = [ | ||
{ | ||
name: "remote1", | ||
}, | ||
]; | ||
|
||
await registerRemoteModules(Remotes, runtime); | ||
``` | ||
|
||
```js | ||
// webpack.dev.js | ||
|
||
import { defineDevHostConfig } from "@squide/firefly-webpack-configs"; | ||
import { swcConfig } from "./swc.dev.js"; | ||
|
||
/** | ||
* @typedef {import("@squide/firefly-webpack-configs").RemoteDefinition}[] | ||
*/ | ||
export const Remotes = [ | ||
{ | ||
name: "remote1", | ||
url: "http://localhost:8081", | ||
}, | ||
]; | ||
|
||
export default defineDevHostConfig(swcConfig, "host", 8080, Remotes, { | ||
overlay: false, | ||
}); | ||
``` | ||
|
||
To migrate: | ||
|
||
1. Replace the `@squide/webpack-module-federation` dependency by `@squide/module-federation`. | ||
|
||
2. Replace the `@squide/firefly-configs` dependency by `@squide/firefly-webpack-configs`. | ||
|
||
3. Move the remotes URL from the `bootstrap.tsx` file to the `webpack.*.js` files. | ||
|
||
4. Integrate the new `useMsw` and `isMswEnabled` props. | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [[`89ace29`](https://github.com/gsoft-inc/wl-squide/commit/89ace29b9aeadbbe83cfa71dd137b9f1a115c283)]: | ||
- @squide/webpack-configs@2.0.0 |
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
Oops, something went wrong.