Skip to content

Commit fd139a8

Browse files
Remove and angular (#4087)
1 parent cd5ef16 commit fd139a8

File tree

2,542 files changed

+79799
-71096
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,542 files changed

+79799
-71096
lines changed

.github/workflows/codeql-analysis.yml

+29-30
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [master]
2020
schedule:
2121
- cron: '44 2 * * 6'
2222

2323
jobs:
24-
2524
stop_previous:
2625
runs-on: ubuntu-22.04
2726
steps:
@@ -42,39 +41,39 @@ jobs:
4241
strategy:
4342
fail-fast: false
4443
matrix:
45-
language: [ 'javascript' ]
44+
language: ['javascript']
4645
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
4746
# Learn more about CodeQL language support at https://git.io/codeql-language-support
4847

4948
steps:
50-
- name: Checkout repository
51-
uses: actions/checkout@v2
49+
- name: Checkout repository
50+
uses: actions/checkout@v2
5251

53-
# Initializes the CodeQL tools for scanning.
54-
- name: Initialize CodeQL
55-
uses: github/codeql-action/init@v1
56-
with:
57-
languages: ${{ matrix.language }}
58-
# If you wish to specify custom queries, you can do so here or in a config file.
59-
# By default, queries listed here will override any specified in a config file.
60-
# Prefix the list here with "+" to use these queries and those in the config file.
61-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
# Initializes the CodeQL tools for scanning.
53+
- name: Initialize CodeQL
54+
uses: github/codeql-action/init@v1
55+
with:
56+
languages: ${{ matrix.language }}
57+
# If you wish to specify custom queries, you can do so here or in a config file.
58+
# By default, queries listed here will override any specified in a config file.
59+
# Prefix the list here with "+" to use these queries and those in the config file.
60+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
6261

63-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
64-
# If this step fails, then you should remove it and run the build manually (see below)
65-
- name: Autobuild
66-
uses: github/codeql-action/autobuild@v1
62+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
63+
# If this step fails, then you should remove it and run the build manually (see below)
64+
- name: Autobuild
65+
uses: github/codeql-action/autobuild@v1
6766

68-
# ℹ️ Command-line programs to run using the OS shell.
69-
# 📚 https://git.io/JvXDl
67+
# ℹ️ Command-line programs to run using the OS shell.
68+
# 📚 https://git.io/JvXDl
7069

71-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
72-
# and modify them (or add more) to build your code if your project
73-
# uses a compiled language
70+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
71+
# and modify them (or add more) to build your code if your project
72+
# uses a compiled language
7473

75-
#- run: |
76-
# make bootstrap
77-
# make release
74+
#- run: |
75+
# make bootstrap
76+
# make release
7877

79-
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v1
78+
- name: Perform CodeQL Analysis
79+
uses: github/codeql-action/analyze@v1

.github/workflows/on-push.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ env:
2525
sudo apt-get autoremove -y
2626
2727
jobs:
28-
2928
# Stop previous runs
3029
stop-previous-run:
3130
runs-on: ubuntu-22.04
@@ -69,7 +68,7 @@ jobs:
6968
- name: Install deps
7069
if: steps.yarn-cache.outputs.cache-hit != 'true'
7170
env:
72-
NODE_OPTIONS: "--max_old_space_size=4096"
71+
NODE_OPTIONS: '--max_old_space_size=4096'
7372
run: |
7473
echo "Yarn changed - install deps ... "
7574
pnpm install

.github/workflows/on-schedule.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: on-schedule
2-
on:
2+
on:
33
workflow_dispatch:
44
schedule:
55
- cron: 0 */48 * * *

.github/workflows/on-workflow-run.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
name: on workflow run
22
on:
33
workflow_run:
4-
workflows: ["on pull request"]
4+
workflows: ['on pull request']
55
types:
66
- completed
77

88
env:
99
RUN_NUMBER: ${{ github.run_number }}
1010

1111
jobs:
12-
1312
# Stop previous runs
1413
stop-previous-run:
1514
runs-on: ubuntu-22.04
@@ -69,7 +68,6 @@ jobs:
6968
const fs = require('fs');
7069
fs.writeFileSync('${{github.workspace}}/allure-results.zip', Buffer.from(download.data));
7170
- run: unzip allure-results.zip
72-
7371
- name: Get Allure history
7472
uses: actions/checkout@v3
7573
if: always()

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This repository is to showcase examples of how Webpack 5's new Module Federation
44

55
## Module Federation Universe
66

7-
* Module federation enhances collections: [Universe](https://github.com/module-federation/universe)
8-
* Module Federation Docs: [Module Federation Docs](https://module-federation.io/)
7+
- Module federation enhances collections: [Universe](https://github.com/module-federation/universe)
8+
- Module Federation Docs: [Module Federation Docs](https://module-federation.io/)
99

1010
## List of Examples
1111

advanced-api/automatic-vendor-sharing/app1/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
"react": "^16.13.0",
2828
"react-dom": "^16.13.0"
2929
}
30-
}
30+
}

advanced-api/automatic-vendor-sharing/app1/rspack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ module.exports = {
2222
static: {
2323
directory: path.join(__dirname, 'dist'),
2424
},
25+
headers: {
26+
'Access-Control-Allow-Origin': '*',
27+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
28+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
29+
},
2530
port: 3001,
2631
},
2732
target: 'web',

advanced-api/automatic-vendor-sharing/app1/webpack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ module.exports = {
2121
static: {
2222
directory: path.join(__dirname, 'dist'),
2323
},
24+
headers: {
25+
'Access-Control-Allow-Origin': '*',
26+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
27+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
28+
},
2429
port: 3001,
2530
},
2631
target: 'web',

advanced-api/automatic-vendor-sharing/app2/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
"react": "^16.13.0",
2828
"react-dom": "^16.13.0"
2929
}
30-
}
30+
}

