Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ Thumbs.db
# Nx
.nx/cache
.nx
migrations.json
# Only the migrations.json `nx migrate` writes at the root — a bare pattern would
# also swallow libs/mf/migrations.json, which is the published ng-update collection.
/migrations.json

# Angular
.angular
Expand Down
2 changes: 1 addition & 1 deletion eslint.base.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import globals from 'globals';
import nx from '@nx/eslint-plugin';
import jsoncEslintParser from 'jsonc-eslint-parser';
import * as jsoncEslintParser from 'jsonc-eslint-parser';

export default [
...nx.configs['flat/base'],
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import globals from 'globals';
import baseConfig from './eslint.base.config.mjs';
import jsoncEslintParser from 'jsonc-eslint-parser';
import * as jsoncEslintParser from 'jsonc-eslint-parser';

export default [
...baseConfig,
Expand Down
2 changes: 1 addition & 1 deletion libs/mf-runtime/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { fileURLToPath } from 'url';
import baseConfig from '../../eslint.config.mjs';
import baseConfig1 from '../../eslint.base.config.mjs';
import nx from '@nx/eslint-plugin';
import jsoncEslintParser from 'jsonc-eslint-parser';
import * as jsoncEslintParser from 'jsonc-eslint-parser';

export default [
...baseConfig,
Expand Down
2 changes: 1 addition & 1 deletion libs/mf-tools/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { fileURLToPath } from 'url';
import baseConfig from '../../eslint.config.mjs';
import baseConfig1 from '../../eslint.base.config.mjs';
import nx from '@nx/eslint-plugin';
import jsoncEslintParser from 'jsonc-eslint-parser';
import * as jsoncEslintParser from 'jsonc-eslint-parser';

export default [
...baseConfig,
Expand Down
2 changes: 1 addition & 1 deletion libs/mf/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import baseConfig from '../../eslint.base.config.mjs';
import jsoncEslintParser from 'jsonc-eslint-parser';
import * as jsoncEslintParser from 'jsonc-eslint-parser';

export default [
...baseConfig,
Expand Down
10 changes: 8 additions & 2 deletions libs/mf/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ export default {
preset: '../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
'^.+\\.m?[tj]s$': [
'ts-jest',
{ tsconfig: '<rootDir>/tsconfig.spec.json', useESM: false },
],
},
moduleFileExtensions: ['ts', 'js', 'html'],
// @angular-devkit/schematics pulls in magic-string >=1, which is ESM-only, so
// it has to be transpiled to CJS rather than skipped like the rest of node_modules.
transformIgnorePatterns: ['node_modules/(?!(magic-string)/)'],
moduleFileExtensions: ['ts', 'js', 'mjs', 'html'],
coverageDirectory: '../../coverage/libs/mf',
};
10 changes: 10 additions & 0 deletions libs/mf/migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {
"migrate-to-custom-webpack": {
"version": "22.0.0",
"description": "Replaces the ngx-build-plus builders with @angular-builders/custom-webpack.",
"factory": "./src/schematics/migrate-to-custom-webpack/schematic"
}
}
}
4 changes: 2 additions & 2 deletions libs/mf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"dependencies": {
"@angular-architects/module-federation-runtime": "~22.0.0",
"word-wrap": "^1.2.5",
"callsite": "^1.0.0",
"chalk": "^5.6.2",
"node-fetch": "^3.3.2",
"semver": "~7.7.1"
"semver": "~7.8.5"
},
"peerDependencies": {},
"ng-update": {
Expand Down
2 changes: 1 addition & 1 deletion libs/mf/src/schematics/init-rspack/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function makeMainAsync(main: string, options: MfSchematicSchema): Rule {
const mainContent = tree.read(main);
tree.create(bootstrapName, mainContent);

let newMainContent = '';
let newMainContent: string;
if (options.type === 'dynamic-host') {
newMainContent = `import { initFederation } from '@angular-architects/module-federation/runtime';

Expand Down
2 changes: 1 addition & 1 deletion libs/mf/src/schematics/init-webpack/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function makeMainAsync(main: string, options: MfSchematicSchema): Rule {
const mainContent = tree.read(main);
tree.create(bootstrapName, mainContent);

let newMainContent = '';
let newMainContent: string;
if (options.type === 'dynamic-host') {
newMainContent = `import { initFederation } from '@angular-architects/module-federation';

Expand Down
Loading
Loading