Skip to content

Commit

Permalink
NMS-16477: Replace babel/polyfill with corejs3
Browse files Browse the repository at this point in the history
  • Loading branch information
synqotik committed Sep 11, 2024
1 parent 0230bca commit 53a0813
Show file tree
Hide file tree
Showing 7 changed files with 15,018 additions and 16,210 deletions.
2 changes: 1 addition & 1 deletion core/web-assets/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.24.1
16.15.1
31,158 changes: 14,965 additions & 16,193 deletions core/web-assets/package-lock.json

Large diffs are not rendered by default.

28 changes: 15 additions & 13 deletions core/web-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"@babel/plugin-transform-modules-commonjs": "^7.16.5",
"@babel/plugin-transform-regenerator": "^7.16.5",
"@babel/plugin-transform-runtime": "^7.16.5",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.16.5",
"@babel/preset-typescript": "^7.16.5",
"@babel/runtime-corejs3": "^7.24.8",
"@rangerrick/moment-javaformat": "^2.0.1",
"@types/jest": "^27.0.3",
"@types/lodash": "^4.14.141",
Expand All @@ -33,10 +33,11 @@
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.3",
"babel-plugin-angularjs-annotate": "^0.10.0",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-preset-es2015-nostrict": "^6.6.2",
"cache-loader": "^4.1.0",
"copy-webpack-plugin": "^6.4.1",
"core-js": "^3.38.0",
"css-loader": "^3.2.0",
"cssnano": "^4.1.10",
"eslint": "^6.8.0",
Expand All @@ -45,7 +46,7 @@
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file": "^0.2.2",
"file-loader": "^6.2.0",
"html-loader": "^0.5.5",
"html-loader": "^1.3.2",
"identity-obj-proxy": "^3.0.0",
"imports-loader": "^1.2.0",
"jasmine-core": "^4.0.0",
Expand Down Expand Up @@ -74,7 +75,6 @@
"yargs": "^14.2.3"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.16.5",
"angular": "~1.5.11",
"angular-animate": "~1.5.11",
"angular-bootstrap-checkbox": "^0.5.0",
Expand All @@ -90,9 +90,8 @@
"angular-ui-sortable": "^0.19.0",
"backshift": "git+https://github.com/OpenNMS/backshift.git#v1.3.3",
"bootbox": "^5.5.2",
"bootstrap": "~4.3.1",
"bootstrap": "^4.6.2",
"c3": "^0.4.24",
"core-js": "^3.19.3",
"cron-parser": "^3.5.0",
"cross-env": "^7.0.3",
"d3": "^3.5.17",
Expand All @@ -111,14 +110,15 @@
"jquery-migrate": "^3.3.2",
"jquery-sparkline": "https://github.com/kapusta/jquery.sparkline#2.1.3",
"jquery-treegrid": "^0.3.0",
"jquery-ui": "^1.13.0",
"jquery-ui": "~1.13.3",
"jquery-ui-treemap": "https://github.com/RangerRick/jsTreemap#master",
"jquery.flot.tooltip": "^0.9.0",
"leaflet": "~1.7.1",
"leaflet.markercluster": "^1.5.3",
"loader-utils": "^2.0.4",
"moment": "^2.29.1",
"popper.js": "^1.16.1",
"regenerator-runtime": "^0.13.9",
"regenerator-runtime": "^0.14.0",
"tempusdominus-bootstrap-4": "^5.1.2",
"tempusdominus-core": "^5.0.3",
"ui-bootstrap4": "^3.0.7",
Expand Down Expand Up @@ -165,6 +165,8 @@
"./target/dist/assets",
"./src/main/assets/modules",
"./src/main/assets/js",
"./src/main/assets/js/apps",
"./src/main/assets/js/vendor",
"./src/main/assets/style",
"./node_modules"
],
Expand All @@ -177,16 +179,16 @@
]
},
"scripts": {
"webpack": "cross-env NODE_OPTIONS=--max-old-space-size=4096 webpack --colors --display-error-details --env=development",
"webpack-release": "cross-env NODE_OPTIONS=--max-old-space-size=4096 webpack --colors --display-error-details --env=production",
"webpack": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096 --openssl-legacy-provider\" webpack --colors --display-error-details --env=development",
"webpack-release": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096 --openssl-legacy-provider\" webpack --colors --display-error-details --env=production",
"check-git": "node check-git.js",
"install-deps": "npm --prefer-offline --no-progress --no-audit ci",
"build": "npm run check-git && npm run webpack",
"build-release": "npm run check-git && npm run webpack-release",
"build-verbose": "npm run check-git && npm run lint && cross-env NODE_OPTIONS=--max-old-space-size=4096 webpack --debug --colors --display-modules --display-chunks --display-error-details --display-origins --display-reasons --env=development",
"build-verbose": "npm run check-git && npm run lint && cross-env NODE_OPTIONS=\"--max-old-space-size=4096 --openssl-legacy-provider\" webpack --debug --colors --display-modules --display-chunks --display-error-details --display-origins --display-reasons --env=development",
"release": "npm run lint && npm run build-release",
"watch": "nodetouch package.json && cross-env NODE_OPTIONS=--max-old-space-size=4096 webpack --colors --display-error-details --watch --env=development",
"watch-release": "nodetouch package.json && cross-env NODE_OPTIONS=--max-old-space-size=4096 webpack --colors --display-error-details --watch --env=production",
"watch": "nodetouch package.json && cross-env NODE_OPTIONS=\"--max-old-space-size=4096 --openssl-legacy-provider\" webpack --colors --display-error-details --watch --env=development",
"watch-release": "nodetouch package.json && cross-env NODE_OPTIONS=\"--max-old-space-size=4096 --openssl-legacy-provider\" webpack --colors --display-error-details --watch --env=production",
"lint": "eslint \"src/**/*.[jt]s\"",
"maven-test": "jest --all --verbose --useStderr=false --color=false",
"test": "jest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint no-console: 0 */

const angular = require('vendor/angular-js');
const moment = require('moment-timezone');
require('@rangerrick/moment-javaformat');
const moment = require('vendor/moment-js');


// eslint-disable-next-line @typescript-eslint/no-empty-function
function OnmsDateFormatter() {
Expand Down
28 changes: 28 additions & 0 deletions core/web-assets/src/main/assets/js/vendor/moment-js.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Licensed to The OpenNMS Group, Inc (TOG) under one or more
* contributor license agreements. See the LICENSE.md file
* distributed with this work for additional information
* regarding copyright ownership.
*
* TOG licenses this file to You under the GNU Affero General
* Public License Version 3 (the "License") or (at your option)
* any later version. You may not use this file except in
* compliance with the License. You may obtain a copy of the
* License at:
*
* https://www.gnu.org/licenses/agpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
console.log('init: moment-js'); // eslint-disable-line no-console

const moment = require('moment');
require('moment-timezone');
require('@rangerrick/moment-javaformat/dist/moment-javaformat');

module.exports = moment;
3 changes: 2 additions & 1 deletion core/web-assets/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ var config = {
entry: allEntries,
output: {
path: distdir,
libraryTarget: 'umd'
libraryTarget: 'umd',
hashFunction: 'sha256'
},
target: 'web',
module: {
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1769,9 +1769,14 @@
<skipPdfGeneration>true</skipPdfGeneration>

<!-- nodejs development -->
<!--
<frontendPluginVersion>1.11.0</frontendPluginVersion>
<nodeVersion>v10.24.1</nodeVersion>
<npmVersion>6.14.5</npmVersion>
-->
<frontendPluginVersion>1.14.2</frontendPluginVersion>
<nodeVersion>v18.20.2</nodeVersion>
<npmVersion>9.8.1</npmVersion>

<!-- CI Settings -->
<ci.instance>0</ci.instance>
Expand Down

0 comments on commit 53a0813

Please sign in to comment.