imsnif / synp

Convert yarn.lock to package-lock.json and vice versa
MIT License
757 stars 41 forks source link

workspace dependencies are lost in conversion, package-lock.json is invalid #106

Open terion-name opened 3 months ago

terion-name commented 3 months ago

Issue description:

Using workspaces, synp -w -s yarn.lockwill produce lockfile without dependencies of subprojects, see package apps/app below:

{
  "name": "app-bundle",
  "lockfileVersion": 2,
  "requires": true,
  "packages": {
    "": {
      "name": "app-bundle",
      "workspaces": [
        "apps/*",
        "packages/*"
      ],
      "devDependencies": {
        "@repo/eslint-config": "*",
        "cross-var": "^1.1.0",
        "dotenv-cli": "^7.4.2",
        "eslint": "^8.57.0",
        "prettier": "^3.2.5",
        "prettier-plugin-svelte": "^3.2.2",
        "turbo": "latest",
        "vitepress": "^1.2.3"
      }
    },
    "apps/app": {
      "version": "0.0.1",
      "dev": true
    },
    ....

Are you reporting a conversion error? Please include a link to yarn.lock / package-lock.json:

https://gist.github.com/terion-name/f1f47479b83509f2fbde5619887fb6ad