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

fix(unit-test): Document fix to run Vendure tests on Mac and add rollup #2901

Conversation

mschipperheyn
Copy link
Collaborator

Description

I've had problems creating tests for Vendure core. I had to install rollup and deal with a Bindings error. This PR addresses that.

Breaking changes

No

Checklist

📌 Always:

  • [ x] I have set a clear title
  • [x ] My PR is small and contains a single feature
  • [ x] I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • [ x] I have updated the README if needed

Copy link

vercel bot commented Jun 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Jul 16, 2024 0:45am

Copy link

netlify bot commented Jun 15, 2024

Deploy Preview for effervescent-donut-4977b2 canceled.

Name Link
🔨 Latest commit a3b2216
🔍 Latest deploy log https://app.netlify.com/sites/effervescent-donut-4977b2/deploys/666d99662c8d960008a7d169

@michaelbromley
Copy link
Member

Hi, are you able to provide any more context around why rollup is required to be added to the root package.json?

@mschipperheyn
Copy link
Collaborator Author

mschipperheyn commented Jun 19, 2024

Yes, I had two issues trying to run tests on an M3:

So the first one was resolved with installing rollup. I assume its a transitive dependency. All of these, including the sharp error I get sometimes seem to be related to arm64 specific binding stuff.

@michaelbromley
Copy link
Member

Hi Marc,
Thanks for the explanation. Looks good to merge but would you be able to rebase onto the latest master first as there is now a conflict in the lockfile.

@mschipperheyn
Copy link
Collaborator Author

I have merged latest master. But had to run npm install and it did naturally update the package-lock.json. I cannot really oversee if that resulted in an unwanted outcome. My local diff shows a number of additions and changes

Removed

"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
      "version": "1.3.0",
      "extraneous": true,
      "inBundle": true,
      "license": "MIT",
      "engines": {
        "node": ">=12"
      },
      "funding": {
        "url": "https://github.com/sponsors/sindresorhus"
      }
    },
    "node_modules/@swc/wasm": {
      "version": "1.4.7",
      "license": "Apache-2.0",
      "optional": true,
      "peer": true
    },

Added

"node_modules/@esbuild/win32-x64": {
            "version": "0.20.0",
            "cpu": [
                "x64"
            ],
            "dev": true,
            "license": "MIT",
            "optional": true,
            "os": [
                "win32"
            ],
            "engines": {
                "node": ">=12"
            }
        },
        "node_modules/@img/sharp-win32-x64": {
            "version": "0.33.2",
            "cpu": [
                "x64"
            ],
            "license": "Apache-2.0 AND LGPL-3.0-or-later",
            "optional": true,
            "os": [
                "win32"
            ],
            "engines": {
                "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
                "npm": ">=9.6.5",
                "pnpm": ">=7.1.0",
                "yarn": ">=3.2.0"
            },
            "funding": {
                "url": "https://opencollective.com/libvips"
            }
        },
        "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": {
            "version": "3.0.2",
            "cpu": [
                "x64"
            ],
            "dev": true,
            "license": "MIT",
            "optional": true,
            "os": [
                "win32"
            ]
        },
        "node_modules/@swc/core-win32-x64-msvc": {
            "version": "1.4.7",
            "cpu": [
                "x64"
            ],
            "dev": true,
            "license": "Apache-2.0 AND MIT",
            "optional": true,
            "os": [
                "win32"
            ],
            "engines": {
                "node": ">=10"
            }
        },
        "node_modules/vite/node_modules/@esbuild/win32-x64": {
            "version": "0.19.12",
            "cpu": [
                "x64"
            ],
            "license": "MIT",
            "optional": true,
            "os": [
                "win32"
            ],
            "engines": {
                "node": ">=12"
            }
        },

