Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
node-version: 24
cache: 'npm'
- run: npm ci

# Install Playwright browsers
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium

- uses: nrwl/nx-set-shas@v4

- run: npx nx format:check
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ migrations.json
.nx
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md

vite.config.*.timestamp*
vitest.config.*.timestamp*
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { register } from 'node:module';
import { pathToFileURL } from 'node:url';
import * as fs from 'node:fs/promises';
import { register } from 'node:module';
import * as path from 'node:path';
import { pathToFileURL } from 'node:url';

import {
FederationInfo,
fetchAndRegisterRemotes,
ImportMap,
InitFederationOptions,
mergeImportMaps,
processHostInfo,
processRemoteInfos,
} from '@softarc/native-federation-runtime';
import { IMPORT_MAP_FILE_NAME } from '../utils/import-map-loader';
import { resolver } from '../utils/loader-as-data-url';
Expand Down Expand Up @@ -54,7 +53,7 @@ async function createNodeImportMap(

const hostInfo = await loadFsFederationInfo(relBundlePath);
const hostImportMap = await processHostInfo(hostInfo, './' + relBundlePath);
const remotesImportMap = await processRemoteInfos(remotes, {
const remotesImportMap = await fetchAndRegisterRemotes(remotes, {
throwIfRemoteNotFound: options.throwIfRemoteNotFound,
cacheTag: options.cacheTag,
});
Expand Down
7 changes: 6 additions & 1 deletion libs/native-federation-runtime/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"extends": ["../../.eslintrc.json", "../../.eslintrc.base.json"],
"ignorePatterns": ["!**/*"],
"ignorePatterns": [
"!**/*",
"**/*.spec.ts",
"**/*.integration.spec.ts",
"__test-helpers__/**/*"
],
"overrides": [
{
"files": ["*.ts"],
Expand Down
22 changes: 0 additions & 22 deletions libs/native-federation-runtime/jest.config.ts

This file was deleted.

17 changes: 16 additions & 1 deletion libs/native-federation-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
"tslib": "^2.3.0"
},
"devDependencies": {
"@types/node": "^22.5.4"
"@types/node": "^22.5.4",
"vitest": "^3.0.0",
"@vitest/ui": "^3.0.0"
},
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage",
"test:unit": "vitest run --project=unit",
"test:integration": "vitest run --project=integration"
},
"msw": {
"workerDirectory": [
"public"
]
}
}
19 changes: 19 additions & 0 deletions libs/native-federation-runtime/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@
"options": {
"command": "node tools/scripts/publish.mjs native-federation-runtime verdaccio {args.ver}"
}
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"passWithNoTests": true,
"reportsDirectory": "../../coverage/libs/native-federation-runtime",
"configFile": "libs/native-federation-runtime/vitest.config.mts"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"libs/native-federation-runtime/**/*.ts",
"libs/native-federation-runtime/package.json"
]
}
}
},
"tags": ["org:softarc", "scope:nf"]
Expand Down
Loading