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

build: remove react-scripts 4.0.3 resolution #3739

Merged
merged 4 commits into from
Aug 5, 2024
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
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
2 changes: 1 addition & 1 deletion cypress/support/cucumberPreprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = async function cucumberPreprocessor(on, config) {
test: /\.feature$/,
use: [
{
loader: '@badeball/cypress-cucumber-preprocessor/dist/bundler-utils/webpack',
loader: '@badeball/cypress-cucumber-preprocessor/webpack',
options: config,
},
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"eslint-config-airbnb": "^15.1.0",
"eslint-config-react-app": "^6.0.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-import-resolver-exports": "^1.0.0-beta.5",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-flowtype": "^5.10.0",
"eslint-plugin-import": "2.29.1",
Expand All @@ -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
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.

Loading