Changed

        "node_modules/@nx/nx-darwin-arm64": {
            "version": "17.2.8",
            "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-17.2.8.tgz",
            "integrity": "sha512-dMb0uxug4hM7tusISAU1TfkDK3ixYmzc1zhHSZwpR7yKJIyKLtUpBTbryt8nyso37AS1yH+dmfh2Fj2WxfBHTg==",
            "cpu": [
                "arm64"
            ],
            "optional": true,
            "os": [
                "darwin"
            ],
            "engines": {
                "node": ">= 10"
            }
        },
        "node_modules/@rollup/rollup-linux-x64-gnu": {
            "version": "4.13.0",
            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz",
            "integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==",
            "cpu": [
                "x64"
            ],
            "optional": true,
            "os": [
                "linux"
            ]
        },
        "node_modules/@rollup/rollup-win32-x64-msvc": {
            "version": "4.13.0",
            "cpu": [
                "x64"
            ],
            "license": "MIT",
            "optional": true,
            "os": [
                "win32"
            ]
        },
        "node_modules/chokidar": {
            "version": "3.6.0",
            "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
            "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
            "dependencies": {
                "anymatch": "~3.1.2",
                "braces": "~3.0.2",
                "glob-parent": "~5.1.2",
                "is-binary-path": "~2.1.0",
                "is-glob": "~4.0.1",
                "normalize-path": "~3.0.0",
                "readdirp": "~3.6.0"
            },
            "engines": {
                "node": ">= 8.10.0"
            },
            "funding": {
                "url": "https://paulmillr.com/funding/"
            },
            "optionalDependencies": {
                "fsevents": "~2.3.2"
            }
        },
        "node_modules/dotenv": {
            "version": "16.4.5",
            "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
            "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
            "engines": {
                "node": ">=12"
            },
            "funding": {
                "url": "https://dotenvx.com"
            }
        },
        "node_modules/fsevents": {
            "version": "2.3.3",
            "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
            "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
            "hasInstallScript": true,
            "optional": true,
            "os": [
                "darwin"
            ],
            "engines": {
                "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
            }
        },
        "node_modules/picocolors": {
            "version": "1.0.0",
            "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
            "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
        },
            "optionalDependencies": {
                "@rollup/rollup-android-arm-eabi": "4.13.0",
                "@rollup/rollup-android-arm64": "4.13.0",
                "@rollup/rollup-darwin-arm64": "4.13.0",
                "@rollup/rollup-darwin-x64": "4.13.0",
                "@rollup/rollup-linux-arm-gnueabihf": "4.13.0",
                "@rollup/rollup-linux-arm64-gnu": "4.13.0",
                "@rollup/rollup-linux-arm64-musl": "4.13.0",
                "@rollup/rollup-linux-riscv64-gnu": "4.13.0",
                "@rollup/rollup-linux-x64-gnu": "4.13.0",
                "@rollup/rollup-linux-x64-musl": "4.13.0",
                "@rollup/rollup-win32-arm64-msvc": "4.13.0",
                "@rollup/rollup-win32-ia32-msvc": "4.13.0",
                "@rollup/rollup-win32-x64-msvc": "4.13.0",
                "fsevents": "~2.3.2"
            }
        },
        "packages/cli/node_modules/strip-bom": {
            "version": "3.0.0",
            "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
            "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
            "engines": {
                "node": ">=4"
            }
        },
        "packages/cli/node_modules/tsconfig-paths": {
            "version": "4.2.0",
            "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz",
            "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==",
            "dependencies": {
                "json5": "^2.2.2",
                "minimist": "^1.2.6",
                "strip-bom": "^3.0.0"
            },
            "engines": {
                "node": ">=6"
            }
        },
        "packages/core/node_modules/brace-expansion": {
            "version": "2.0.1",
            "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
            "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
            "dev": true,
            "dependencies": {
                "balanced-match": "^1.0.0"
            }
        },
        "packages/core/node_modules/brace-expansion": {
            "version": "2.0.1",
            "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
            "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
            "dev": true,
            "dependencies": {
                "balanced-match": "^1.0.0"
            }
        },
        "packages/core/node_modules/glob": {
            "version": "10.3.10",
            "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
            "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
            "dev": true,
            "dependencies": {
                "foreground-child": "^3.1.0",
                "jackspeak": "^2.3.5",
                "minimatch": "^9.0.1",
                "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
                "path-scurry": "^1.10.1"
            },
            "bin": {
                "glob": "dist/esm/bin.mjs"
            },
            "engines": {
                "node": ">=16 || 14 >=14.17"
            },
            "funding": {
                "url": "https://github.com/sponsors/isaacs"
            }
        },
        "packages/core/node_modules/minimatch": {
            "version": "9.0.3",
            "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
            "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
            "dev": true,
            "dependencies": {
                "brace-expansion": "^2.0.1"
            },
            "engines": {
                "node": ">=16 || 14 >=14.17"
            },
            "funding": {
                "url": "https://github.com/sponsors/isaacs"
            }
        },
        "packages/core/node_modules/minipass": {
            "version": "7.0.4",
            "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
            "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
            "dev": true,
            "engines": {
                "node": ">=16 || 14 >=14.17"
            }
        },
        "packages/payments-plugin/node_modules/stripe": {
            "version": "13.11.0",
            "resolved": "https://registry.npmjs.org/stripe/-/stripe-13.11.0.tgz",
            "integrity": "sha512-yPxVJxUzP1QHhHeFnYjJl48QwDS1+5befcL7ju7+t+i88D5r0rbsL+GkCCS6zgcU+TiV5bF9eMGcKyJfLf8BZQ==",
            "dev": true,
            "dependencies": {
                "@types/node": ">=8.1.0",
                "qs": "^6.11.0"
            },
            "engines": {
                "node": ">=12.*"
            }
        },
        "packages/payments-plugin/node_modules/typescript": {
            "version": "5.1.6",
            "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
            "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
            "dev": true,
            "bin": {
                "tsc": "bin/tsc",
                "tsserver": "bin/tsserver"
            },
            "engines": {
                "node": ">=14.17"
            }
        },

@michaelbromley michaelbromley merged commit c2d1ad3 into vendure-ecommerce:master Jul 16, 2024
13 checks passed
@michaelbromley
Copy link
Member

Thanks. All tests passing so I'm happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants