@module-federation/runtime-tools 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -16
- package/.eslintrc.json +0 -23
- package/.swcrc +0 -29
- package/CHANGELOG.md +0 -1964
- package/jest.config.ts +0 -30
- package/project.json +0 -77
- package/rollup.config.cjs +0 -50
- package/src/index.ts +0 -3
- package/src/runtime-core.ts +0 -1
- package/src/runtime.ts +0 -1
- package/src/webpack-bundler-runtime.ts +0 -1
- package/tsconfig.json +0 -23
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/dist/{index.esm.d.ts → index.d.ts} +0 -0
- /package/dist/{runtime-core.esm.d.ts → runtime-core.d.ts} +0 -0
- /package/dist/{runtime.esm.d.ts → runtime.d.ts} +0 -0
- /package/dist/{webpack-bundler-runtime.esm.d.ts → webpack-bundler-runtime.d.ts} +0 -0
package/jest.config.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import { readFileSync } from 'fs';
|
|
3
|
-
|
|
4
|
-
// Reading the SWC compilation config and remove the "exclude"
|
|
5
|
-
// for the test files to be compiled by SWC
|
|
6
|
-
const { exclude: _, ...swcJestConfig } = JSON.parse(
|
|
7
|
-
readFileSync(`${__dirname}/.swcrc`, 'utf-8'),
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves.
|
|
11
|
-
// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude"
|
|
12
|
-
if (swcJestConfig.swcrc === undefined) {
|
|
13
|
-
swcJestConfig.swcrc = false;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Uncomment if using global setup/teardown files being transformed via swc
|
|
17
|
-
// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries
|
|
18
|
-
// jest needs EsModule Interop to find the default exported setup/teardown functions
|
|
19
|
-
// swcJestConfig.module.noInterop = false;
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
displayName: 'runtime',
|
|
23
|
-
preset: '../../jest.preset.js',
|
|
24
|
-
transform: {
|
|
25
|
-
'^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
|
|
26
|
-
},
|
|
27
|
-
moduleFileExtensions: ['ts', 'js', 'html'],
|
|
28
|
-
testEnvironment: 'node',
|
|
29
|
-
coverageDirectory: '../../coverage/packages/runtime',
|
|
30
|
-
};
|
package/project.json
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "runtime-tools",
|
|
3
|
-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "packages/runtime-tools/src",
|
|
5
|
-
"projectType": "library",
|
|
6
|
-
"tags": ["type:pkg"],
|
|
7
|
-
"targets": {
|
|
8
|
-
"build": {
|
|
9
|
-
"executor": "@nx/rollup:rollup",
|
|
10
|
-
"outputs": ["{workspaceRoot}/packages/runtime-tools/dist"],
|
|
11
|
-
"options": {
|
|
12
|
-
"parallel": false,
|
|
13
|
-
"outputPath": "packages/runtime-tools/dist",
|
|
14
|
-
"main": "packages/runtime-tools/src/index.ts",
|
|
15
|
-
"additionalEntryPoints": [
|
|
16
|
-
"packages/runtime-tools/src/runtime.ts",
|
|
17
|
-
"packages/runtime-tools/src/webpack-bundler-runtime.ts"
|
|
18
|
-
],
|
|
19
|
-
"tsConfig": "packages/runtime-tools/tsconfig.lib.json",
|
|
20
|
-
"assets": [],
|
|
21
|
-
"project": "packages/runtime-tools/package.json",
|
|
22
|
-
"compiler": "swc",
|
|
23
|
-
"rollupConfig": "packages/runtime-tools/rollup.config.cjs",
|
|
24
|
-
"format": ["cjs", "esm"],
|
|
25
|
-
"external": ["@module-federation/*"],
|
|
26
|
-
"generatePackageJson": false
|
|
27
|
-
},
|
|
28
|
-
"dependsOn": [
|
|
29
|
-
{
|
|
30
|
-
"target": "build",
|
|
31
|
-
"dependencies": true
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"lint": {
|
|
36
|
-
"executor": "@nx/eslint:lint",
|
|
37
|
-
"outputs": ["{options.outputFile}"],
|
|
38
|
-
"options": {
|
|
39
|
-
"lintFilePatterns": [
|
|
40
|
-
"packages/runtime-tools/**/*.ts",
|
|
41
|
-
"packages/runtime-tools/package.json"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"release": {
|
|
46
|
-
"executor": "nx:run-commands",
|
|
47
|
-
"options": {
|
|
48
|
-
"parallel": false,
|
|
49
|
-
"commands": [
|
|
50
|
-
{
|
|
51
|
-
"command": "nx run runtime:test",
|
|
52
|
-
"forwardAllArgs": false
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"command": "nx run runtime:build",
|
|
56
|
-
"forwardAllArgs": false
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"command": "nx run runtime:semantic-release",
|
|
60
|
-
"forwardAllArgs": true
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"semantic-release": {
|
|
66
|
-
"executor": "@goestav/nx-semantic-release:semantic-release"
|
|
67
|
-
},
|
|
68
|
-
"test": {
|
|
69
|
-
"executor": "@nx/jest:jest",
|
|
70
|
-
"outputs": ["{workspaceRoot}/coverage/packages/core"],
|
|
71
|
-
"options": {
|
|
72
|
-
"jestConfig": "packages/runtime-tools/jest.config.ts",
|
|
73
|
-
"passWithNoTests": true
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
package/rollup.config.cjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
module.exports = function (rollupConfig) {
|
|
2
|
-
rollupConfig.input = {
|
|
3
|
-
index: 'packages/runtime-tools/src/index.ts',
|
|
4
|
-
runtime: 'packages/runtime-tools/src/runtime.ts',
|
|
5
|
-
'webpack-bundler-runtime':
|
|
6
|
-
'packages/runtime-tools/src/webpack-bundler-runtime.ts',
|
|
7
|
-
'runtime-core': 'packages/runtime-tools/src/runtime-core.ts',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
if (Array.isArray(rollupConfig.output)) {
|
|
11
|
-
rollupConfig.output = rollupConfig.output.map(function (c) {
|
|
12
|
-
var outputConfig = Object.assign({}, c, {
|
|
13
|
-
hoistTransitiveImports: false,
|
|
14
|
-
entryFileNames:
|
|
15
|
-
c.format === 'cjs'
|
|
16
|
-
? c.entryFileNames.replace('.js', '.cjs')
|
|
17
|
-
: c.entryFileNames,
|
|
18
|
-
chunkFileNames:
|
|
19
|
-
c.format === 'cjs'
|
|
20
|
-
? c.chunkFileNames.replace('.js', '.cjs')
|
|
21
|
-
: c.chunkFileNames,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
if (c.format === 'cjs') {
|
|
25
|
-
outputConfig.externalLiveBindings = false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return outputConfig;
|
|
29
|
-
});
|
|
30
|
-
} else {
|
|
31
|
-
var outputConfig = Object.assign({}, rollupConfig.output, {
|
|
32
|
-
hoistTransitiveImports: false,
|
|
33
|
-
entryFileNames:
|
|
34
|
-
rollupConfig.output.format === 'cjs'
|
|
35
|
-
? rollupConfig.output.entryFileNames.replace('.js', '.cjs')
|
|
36
|
-
: rollupConfig.output.entryFileNames,
|
|
37
|
-
chunkFileNames:
|
|
38
|
-
rollupConfig.output.format === 'cjs'
|
|
39
|
-
? rollupConfig.output.chunkFileNames.replace('.js', '.cjs')
|
|
40
|
-
: rollupConfig.output.chunkFileNames,
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
if (rollupConfig.output.format === 'cjs') {
|
|
44
|
-
outputConfig.externalLiveBindings = false;
|
|
45
|
-
}
|
|
46
|
-
rollupConfig.output = outputConfig;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return rollupConfig;
|
|
50
|
-
};
|
package/src/index.ts
DELETED
package/src/runtime-core.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@module-federation/runtime/core';
|
package/src/runtime.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@module-federation/runtime';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@module-federation/webpack-bundler-runtime';
|
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"forceConsistentCasingInFileNames": true,
|
|
6
|
-
"strict": true,
|
|
7
|
-
"noImplicitOverride": true,
|
|
8
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
9
|
-
"noImplicitReturns": true,
|
|
10
|
-
"noFallthroughCasesInSwitch": true
|
|
11
|
-
},
|
|
12
|
-
"files": [],
|
|
13
|
-
"include": [],
|
|
14
|
-
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
|
|
15
|
-
"references": [
|
|
16
|
-
{
|
|
17
|
-
"path": "./tsconfig.lib.json"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"path": "./tsconfig.spec.json"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
package/tsconfig.lib.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"types": ["jest", "node"]
|
|
7
|
-
},
|
|
8
|
-
"include": [
|
|
9
|
-
"jest.config.ts",
|
|
10
|
-
"src/**/*.test.ts",
|
|
11
|
-
"src/**/*.spec.ts",
|
|
12
|
-
"src/**/*.d.ts"
|
|
13
|
-
]
|
|
14
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|