Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump npm to 8.5.x and fixes to workspaces support. #17910

Merged
merged 10 commits into from
Mar 15, 2022
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
5 changes: 4 additions & 1 deletion .github/workflows/jdl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
- name: 'GENERATION: config'
run: $JHI_SCRIPTS/11-generate-config.sh
- name: 'GENERATION: project'
run: $JHI_SCRIPTS/12-generate-project.sh --skip-jhipster-dependencies ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
run: $JHI_SCRIPTS/12-generate-project.sh --skip-jhipster-dependencies --skip-install ${{ matrix.extra-args }} ${{ matrix.new-extra-args }}
- name: 'GENERATION: workspace git'
run: |
git add .
Expand Down Expand Up @@ -187,6 +187,9 @@ jobs:
#----------------------------------------------------------------------
# Launch tests
#----------------------------------------------------------------------
- name: 'PREPARE: npm install'
if: steps.compare.outputs.equals != 'true'
run: npm install
- name: 'TESTS: backend'
id: backend
if: steps.compare.outputs.equals != 'true' && matrix.skip-backend-tests != 1 && needs.build-matrix.outputs.server != 'false'
Expand Down
10 changes: 1 addition & 9 deletions generators/client/templates/angular/angular.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@
"<%= MAIN_SRC_DIR %>content",
"<%= MAIN_SRC_DIR %>favicon.ico",
"<%= MAIN_SRC_DIR %>manifest.webapp",
"<%= MAIN_SRC_DIR %>robots.txt",
{
"glob": "*.{js,css,html,png}",
"input": "./node_modules/swagger-ui-dist",
"output": "swagger-ui",
"ignore": ["**/index.html"]
},
{ "glob": "axios.min.js", "input": "./node_modules/axios/dist", "output": "swagger-ui" },
{ "glob": "**/*", "input": "<%= MAIN_SRC_DIR %>swagger-ui/", "output": "swagger-ui" }
"<%= MAIN_SRC_DIR %>robots.txt"
],
"styles": ["<%= MAIN_SRC_DIR %>content/scss/vendor.scss", "<%= MAIN_SRC_DIR %>content/scss/global.scss"],
"scripts": []
Expand Down
1 change: 0 additions & 1 deletion generators/client/templates/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"ngx-infinite-scroll": "10.0.1",
"ngx-webstorage": "9.0.0",
"rxjs": "7.5.5",
"swagger-ui-dist": "4.6.2",
"tslib": "2.3.1",
"zone.js": "0.11.4"
},
Expand Down
2 changes: 1 addition & 1 deletion generators/client/templates/angular/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"ngx-webstorage": "<%= dependabotPackageJson.dependencies['ngx-webstorage'] %>",
"@popperjs/core": "<%= dependabotPackageJson.dependencies['@popperjs/core'] %>",
"rxjs": "<%= dependabotPackageJson.dependencies['rxjs'] %>",
"swagger-ui-dist": "<%= dependabotPackageJson.dependencies['swagger-ui-dist'] %>",
<%_ if (websocket === 'spring-websocket') { _%>
"sockjs-client": "1.5.0",
"webstomp-client": "1.2.6",
Expand Down Expand Up @@ -127,6 +126,7 @@
"postcss-rtlcss": "<%= dependabotPackageJson.devDependencies['postcss-rtlcss'] %>",
<%_ } _%>
"rimraf": "<%= dependabotPackageJson.devDependencies['rimraf'] %>",
"swagger-ui-dist": "<%= dependabotPackageJson.devDependencies['swagger-ui-dist'] %>",
"ts-jest": "<%= dependabotPackageJson.devDependencies['ts-jest'] %>",
"typescript": "<%= dependabotPackageJson.devDependencies['typescript'] %>",
"webpack-bundle-analyzer": "<%= dependabotPackageJson.devDependencies['webpack-bundle-analyzer'] %>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const ESLintPlugin = require('eslint-webpack-plugin');
const environment = require('./environment');
const proxyConfig = require('./proxy.conf');


