Skip to content

Commit

Permalink
Merge pull request #1507 from boxwise/downgrade-pnpm-until-dependabot…
Browse files Browse the repository at this point in the history
…-fix-lockfile-v9-bug

Downgrade `pnpm` so Dependabot can read the lockfile
  • Loading branch information
fhenrich33 authored Sep 11, 2024
2 parents 14af489 + d534537 commit 1c7ce82
Show file tree
Hide file tree
Showing 6 changed files with 16,858 additions and 18,259 deletions.
18 changes: 8 additions & 10 deletions front/src/hooks/useAssignBoxesToShipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const useAssignBoxesToShipment = () => {
.then(({ data, errors }) => {
setIsLoading(false);
if ((errors?.length || 0) > 0) {
const errorCode = errors ? errors[0].extensions.code : undefined;
const errorCode = errors ? errors[0].extensions?.code : undefined;
// Example: the user is not of the sending base
if (errorCode === "FORBIDDEN") {
if (showErrors)
Expand Down Expand Up @@ -168,9 +168,8 @@ export const useAssignBoxesToShipment = () => {
if (assignedBoxes.length) {
if (showToasts)
createToast({
message: `${
assignedBoxes.length === 1 ? "A Box was" : `${assignedBoxes.length} Boxes were`
} successfully assigned to the shipment.`,
message: `${assignedBoxes.length === 1 ? "A Box was" : `${assignedBoxes.length} Boxes were`
} successfully assigned to the shipment.`,
});
}
// Not all Boxes were assigned
Expand Down Expand Up @@ -232,7 +231,7 @@ export const useAssignBoxesToShipment = () => {
.then(({ data, errors }) => {
setIsLoading(false);
if ((errors?.length || 0) > 0) {
const errorCode = errors ? errors[0].extensions.code : undefined;
const errorCode = errors ? errors[0].extensions?.code : undefined;
// Example: the user is not of the sending base
if (errorCode === "FORBIDDEN") {
if (showToastMessage)
Expand Down Expand Up @@ -290,11 +289,10 @@ export const useAssignBoxesToShipment = () => {
if (unassignedBoxes.length) {
if (showToastMessage)
createToast({
message: `${
unassignedBoxes.length === 1
? "A Box was"
: `${unassignedBoxes.length} Boxes were`
} successfully removed from the shipment.`,
message: `${unassignedBoxes.length === 1
? "A Box was"
: `${unassignedBoxes.length} Boxes were`
} successfully removed from the shipment.`,
});
}
// Not all Boxes were unassigned
Expand Down
2 changes: 1 addition & 1 deletion front/src/hooks/useLabelIdentifierResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const useLabelIdentifierResolver = () => {
})
.then(({ data, errors }) => {
if ((errors?.length || 0) > 0) {
const errorCode = errors ? errors[0].extensions.code : undefined;
const errorCode = errors ? errors[0].extensions?.code : undefined;
if (errorCode === "FORBIDDEN") {
return {
kind: ILabelIdentifierResolverResultKind.NOT_AUTHORIZED,
Expand Down
2 changes: 1 addition & 1 deletion front/src/hooks/useQrResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const useQrResolver = () => {
})
.then(({ data, errors }) => {
if ((errors?.length || 0) > 0) {
const errorCode = errors ? errors[0].extensions.code : undefined;
const errorCode = errors ? errors[0].extensions?.code : undefined;
if (errorCode === "FORBIDDEN") {
triggerError({
message: "You don't have permission to access this box!",
Expand Down
2 changes: 1 addition & 1 deletion front/src/views/BoxCreate/BoxCreateView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function BoxCreateView() {
})
.then((mutationResult) => {
if (mutationResult.errors) {
const errorCode = mutationResult.errors[0].extensions.code;
const errorCode = mutationResult.errors[0].extensions?.code;
if (errorCode === "BAD_USER_INPUT") {
triggerError({
message: "The QR code is already used for another box.",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"license": "Apache-2.0",
"packageManager": "pnpm@9.6.0+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e",
"packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
"scripts": {
"format:check:all": "pnpm format:check \"+(front|shared-components|statviz)/**/*.{js,json,ts,tsx}\" ",
"format:check": "prettier --check --ignore-path .eslintignore",
Expand All @@ -27,21 +27,21 @@
"@nivo/core": "0.84.0",
"@nivo/pie": "0.84.0",
"@nivo/sankey": "0.84.0",
"@nivo/sunburst": "0.84.0",
"@nivo/sunburst": "0.87.0",
"@tidyjs/tidy": "^2.5.2",
"@visx/axis": "^3.3.0",
"@visx/event": "^3.3.0",
"@visx/grid": "^3.3.0",
"@visx/group": "^3.3.0",
"@visx/mock-data": "^3.3.0",
"@visx/responsive": "^3.3.0",
"@visx/responsive": "^3.10.2",
"@visx/scale": "^3.3.0",
"@visx/shape": "^3.3.0",
"@visx/tooltip": "^3.3.0",
"chakra-react-select": "^4.4.3",
"date-fns": "^2.29.3",
"dom-to-image-more": "^3.2.0",
"framer-motion": "^10.15.1",
"dom-to-image-more": "^3.4.3",
"framer-motion": "^11.5.2",
"graphql": "^16.8.1",
"lodash": "^4.17.21",
"react": "^18.3.1",
Expand Down
Loading

0 comments on commit 1c7ce82

Please sign in to comment.