Browse Source

SONAR-15297 Fix sonar-web build

tags/9.1.0.47736
Wouter Admiraal 2 years ago
parent
commit
14a3299ae5

+ 0
- 4
build.gradle View File

@@ -657,10 +657,6 @@ subprojects {
// their concurrent execution even in case when one or more of these tasks not
// scheduled.
def yarnInstallTasks = allprojects.findResults { it -> it.tasks.findByName('yarn') }

// Drop :server:sonar-ui-common:yarn from the list because it will be creating a circular dependency
yarnInstallTasks.eachWithIndex { t, i -> if (t.path == ':server:sonar-ui-common:yarn') yarnInstallTasks.remove(i) }

yarnInstallTasks.drop(1).eachWithIndex { it, i -> it.mustRunAfter(yarnInstallTasks[0..i]) }

// by default, Yarn will update lock file if it is not up to date with "package.json"

+ 4
- 2
server/sonar-web/config/jest/SetupTestEnvironment.ts View File

@@ -17,9 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import ThemeContext from 'sonar-ui-common/components/theme';
import SonarUiCommonInitializer, { DEFAULT_LOCALE } from 'sonar-ui-common/helpers/init';
import * as theme from '../../src/main/js/app/theme';
import ThemeContext from '../../src/main/js/sonar-ui-common/components/theme';
import SonarUiCommonInitializer, {
DEFAULT_LOCALE
} from '../../src/main/js/sonar-ui-common/helpers/init';

const content = document.createElement('div');
content.id = 'content';

+ 0
- 6
server/sonar-web/config/webpack.config.js View File

@@ -41,12 +41,6 @@ module.exports = ({ production = true, release = false }) => {
// import from 'Docs/foo.md' is rewritten to import from 'sonar-docs/src/foo.md'
alias: {
Docs: path.resolve(__dirname, '../../sonar-docs/src'),
// This avoid having multi instance of @emotion when developing with yarn link on sonar-ui-common
'@emotion': path.resolve(__dirname, '../node_modules/@emotion'),
// This avoid having multi instance of react when developing with yarn link on sonar-ui-common
// See https://reactjs.org/warnings/invalid-hook-call-warning.html
react: path.resolve(__dirname, '../node_modules/react'),
'react-dom': path.resolve(__dirname, '../node_modules/react-dom'),
// d3-selection exports an event object, which requires live-binding.
// In order to support this, we need to tell Webpack to NOT look into
// the dist/ folder of this module, but in the src/ folder instead.

+ 22
- 5
server/sonar-web/package.json View File

@@ -8,12 +8,19 @@
"@emotion/core": "10.0.28",
"@emotion/styled": "10.0.27",
"classnames": "2.2.6",
"clipboard": "2.0.6",
"core-js": "3.6.4",
"create-react-class": "15.6.3",
"d3-array": "2.4.0",
"d3-hierarchy": "1.1.9",
"d3-scale": "3.2.1",
"d3-selection": "1.4.1",
"d3-shape": "1.3.7",
"d3-zoom": "1.8.3",
"date-fns": "1.30.1",
"dompurify": "2.2.7",
"emotion-theming": "10.0.27",
"formik": "1.2.0",
"history": "3.3.0",
"keymaster": "1.6.2",
"lodash": "4.17.21",
@@ -27,8 +34,10 @@
"react-draggable": "4.2.0",
"react-helmet-async": "1.0.4",
"react-intl": "2.8.0",
"react-modal": "3.8.2",
"react-redux": "5.1.1",
"react-router": "3.2.6",
"react-select": "1.2.1",
"react-virtualized": "9.21.2",
"redux": "4.0.5",
"redux-thunk": "2.3.0",
@@ -38,7 +47,6 @@
"rehype-slug": "3.0.0",
"remark-custom-blocks": "2.5.1",
"remark-rehype": "6.0.0",
"sonar-ui-common": "../sonar-ui-common/build/dist",
"unist-util-visit": "2.0.2",
"valid-url": "1.0.9",
"whatwg-fetch": "3.0.0"
@@ -54,7 +62,13 @@
"@babel/preset-env": "7.9.0",
"@babel/preset-react": "7.8.3",
"@types/classnames": "2.2.10",
"@types/d3-scale": "2.2.0",
"@types/clipboard": "2.0.1",
"@types/d3-array": "1.2.4",
"@types/d3-hierarchy": "1.1.4",
"@types/d3-scale": "2.0.2",
"@types/d3-selection": "1.3.2",
"@types/d3-shape": "1.2.4",
"@types/d3-zoom": "1.7.3",
"@types/dompurify": "2.2.1",
"@types/enzyme": "3.10.5",
"@types/jest": "25.1.4",
@@ -65,9 +79,11 @@
"@types/react-dom": "16.8.4",
"@types/react-helmet": "5.0.15",
"@types/react-intl": "2.3.17",
"@types/react-modal": "3.8.2",
"@types/react-redux": "6.0.6",
"@types/react-router": "3.0.20",
"@types/react-virtualized": "9.21.8",
"@types/react-select": "1.2.6",
"@types/react-virtualized": "9.21.0",
"@types/sanitize-html": "1.22.0",
"@types/valid-url": "1.0.2",
"@typescript-eslint/eslint-plugin": "4.13.0",
@@ -99,7 +115,8 @@
"glob": "7.1.6",
"glob-promise": "3.4.0",
"html-webpack-plugin": "3.2.0",
"jest": "25.1.0",
"jest": "25.4.0",
"jest-emotion": "10.0.32",
"jest-junit": "12.0.0",
"lint-staged": "7.3.0",
"lodash-webpack-plugin": "0.11.5",
@@ -166,4 +183,4 @@
]
}
}
}
}

+ 1
- 1
server/sonar-web/tsconfig.json View File

@@ -19,5 +19,5 @@
"*": ["./src/main/js/@types/*"]
}
},
"include": ["./src/main/js/**/*", "node_modules/sonar-ui-common/types.d.ts"]
"include": ["./src/main/js/**/*"]
}

+ 807
- 429
server/sonar-web/yarn.lock
File diff suppressed because it is too large
View File


+ 0
- 1
settings.gradle View File

@@ -38,7 +38,6 @@ include 'server:sonar-webserver-es'
include 'server:sonar-webserver-webapi'
include 'server:sonar-webserver-ws'
include 'server:sonar-alm-client'
include 'server:sonar-ui-common'

include 'sonar-application'
include 'sonar-check-api'

Loading…
Cancel
Save