Skip to content

Commit

Permalink
build: remove 4.0.3 resolution of react-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
superskip committed Jul 31, 2024
1 parent 67ff51c commit 4aefb54
Show file tree
Hide file tree
Showing 8 changed files with 1,897 additions and 5,042 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
"node": { "extensions": [".js", ".mjs"] },
"webpack": {
"config": "config/eslint/webpack.config.js"
}
},
"exports": {}
},
"import/core-modules": ["rxjs/operators"]
}
Expand Down
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ src/core_modules/capture-core/flow/
module.name_mapper='^capture-core' ->'<PROJECT_ROOT>/src/core_modules/capture-core'
module.name_mapper='^capture-ui' ->'<PROJECT_ROOT>/src/core_modules/capture-ui'
module.name_mapper='^capture-core-utils' ->'<PROJECT_ROOT>/src/core_modules/capture-core-utils'
module.name_mapper='^@dhis2/app-runtime/experimental' ->'<PROJECT_ROOT>/node_modules/@dhis2/app-runtime/build/es/experimental'
module.name_mapper='^@dhis2/rules-engine-javascript' ->'<PROJECT_ROOT>/packages/rules-engine/src'
esproposal.optional_chaining=enable
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"packages/rules-engine"
],
"dependencies": {
"@dhis2/rules-engine-javascript": "100.71.0",
"@dhis2/app-runtime": "^3.9.3",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/d2-icons": "^1.0.1",
"@dhis2/d2-ui-app": "^2.0.0",
"@dhis2/d2-ui-org-unit-tree": "^7.3.3",
"@dhis2/d2-ui-rich-text": "^7.4.0",
"@dhis2/d2-ui-sharing-dialog": "^7.3.3",
"@dhis2/rules-engine-javascript": "100.71.0",
"@dhis2/ui": "^9.10.1",
"@joakim_sm/react-infinite-calendar": "^2.4.2",
"@material-ui/core": "3.9.4",
Expand All @@ -30,6 +30,7 @@
"d2-manifest": "^1.0.0",
"d2-utilizr": "^0.2.15",
"date-fns": "^1.29.0",
"eslint-import-resolver-exports": "^1.0.0-beta.5",
"history": "^5.3.0",
"leaflet": "^1.7.1",
"leaflet-draw": "^1.0.4",
Expand Down Expand Up @@ -133,7 +134,6 @@
"resolutions": {
"@dhis2/cli-app-scripts": "^10.4.0",
"@dhis2/app-runtime": "^3.10.2",
"react-scripts": "4.0.3",
"@babel/preset-react": "7.16.7",
"@dhis2/ui": "^9.10.1",
"@js-temporal/polyfill": "0.4.3",
Expand Down
12 changes: 4 additions & 8 deletions scripts/verifyCacheVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,23 @@ const packageDesc = require('../package');

function verifyMajorCacheVersion(serverVersionAsString) {
if (!serverVersionAsString) {
console.log('Version not specified');
process.exit(1);
throw Error('Version not specified');
}

const serverVersion = Number(serverVersionAsString);
if (Number.isNaN(serverVersion) || !Number.isSafeInteger(serverVersion) || serverVersion <= 30) {
console.log('Invalid app version');
process.exit(1);
throw Error('Invalid app version');
}
}

function verifyMinorCacheVersion(appCacheVersionAsString) {
if (!appCacheVersionAsString) {
console.log('Cache version not specified');
process.exit(1);
throw Error('Cache version not specified');
}

const appCacheVersion = Number(appCacheVersionAsString);
if (Number.isNaN(appCacheVersion) || !Number.isSafeInteger(appCacheVersion) || appCacheVersion >= 1000) {
console.log('Invalid cache version');
process.exit(1);
throw Error('Invalid cache version');
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import React, { useEffect, useRef, useState } from 'react';
import { Plugin } from '@dhis2/app-runtime/build/es/experimental';
import { Plugin } from '@dhis2/app-runtime/experimental';
import type { ComponentProps } from './FormFieldPlugin.types';

export const FormFieldPluginComponent = (props: ComponentProps) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import React, { useEffect, useRef, useState } from 'react';
import { Plugin } from '@dhis2/app-runtime/build/es/experimental';
import { Plugin } from '@dhis2/app-runtime/experimental';
import { useHistory } from 'react-router-dom';

type EnrollmentPluginProps = {|
Expand Down
4 changes: 1 addition & 3 deletions src/core_modules/capture-core/trackerRedux/trackerReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ function wrapReducers(reducer: Reducer<any, Action>, reducerWrappers: ReducerWra
}

function buildReducer(reducerDescription: ReducerDescription) {
const currentEnvironment = process && process.env && process.env.NODE_ENV && process.env.NODE_ENV;

let reducer = currentEnvironment === environments.prod
let reducer = process.env.NODE_ENV === environments.prod
? getProductionReducer(reducerDescription)
: getDevelopmentReducer(reducerDescription);

Expand Down
6,911 changes: 1,885 additions & 5,026 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 4aefb54

Please sign in to comment.