ensure changes work with latest master
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
"docusaurus-pushfeedback": "^1.0.0",
|
||||
"luxon": "^3.0.0",
|
||||
"prism-react-renderer": "^2.1.0",
|
||||
"react": "^18.0.2",
|
||||
"react-dom": "^18.0.2",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"sass": "^1.57.1",
|
||||
"swc-loader": "^0.2.3"
|
||||
},
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
"dependencies": {
|
||||
"@backstage/core-plugin-api": "workspace:^",
|
||||
"@backstage/frontend-plugin-api": "workspace:^",
|
||||
"@backstage/version-bridge": "workspace:^"
|
||||
"@backstage/version-bridge": "workspace:^",
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage-community/plugin-puppetdb": "^0.1.18",
|
||||
|
||||
@@ -77,7 +77,8 @@ describe('<ErrorBoundary/>', () => {
|
||||
/^The above error occurred in the <Bomb> component:/,
|
||||
),
|
||||
expect.stringMatching(/^ErrorBoundary/),
|
||||
expect.stringMatching(/Warning: findDOMNode/), // React warning, unfortunate but currently true
|
||||
]);
|
||||
expect(error.length).toEqual(4);
|
||||
expect(error.length).toEqual(5);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,17 +40,15 @@
|
||||
"@backstage/frontend-plugin-api": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@backstage/version-bridge": "workspace:^",
|
||||
"@material-ui/core": "^4.12.4",
|
||||
"@material-ui/icons": "^4.11.3",
|
||||
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^",
|
||||
"@backstage/plugin-app": "workspace:^",
|
||||
"@backstage/test-utils": "workspace:^",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
"@testing-library/react": "^15.0.0",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@types/react": "^18.0.0",
|
||||
"react": "^18.0.2",
|
||||
"react-dom": "^18.0.2",
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
"@backstage/frontend-app-api": "workspace:^",
|
||||
"@backstage/frontend-plugin-api": "workspace:^",
|
||||
"@backstage/plugin-app": "workspace:^",
|
||||
"@react-hookz/web": "^24.0.0",
|
||||
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
||||
"@react-hookz/web": "^24.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^",
|
||||
|
||||
@@ -27,8 +27,8 @@ type ExtendedPackageJSON = Package['packageJson'] & {
|
||||
|
||||
const desiredLocalVersionsOfDependencies = {
|
||||
'@types/react': '^18.0.0',
|
||||
react: '^18.0.0',
|
||||
'react-dom': '^18.0.0',
|
||||
react: '^18.0.2',
|
||||
'react-dom': '^18.0.2',
|
||||
'react-router-dom': '^6.3.0',
|
||||
};
|
||||
|
||||
@@ -55,6 +55,10 @@ const isDevDependency = (dep: string, packageJson: ExtendedPackageJSON) => {
|
||||
return !!packageJson.devDependencies?.[dep];
|
||||
};
|
||||
|
||||
const isProdDependency = (dep: string, packageJson: ExtendedPackageJSON) => {
|
||||
return !!packageJson.dependencies?.[dep];
|
||||
};
|
||||
|
||||
const isPeerDependency = (dep: string, packageJson: ExtendedPackageJSON) => {
|
||||
return !!packageJson.peerDependencies?.[dep];
|
||||
};
|
||||
@@ -65,6 +69,16 @@ const isStandaloneApplication = (packageJson: ExtendedPackageJSON) => {
|
||||
);
|
||||
};
|
||||
|
||||
const matchesDependency = (dep: string, packageJson: ExtendedPackageJSON) => {
|
||||
return (
|
||||
packageJson.devDependencies &&
|
||||
packageJson.devDependencies[dep] ===
|
||||
desiredLocalVersionsOfDependencies[
|
||||
dep as keyof typeof desiredLocalVersionsOfDependencies
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
const matchesPeerDependency = (
|
||||
dep: string,
|
||||
packageJson: ExtendedPackageJSON,
|
||||
@@ -138,12 +152,20 @@ export default async ({ fix }: { fix: boolean }) => {
|
||||
`Peer dependency ${dep} in ${pkg.packageJson.name} is not listed as a devDependency`,
|
||||
);
|
||||
attemptToApplyFix(() => {
|
||||
delete packageJson.dependencies?.[dep];
|
||||
packageJson.devDependencies = packageJson.devDependencies || {};
|
||||
packageJson.devDependencies[dep] =
|
||||
desiredLocalVersionsOfDependencies[
|
||||
dep as keyof typeof desiredLocalVersionsOfDependencies
|
||||
];
|
||||
});
|
||||
} else if (isProdDependency(dep, packageJson)) {
|
||||
console.error(
|
||||
`Peer dependency ${dep} in ${pkg.packageJson.name} is listed as a dependency`,
|
||||
);
|
||||
attemptToApplyFix(() => {
|
||||
delete packageJson.dependencies?.[dep];
|
||||
});
|
||||
}
|
||||
|
||||
const groups = groupsOfPeerDependencies.filter(group =>
|
||||
@@ -167,6 +189,19 @@ export default async ({ fix }: { fix: boolean }) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (!matchesDependency(dep, packageJson)) {
|
||||
console.error(
|
||||
`Incorrect dependency ${dep} in ${pkg.packageJson.name}`,
|
||||
);
|
||||
attemptToApplyFix(() => {
|
||||
packageJson.devDependencies = packageJson.devDependencies || {};
|
||||
packageJson.devDependencies[dep] =
|
||||
desiredLocalVersionsOfDependencies[
|
||||
dep as keyof typeof desiredLocalVersionsOfDependencies
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
if (!matchesPeerDependency(dep, packageJson)) {
|
||||
console.error(
|
||||
`Incorrect peer dependency ${dep} in ${pkg.packageJson.name}`,
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@testing-library/user-event": "^14.0.0",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"cross-env": "^7.0.0"
|
||||
},
|
||||
"bundled": true
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
"start": "backstage-cli package start",
|
||||
"test": "backstage-cli package test"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
"@material-ui/core": "^4.9.13",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "^4.0.0-alpha.61",
|
||||
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -57,8 +56,8 @@
|
||||
"@testing-library/user-event": "^14.0.0",
|
||||
"@types/react": "^18.0.0",
|
||||
"msw": "^1.0.0",
|
||||
"react": "^^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react": "^18.0.2",
|
||||
"react-dom": "^18.0.2",
|
||||
"react-router-dom": "^6.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
"react-router-dom": "^6.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
|
||||
@@ -46,6 +46,21 @@
|
||||
"@backstage/types": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^"
|
||||
"@backstage/cli": "workspace:^",
|
||||
"@types/react": "^18.0.0",
|
||||
"react": "^18.0.2",
|
||||
"react-dom": "^18.0.2",
|
||||
"react-router-dom": "^6.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@testing-library/user-event": "^14.0.0",
|
||||
"@types/dompurify": "^3.0.0",
|
||||
"@types/event-source-polyfill": "^1.0.0",
|
||||
"@types/react": "^18.0.0",
|
||||
"canvas": "^2.10.2",
|
||||
"react": "^18.0.2",
|
||||
|
||||
Reference in New Issue
Block a user