Skip to content

Commit

Permalink
Merge branch 'main' into feat/native-federation-rolldown
Browse files Browse the repository at this point in the history
  • Loading branch information
ilteoood authored Mar 13, 2024
2 parents 32f95d9 + d36a4d7 commit e89b8b5
Show file tree
Hide file tree
Showing 34 changed files with 166 additions and 151 deletions.
2 changes: 1 addition & 1 deletion apps/docs-ui/src/app/js/vendor/highlight.bundle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function () {
'use strict';

const hljs = require('highlight.js/lib/highlight');
const hljs = require('highlight.js/lib');
hljs.registerLanguage(
'asciidoc',
require('highlight.js/lib/languages/asciidoc'),
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/modernjs

## 0.1.3

### Patch Changes

- @module-federation/enhanced@0.0.16

## 0.1.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/modernjs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@module-federation/modernjs",
"private": true,
"version": "0.1.2",
"version": "0.1.3",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand Down
4 changes: 2 additions & 2 deletions apps/website/adapters/netlify-edge/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { netlifyEdgeAdapter } from '@builder.io/qwik-city/adapters/netlify-edge/vite';
import { extendConfig } from '@builder.io/qwik-city/vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { UserConfig, Plugin } from 'vite';
import { UserConfig, Plugin, UserConfigExport } from 'vite';
import { join } from 'path';
import baseConfig from '../../vite.config';

Expand All @@ -12,7 +12,7 @@ const modified: UserConfig = {
(p) => (p as Plugin)?.name !== 'vite-plugin-qwik',
),
};
export default extendConfig(modified, () => {
export default extendConfig(modified as UserConfigExport, () => {
const outDir = 'dist/apps/website/.netlify/edge-functions/entry.netlify-edge';
return {
build: {
Expand Down
6 changes: 3 additions & 3 deletions apps/website/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"executor": "qwik-nx:build",
"options": {
"runSequence": ["website:build.client", "website:build.ssr"],
"outputPath": "apps/website/dist",
"outputPath": "dist/apps/website",
"skipTypeCheck": false
},
"configurations": {
Expand All @@ -20,15 +20,15 @@
"build.client": {
"executor": "@nrwl/vite:build",
"options": {
"outputPath": "apps/website/dist",
"outputPath": "dist/apps/website",
"configFile": "apps/website/vite.config.ts"
}
},
"build.ssr": {
"executor": "@nrwl/vite:build",
"defaultConfiguration": "preview",
"options": {
"outputPath": "apps/website/dist"
"outputPath": "dist/apps/website"
},
"configurations": {
"preview": {
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/components/navbar/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ export default component$((props: NavbarProps) => {
class="border-blue-gray-900 w-1/2 px-4 py-1.5 pr-8 bg-mf-gray hover:bg-white focus:bg-mf-gray text-lg focus:border-ui-blue"
name="language"
id="language"
onChange$={async (event, el) => {
await changeLocale$(event.target.value as any);
onChange$={async (event: any, el) => {
await changeLocale$(event.target?.value as any);
}}
>
{locales.map((locale) => {
Expand Down
3 changes: 2 additions & 1 deletion apps/website/src/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { QwikSpeakProvider } from 'qwik-speak';
import { RouterHead } from './components/router-head/router-head';

import globalStyles from './global.css?inline';
import { config, translationFn } from './speak-config';
import { config } from './speak-config';
import { translationFn } from './speak-functions';

export default component$(() => {
/**
Expand Down
24 changes: 1 addition & 23 deletions apps/website/src/speak-config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import { server$ } from '@builder.io/qwik-city';
import {
LoadTranslationFn,
SpeakConfig,
TranslationFn,
SpeakLocale,
SpeakState,
} from 'qwik-speak';

import { SpeakConfig, SpeakLocale, SpeakState } from 'qwik-speak';
export const LOCALES: Record<string, SpeakLocale> = {
'en-US': { lang: 'en-US', currency: 'USD', timeZone: 'America/Los_Angeles' },
'pt-BR': { lang: 'pt-BR', currency: 'BRL', timeZone: 'America/Sao_Paulo' },
Expand Down Expand Up @@ -35,20 +27,6 @@ export const config: SpeakConfig = {
],
};

const translationData = import.meta.glob('/src/i18n/**/*.json', {
as: 'raw',
eager: true,
});

const loadTranslation$: LoadTranslationFn = server$(
(lang: string, asset: string) =>
JSON.parse(translationData[`/src/i18n/${lang}/${asset}.json`]),
);

export const translationFn: TranslationFn = {
loadTranslation$: loadTranslation$,
};

export const localizedUrl = (url: string, speakState: SpeakState) => {
const starturl = url.startsWith('/') ? url : `/${url}`;
const endurl = starturl.endsWith('/') ? starturl : `${starturl}/`;
Expand Down
16 changes: 16 additions & 0 deletions apps/website/src/speak-functions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { LoadTranslationFn, TranslationFn } from 'qwik-speak';
import { server$ } from '@builder.io/qwik-city';

const translationData = import.meta.glob('/src/i18n/**/*.json', {
as: 'raw',
eager: true,
});

const loadTranslation$: LoadTranslationFn = server$(
(lang: string, asset: string) =>
JSON.parse(translationData[`/src/i18n/${lang}/${asset}.json`]),
) as LoadTranslationFn;

export const translationFn: TranslationFn = {
loadTranslation$: loadTranslation$,
};
16 changes: 8 additions & 8 deletions apps/website/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export default defineConfig({
'Cache-Control': 'public, max-age=600',
},
},
test: {
globals: true,
cache: {
dir: '../../node_modules/.vitest',
},
environment: 'node',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
},
// test: {
// globals: true,
// cache: {
// dir: '../../node_modules/.vitest',
// },
// environment: 'node',
// include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
// },
});
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build]
publish = "apps/website/client/dist"
publish = "dist/apps/website/client"
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"react-dom": "18.2.0",
"react-router-dom": "6.22.0",
"regenerator-runtime": "0.14.1",
"sharp": "^0.33.2",
"tapable": "2.2.1",
"tsup": "7.2.0",
"typedoc": "0.25.8",
Expand Down Expand Up @@ -199,7 +200,7 @@
"prettier": "3.0.3",
"prettier-eslint": "16.2.0",
"qwik-nx": "1.1.1",
"qwik-speak": "0.19.0",
"qwik-speak": "0.12.2",
"react-refresh": "0.14.0",
"rimraf": "^3.0.2",
"rollup-plugin-copy": "3.5.0",
Expand All @@ -215,7 +216,7 @@
"url-loader": "4.1.1",
"verdaccio": "5.29.0",
"vinyl-fs": "4.0.0",
"vite": "4.4.11",
"vite": "5.0.10",
"vite-tsconfig-paths": "4.2.3",
"vitest": "1.2.2",
"vitest-fetch-mock": "^0.2.2",
Expand Down
10 changes: 10 additions & 0 deletions packages/enhanced-rspack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @module-federation/enhanced-rspack

## 0.0.16

### Patch Changes

- Updated dependencies [ccafac3]
- @module-federation/manifest@0.0.16
- @module-federation/sdk@0.0.16
- @module-federation/runtime-tools@0.0.16
- @module-federation/managers@0.0.16

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/enhanced-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/enhanced-rspack",
"version": "0.0.15",
"version": "0.0.16",
"license": "MIT",
"keywords": [
"Module Federation",
Expand Down
10 changes: 10 additions & 0 deletions packages/enhanced/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# [0.2.0-canary.5](https://github.com/module-federation/universe/compare/enhanced-0.2.0-canary.4...enhanced-0.2.0-canary.5) (2023-11-20)

## 0.0.16

### Patch Changes

- Updated dependencies [ccafac3]
- @module-federation/manifest@0.0.16
- @module-federation/sdk@0.0.16
- @module-federation/runtime-tools@0.0.16
- @module-federation/managers@0.0.16

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/enhanced/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/enhanced",
"version": "0.0.15",
"version": "0.0.16",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"files": [
Expand Down
6 changes: 6 additions & 0 deletions packages/managers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/managers

## 0.0.16

### Patch Changes

- @module-federation/sdk@0.0.16

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/managers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/managers",
"version": "0.0.15",
"version": "0.0.16",
"license": "MIT",
"description": "Provide managers for helping handle mf data .",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions packages/manifest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @module-federation/manifest

## 0.0.16

### Patch Changes

- ccafac3: fix(manifest): apply stats options
- @module-federation/sdk@0.0.16
- @module-federation/managers@0.0.16

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/manifest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/manifest",
"version": "0.0.15",
"version": "0.0.16",
"license": "MIT",
"description": "Provide manifest/stats for webpack/rspack MF project .",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/manifest/src/StatsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class StatsManager {
statsOptions['cached'] = true;
statsOptions['cachedModules'] = true;
}
const webpackStats = liveStats.toJson();
const webpackStats = liveStats.toJson(statsOptions);

const filteredModules = this._getFilteredModules(webpackStats);
const moduleHandler = new ModuleHandler(this._options, filteredModules, {
Expand Down
9 changes: 9 additions & 0 deletions packages/nextjs-mf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# [8.1.0-canary.7](https://github.com/module-federation/universe/compare/nextjs-mf-8.1.0-canary.6...nextjs-mf-8.1.0-canary.7) (2023-11-21)

## 8.2.3

### Patch Changes

- @module-federation/enhanced@0.0.16
- @module-federation/node@2.0.14
- @module-federation/runtime@0.0.16
- @module-federation/sdk@0.0.16

## 8.2.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs-mf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/nextjs-mf",
"version": "8.2.2",
"version": "8.2.3",
"license": "MIT",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
8 changes: 8 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# [2.1.0-canary.6](https://github.com/module-federation/universe/compare/node-2.1.0-canary.5...node-2.1.0-canary.6) (2023-11-21)

## 2.0.14

### Patch Changes

- @module-federation/enhanced@0.0.16
- @module-federation/runtime@0.0.16
- @module-federation/sdk@0.0.16

## 2.0.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"public": true,
"name": "@module-federation/node",
"version": "2.0.13",
"version": "2.0.14",
"type": "commonjs",
"main": "./dist/src/index.js",
"exports": {
Expand Down
7 changes: 7 additions & 0 deletions packages/runtime-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## [1.0.1-canary.1](https://github.com/module-federation/universe/compare/runtime-1.0.0...runtime-1.0.1-canary.1) (2023-12-06)

## 0.0.16

### Patch Changes

- @module-federation/runtime@0.0.16
- @module-federation/webpack-bundler-runtime@0.0.16

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/runtime-tools",
"version": "0.0.15",
"version": "0.0.16",
"author": "zhanghang <[email protected]>",
"main": "./dist/index.cjs",
"module": "./dist/index.esm.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/runtime

## 0.0.16

### Patch Changes

- @module-federation/sdk@0.0.16

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/runtime",
"version": "0.0.15",
"version": "0.0.16",
"author": "zhouxiao <[email protected]>",
"main": "./dist/index.cjs",
"module": "./dist/index.esm.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# [1.1.0-canary.1](https://github.com/module-federation/universe/compare/sdk-1.0.0...sdk-1.1.0-canary.1) (2023-12-05)

## 0.0.16

## 0.0.15

### Patch Changes
Expand Down
Loading

0 comments on commit e89b8b5

Please sign in to comment.