advanced-api/automatic-vendor-sharing/app2/rspack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ module.exports = {
2222
static: {
2323
directory: path.join(__dirname, 'dist'),
2424
},
25+
headers: {
26+
'Access-Control-Allow-Origin': '*',
27+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
28+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
29+
},
2530
port: 3002,
2631
},
2732
target: 'web',

advanced-api/automatic-vendor-sharing/app2/webpack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ module.exports = {
2121
static: {
2222
directory: path.join(__dirname, 'dist'),
2323
},
24+
headers: {
25+
'Access-Control-Allow-Origin': '*',
26+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
27+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
28+
},
2429
port: 3002,
2530
},
2631
target: 'web',

advanced-api/dynamic-remotes-runtime-environment-variables/host/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
"react": "^16.13.0",
3333
"react-dom": "^16.13.0"
3434
}
35-
}
35+
}

advanced-api/dynamic-remotes-runtime-environment-variables/host/rspack.config.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ module.exports = {
1010
mode: 'development',
1111
entry: './src/index',
1212
devtool: 'source-map',
13-
devServer:{
13+
devServer: {
1414
static: {
1515
directory: path.join(__dirname, 'dist'),
1616
},
17+
headers: {
18+
'Access-Control-Allow-Origin': '*',
19+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
20+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
21+
},
1722
port: 3000,
1823
},
1924
output: {

advanced-api/dynamic-remotes-runtime-environment-variables/host/webpack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ module.exports = {
1111
static: {
1212
directory: path.join(__dirname, 'dist'),
1313
},
14+
headers: {
15+
'Access-Control-Allow-Origin': '*',
16+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
17+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
18+
},
1419
port: 3000,
1520
},
1621
output: {

advanced-api/dynamic-remotes-runtime-environment-variables/remote/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
"react": "^16.13.0",
3333
"react-dom": "^16.13.0"
3434
}
35-
}
35+
}

advanced-api/dynamic-remotes-runtime-environment-variables/remote/rspack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
entry: './src/index',
1010
mode: 'development',
1111
devtool: 'source-map',
12-
devServer:{
12+
devServer: {
1313
port: 3001,
1414
headers: {
1515
'Access-Control-Allow-Origin': '*',

advanced-api/dynamic-remotes-synchronous-imports/app1/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
"react": "^16.13.0",
2424
"react-dom": "^16.13.0"
2525
}
26-
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
const getRemote = () => {
2-
return {
3-
name: 'get-remote-from-window-plugin',
4-
beforeRequest: (args) => {
5-
// The 'beforeRequest' hook is called before a request is made.
6-
// It iterates over each 'remote' in 'args.options.remotes'.
7-
args.options.remotes.forEach((remote) => {
8-
// Constructing the reference name from the remote's name.
9-
const refName = `${remote.name}Url`
10-
console.log(refName);
11-
// Checking if the global variable corresponding to 'refName' exists.
12-
if (typeof window[refName] !== 'undefined') {
13-
// Splitting the 'remote.entry' string on the pattern '[window.anyVariableName]'
14-
// and taking the part after this pattern.
15-
const split = remote.entry.split(/\[window\.[^\]]+]/)[1]
16-
// If there's a string after the split (i.e., the pattern was found),
17-
// prepend the value of the global variable to this string.
18-
if(split) {
19-
remote.entry = window[refName] + split;
20-
}
21-
}
22-
})
23-
return args;
2+
return {
3+
name: 'get-remote-from-window-plugin',
4+
beforeRequest: args => {
5+
// The 'beforeRequest' hook is called before a request is made.
6+
// It iterates over each 'remote' in 'args.options.remotes'.
7+
args.options.remotes.forEach(remote => {
8+
// Constructing the reference name from the remote's name.
9+
const refName = `${remote.name}Url`;
10+
console.log(refName);
11+
// Checking if the global variable corresponding to 'refName' exists.
12+
if (typeof window[refName] !== 'undefined') {
13+
// Splitting the 'remote.entry' string on the pattern '[window.anyVariableName]'
14+
// and taking the part after this pattern.
15+
const split = remote.entry.split(/\[window\.[^\]]+]/)[1];
16+
// If there's a string after the split (i.e., the pattern was found),
17+
// prepend the value of the global variable to this string.
18+
if (split) {
19+
remote.entry = window[refName] + split;
20+
}
2421
}
25-
};
26-
}
22+
});
23+
return args;
24+
},
25+
};
26+
};
2727

2828
export default getRemote;

advanced-api/dynamic-remotes-synchronous-imports/app1/webpack.config.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ module.exports = {
1212
static: {
1313
directory: path.join(__dirname, 'dist'),
1414
},
15+
headers: {
16+
'Access-Control-Allow-Origin': '*',
17+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
18+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
19+
},
1520
port: app1Module.port,
1621
},
1722
output: {
@@ -36,9 +41,7 @@ module.exports = {
3641
remotes: {
3742
app2: app2Module.federationConfig,
3843
},
39-
runtimePlugins: [
40-
require.resolve('./runtimePlugin.js')
41-
],
44+
runtimePlugins: [require.resolve('./runtimePlugin.js')],
4245
shared: {
4346
moment: deps.moment,
4447
react: {

advanced-api/dynamic-remotes-synchronous-imports/app2/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
"react-redux": "^7.2.0",
2626
"redux": "^4.2.1"
2727
}
28-
}
28+
}

advanced-api/dynamic-remotes-synchronous-imports/app2/webpack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ module.exports = {
1111
static: {
1212
directory: path.join(__dirname, 'dist'),
1313
},
14+
headers: {
15+
'Access-Control-Allow-Origin': '*',
16+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
17+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
18+
},
1419
port: app2Module.port,
1520
},
1621
target: 'web',

advanced-api/dynamic-remotes/app1/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
"react": "^16.13.0",
2929
"react-dom": "^16.13.0"
3030
}
31-
}
31+
}

0 commit comments

Comments
 (0)