module.exports = async (config, options, targetOptions) => {
<%_ if (enableTranslation) { _%>
const languagesHash = await hashElement(path.resolve(__dirname, '../<%= MAIN_SRC_DIR %>i18n'), {
Expand Down Expand Up @@ -111,6 +110,18 @@ module.exports = async (config, options, targetOptions) => {
}

const patterns = [
{
// https://github.com/swagger-api/swagger-ui/blob/v4.6.1/swagger-ui-dist-package/README.md
context: require('swagger-ui-dist').getAbsoluteFSPath(),
from: '*.{js,css,html,png}',
to: 'swagger-ui/',
globOptions: { ignore: ['**/index.html'] },
},
{
from: require.resolve('axios/dist/axios.min.js'),
to: 'swagger-ui/',
},
{ from: './<%= CLIENT_MAIN_SRC_DIR %>swagger-ui/', to: 'swagger-ui/' },
// jhipster-needle-add-assets-to-webpack - JHipster will add/remove third-party resources in this array
];

Expand Down
5 changes: 3 additions & 2 deletions generators/client/templates/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"babel-loader": "8.2.3",
"babel-plugin-istanbul": "6.1.1",
"cypress": "9.5.2",
"eslint-plugin-cypress": "2.12.1",
"cypress-audit": "1.1.0",
"eslint-plugin-cypress": "2.12.1",
"lighthouse": "9.5.0",
"nyc": "15.1.0"
"nyc": "15.1.0",
"swagger-ui-dist": "4.6.2"
},
"dependencies": {
"dayjs": "1.11.0"
Expand Down
1 change: 0 additions & 1 deletion generators/client/templates/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"source-map-loader": "3.0.1",
"sourcemap-istanbul-instrumenter-loader": "0.2.0",
"style-loader": "3.3.1",
"swagger-ui-dist": "4.6.2",
"terser-webpack-plugin": "5.3.1",
"thread-loader": "3.0.4",
"ts-jest": "27.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@import "~bootswatch/dist/<%= clientTheme %>/variables";
<%_ } _%>
// Import Bootstrap source files from node_modules
@import "node_modules/bootstrap/scss/bootstrap";
@import "~bootstrap/scss/bootstrap";
<%_ if (!clientThemeNone) { _%>
@import "~bootswatch/dist/<%= clientTheme %>/bootswatch";
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,16 @@ return merge(
patterns: [
<%_ if (applicationTypeGateway || applicationTypeMonolith) { _%>
{
context: './node_modules/swagger-ui-dist/',
// https://github.com/swagger-api/swagger-ui/blob/v4.6.1/swagger-ui-dist-package/README.md
context: require('swagger-ui-dist').getAbsoluteFSPath(),
from: '*.{js,css,html,png}',
to: 'swagger-ui/',
globOptions: { ignore: ['**/index.html'] },
},
{ from: './node_modules/axios/dist/axios.min.js', to: 'swagger-ui/' },
{
from: require.resolve('axios/dist/axios.min.js'),
to: 'swagger-ui/',
},
{ from: './<%= MAIN_SRC_DIR %>swagger-ui/', to: 'swagger-ui/' },
<%_ } _%>
{ from: './<%= MAIN_SRC_DIR %>content/', to: 'content/' },
Expand Down
1 change: 0 additions & 1 deletion generators/client/templates/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"bootstrap": "4.6.1",
"bootstrap-vue": "2.21.2",
"bootswatch": "5.1.3",
"swagger-ui-dist": "4.6.2",
"vue": "2.6.14",
"vue-class-component": "7.2.6",
"vue-cookie": "1.1.4",
Expand Down
2 changes: 1 addition & 1 deletion generators/client/templates/vue/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"bootswatch": "<%= dependabotPackageJson.dependencies['bootswatch'] %>",
<%_ } _%>
"dayjs": "<%= dependabotPackageJson.dependencies['dayjs'] %>",
"swagger-ui-dist": "<%= dependabotPackageJson.dependencies['swagger-ui-dist'] %>",
<%_ if (communicationSpringWebsocket) { _%>
"sockjs-client": "1.5.2",
"@stomp/rx-stomp": "1.1.4",
Expand Down Expand Up @@ -115,6 +114,7 @@
"sass": "<%= dependabotPackageJson.devDependencies['sass'] %>",
"sass-loader": "<%= dependabotPackageJson.devDependencies['sass-loader'] %>",
"sinon": "<%= dependabotPackageJson.devDependencies['sinon'] %>",
"swagger-ui-dist": "<%= dependabotPackageJson.devDependencies['swagger-ui-dist'] %>",
"terser-webpack-plugin": "<%= dependabotPackageJson.devDependencies['terser-webpack-plugin'] %>",
"ts-jest": "<%= dependabotPackageJson.devDependencies['ts-jest'] %>",
"ts-loader": "<%= dependabotPackageJson.devDependencies['ts-loader'] %>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
],
testResultsProcessor: 'jest-sonar-reporter',
testMatch: ['<rootDir>/<%= CLIENT_TEST_SRC_DIR %>spec/**/@(*.)@(spec.ts)'],
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
snapshotSerializers: ['jest-serializer-vue'],
globals: {
<%_ if (enableTranslation) { _%>
I18N_HASH: 'generated_hash',
Expand Down
3 changes: 0 additions & 3 deletions generators/client/templates/vue/tsconfig.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es7", "dom"],
"typeRoots": [
"node_modules/@types"
],
"paths": {
"@/*": ["*"]
},
Expand Down
8 changes: 6 additions & 2 deletions generators/client/templates/vue/webpack/webpack.common.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,16 @@ module.exports = async (env, options) => {
new CopyWebpackPlugin({
patterns: [
{
context: './node_modules/swagger-ui-dist/',
// https://github.com/swagger-api/swagger-ui/blob/v4.6.1/swagger-ui-dist-package/README.md
context: require('swagger-ui-dist').getAbsoluteFSPath(),
from: '*.{js,css,html,png}',
to: 'swagger-ui/',
globOptions: { ignore: ['**/index.html'] },
},
{ from: './node_modules/axios/dist/axios.min.js', to: 'swagger-ui/' },
{
from: require.resolve('axios/dist/axios.min.js'),
to: 'swagger-ui/',
},
{ from: './<%= CLIENT_MAIN_SRC_DIR %>swagger-ui/', to: 'swagger-ui/' },
{ from: './<%= CLIENT_MAIN_SRC_DIR %>content/', to: 'content/' },
{ from: './<%= CLIENT_MAIN_SRC_DIR %>favicon.ico', to: 'favicon.ico' },
Expand Down
2 changes: 1 addition & 1 deletion generators/common/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"concurrently": "7.0.0",
"husky": "7.0.4",
"lint-staged": "12.3.5",
"npm": "8.4.1",
"npm": "8.5.4",
"wait-on": "6.0.1"
}
}
1 change: 1 addition & 0 deletions generators/workspaces/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ module.exports = class extends BaseBlueprintGenerator {
packages: this.packages,
},
devDependencies: {
rxjs: '^7', // Not required, workaround https://github.com/npm/cli/issues/4437
concurrently: this.dependabotPackageJson.devDependencies.concurrently,
},
scripts: {
Expand Down