{
  "_id": "galactus",
  "maintainers": [
    {
      "name": "marshallofsound",
      "email": "samuel.r.attard@gmail.com"
    }
  ],
  "keywords": [
    "prune",
    "production"
  ],
  "dist-tags": {
    "latest": "2.0.2"
  },
  "author": {
    "name": "Samuel Attard"
  },
  "_rev": "10-73bee1be4cd73ece0551a7052dbe648b",
  "description": "Prunes dependencies from your package",
  "readme": "Galactus\n-----------\n\n> A JS implementation of `prune --production`\n\n## Installation\n\n```bash\nnpm i --save-dev galactus\n```\n\n## API\n\n### Class: `DestroyerOfModules`\n\n```js\nimport { DestroyerOfModules } from 'galactus';\n\n// modulePath is the root folder of your module\nconst destroyer = new DestroyerOfModules({\n  rootDirectory: __dirname,\n  // Optionally provide your own walker from 'flora-colossus'\n  walker: myWalker,\n  // Optionally provide a method to override the default\n  // keep or destroy test\n  shouldKeepModuleTest: (module, isDepDep) => true,\n});\n```\n\n#### `destroyer.destroy()`\n\nReturns a `Promise` that resolves once the destruction is complete. By default\nit will destroy all dependencies that aren't required for production or\noptional dependencies. You can override this behavior by providing a\n`shouldKeepModuleTest` function in the constructor.\n\n#### `destroyer.collectKeptModules()`\n\nReturns a `Promise` of a `ModuleMap` (a `Map` of paths to `Module`s). The\n`Promise` resolves when the walker finishes walking the module tree. The\n`ModuleMap` only contains the `Module`s that would be kept by a call\nto `destroy()`.\n\nThere is one optional keyword argument, `relativePaths`. By default, the paths\nin the `ModuleMap` are absolute. If `relativePaths` is `true`, they are relative\nto the `rootDirectory` specified in the constructor.\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/MarshallOfSound/galactus.git"
  },
  "bugs": {
    "url": "https://github.com/MarshallOfSound/galactus/issues"
  },
  "license": "MIT",
  "versions": {
    "0.0.1": {
      "name": "galactus",
      "version": "0.0.1",
      "keywords": [
        "prune",
        "production"
      ],
      "author": {
        "name": "Samuel Attard"
      },
      "license": "MIT",
      "_id": "galactus@0.0.1",
      "maintainers": [
        {
          "name": "marshallofsound",
          "email": "samuel.r.attard@gmail.com"
        }
      ],
      "dist": {
        "shasum": "6f144ec527b3c243478506d7d1112c61f7f540d3",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/galactus/-/galactus-0.0.1.tgz",
        "integrity": "sha512-RsxP5NGSslgwrKTiWGMIvWhr2pxG+rlU68bBXxmLiFxpDzO2ELmS9I+vItyciZQRsynay1QMx0RINF5Clx1oaw==",
        "signatures": [
          {
            "sig": "MEUCIQCPAW8VonmT9lbWnhmBu8NylQFv7HqUJAp/F55VXJ0OywIgDlzUrqoWDvmhl+OKxt5096euP3IjbzOFHfH0aFvz9lc=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ]
      },
      "main": "lib/index.js",
      "_from": ".",
      "_shasum": "6f144ec527b3c243478506d7d1112c61f7f540d3",
      "gitHead": "1a5f78fcf345b68e033838c8960f894d80ade0f7",
      "scripts": {
        "test": "mocha --require ts-node/register test/*_spec.ts",
        "build": "tsc",
        "prepublish": "npm run build"
      },
      "_npmUser": {
        "name": "marshallofsound",
        "email": "samuel.r.attard@gmail.com"
      },
      "_npmVersion": "3.10.8",
      "description": "Prunes dependencies from your package",
      "directories": {},
      "_nodeVersion": "6.9.1",
      "dependencies": {
        "debug": "^3.1.0",
        "fs-extra": "^4.0.0",
        "flora-colossus": "^0.0.2"
      },
      "devDependencies": {
        "chai": "^4.1.2",
        "mocha": "^4.1.0",
        "ts-node": "^4.1.0",
        "typescript": "^2.4.2",
        "@types/chai": "^4.0.10",
        "@types/debug": "^0.0.30",
        "@types/mocha": "^2.2.45",
        "@types/fs-extra": "^4.0.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/galactus-0.0.1.tgz_1514856536630_0.23945051664486527",
        "host": "s3://npm-registry-packages"
      }
    },
    "0.1.0": {
      "name": "galactus",
      "version": "0.1.0",
      "keywords": [
        "prune",
        "production"
      ],
      "author": {
        "name": "Samuel Attard"
      },
      "license": "MIT",
      "_id": "galactus@0.1.0",
      "maintainers": [
        {
          "name": "marshallofsound",
          "email": "samuel.r.attard@gmail.com"
        }
      ],
      "nyc": {
        "require": [
          "ts-node/register"
        ],
        "extension": [
          ".ts"
        ],
        "sourceMap": true,
        "instrument": true
      },
      "dist": {
        "shasum": "d20b74b9233df9982f1748632c91198fc03283a0",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/galactus/-/galactus-0.1.0.tgz",
        "fileCount": 11,
        "integrity": "sha512-gXoS7i/fwu3mQWiWFO4zlQfm8a9a02KetEd2KKJn7dh6FgclT6F8twhUnm9JTK7wTETtxa/FOuxeJDG5xiJy8w==",
        "signatures": [
          {
            "sig": "MEYCIQCQn0C6mVYsHomiIvEO6eQhWOJmzCDmT8qrwJP+fqpNJgIhAOiELQjxz0YF1gLAuhG2KpLUf850haeBXkMtSG6+2J7+",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 67915
      },
      "main": "lib/index.js",
      "gitHead": "a3e7117cdf8b22fe0fbb79ccafd292fce9007d41",
      "scripts": {
        "lint": "tslint src/**/*.ts test/**/*.ts",
        "test": "npm run lint && npm run mocha",
        "build": "tsc",
        "mocha": "nyc mocha test/*_spec.ts",
        "prepublish": "npm run build"
      },
      "_npmUser": {
        "name": "marshallofsound",
        "email": "samuel.r.attard@gmail.com"
      },
      "_npmVersion": "5.5.1",
      "description": "Prunes dependencies from your package",
      "directories": {},
      "_nodeVersion": "8.9.1",
      "dependencies": {
        "debug": "^3.1.0",
        "fs-extra": "^4.0.0",
        "flora-colossus": "^0.0.2"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "nyc": "^11.4.1",
        "chai": "^4.1.2",
        "mocha": "^4.1.0",
        "tempy": "^0.2.1",
        "tslint": "^5.9.1",
        "ts-node": "^4.1.0",
        "typescript": "^2.4.2",
        "@types/chai": "^4.0.10",
        "@types/debug": "^0.0.30",
        "@types/mocha": "^2.2.45",
        "@types/tempy": "^0.1.0",
        "@types/fs-extra": "^4.0.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/galactus_0.1.0_1519708645126_0.7680623699482874",
        "host": "s3://npm-registry-packages"
      }
    },
    "0.2.0": {
      "name": "galactus",
      "version": "0.2.0",
      "keywords": [
        "prune",
        "production"
      ],
      "author": {
        "name": "Samuel Attard"
      },
      "license": "MIT",
      "_id": "galactus@0.2.0",
      "maintainers": [
        {
          "name": "marshallofsound",
          "email": "samuel.r.attard@gmail.com"
        }
      ],
      "nyc": {
        "require": [
          "ts-node/register"
        ],
        "extension": [
          ".ts"
        ],
        "sourceMap": true,
        "instrument": true
      },
      "dist": {
        "shasum": "c3d63ba5502466fe40ea67cc689085b3dd24a8fc",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/galactus/-/galactus-0.2.0.tgz",
        "fileCount": 12,
        "integrity": "sha512-VT16s4bUZbkfqu3rlUgnDmqJICjZjfWNfuWZJuUIzAQvU0kRYAnvGyTjRbfzW4y+A+QD7NFWRgfO1rvRAHki2g==",
        "signatures": [
          {
            "sig": "MEYCIQCqsmGdVMy5KG7vAZAd+bP+Ki38HM9eJwmdJSXlqW0zQQIhAMiR623UmRuQmpjXXWB+K7N+J2WzODrsFE1FVej/G8JU",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 70665
      },
      "main": "lib/index.js",
      "_from": ".",
      "_shasum": "c3d63ba5502466fe40ea67cc689085b3dd24a8fc",
      "gitHead": "20173b108eca82ce979cd4c84b77c82fdaff9b6b",
      "scripts": {
        "lint": "tslint src/**/*.ts test/**/*.ts",
        "test": "npm run lint && npm run mocha",
        "build": "tsc",
        "mocha": "nyc mocha test/*_spec.ts",
        "prepublish": "npm run build"
      },
      "_npmUser": {
        "name": "marshallofsound",
        "email": "samuel.r.attard@gmail.com"
      },
      "_npmVersion": "3.10.10",
      "description": "Prunes dependencies from your package",
      "directories": {},
      "_nodeVersion": "8.9.4",
      "dependencies": {
        "debug": "^3.1.0",
        "fs-extra": "^4.0.0",
        "flora-colossus": "^0.0.2"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "nyc": "^11.4.1",
        "chai": "^4.1.2",
        "mocha": "^4.1.0",
        "tempy": "^0.2.1",
        "tslint": "^5.9.1",
        "ts-node": "^4.1.0",
        "typescript": "^2.4.2",
        "@types/chai": "^4.0.10",
        "@types/debug": "^0.0.30",
        "@types/mocha": "^2.2.45",
        "@types/tempy": "^0.1.0",
        "@types/fs-extra": "^4.0.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/galactus_0.2.0_1521875239799_0.003883713387521359",
        "host": "s3://npm-registry-packages"
      }
    },
    "0.2.1": {
      "name": "galactus",
      "version": "0.2.1",
      "keywords": [
        "prune",
        "production"
      ],
      "author": {
        "name": "Samuel Attard"
      },
      "license": "MIT",
      "_id": "galactus@0.2.1",
      "maintainers": [
        {
          "name": "marshallofsound",
          "email": "samuel.r.attard@gmail.com"
        }
      ],
      "nyc": {
        "require": [
          "ts-node/register"
        ],
        "extension": [
          ".ts"
        ],
        "sourceMap": true,
        "instrument": true
      },
      "dist": {
        "shasum": "cbed2d20a40c1f5679a35908e2b9415733e78db9",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/galactus/-/galactus-0.2.1.tgz",
        "fileCount": 14,
        "integrity": "sha512-mDc8EQJKtxjp9PMYS3PbpjjbX3oXhBTxoGaPahw620XZBIHJ4+nvw5KN/tRtmmSDR9dypstGNvqQ3C29QGoGHQ==",
        "signatures": [
          {
            "sig": "MEUCIFxMx5Aya/pEkpHJmbkco6TFtBRSU6ZE7AxLlq7Sz9h2AiEAuXCJTQzFNNgLfT+FxZ7oprrr5yzUMjtd5vwd3O4mC8Q=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 101663
      },
      "main": "lib/index.js",
      "_from": ".",
      "_shasum": "cbed2d20a40c1f5679a35908e2b9415733e78db9",
      "gitHead": "7b017aec9ade19c622804a5fe6bfd9ba27a059ee",
      "scripts": {
        "lint": "tslint src/**/*.ts test/**/*.ts",
        "test": "npm run lint && npm run mocha",
        "build": "tsc",
        "mocha": "nyc mocha test/*_spec.ts",
        "prepublish": "npm run build"
      },
      "_npmUser": {
        "name": "marshallofsound",
        "email": "samuel.r.attard@gmail.com"
      },
      "_npmVersion": "3.10.10",
      "description": "Prunes dependencies from your package",
      "directories": {},
      "_nodeVersion": "8.9.4",
      "dependencies": {
        "debug": "^3.1.0",
        "fs-extra": "^4.0.0",
        "flora-colossus": "^1.0.0"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "nyc": "^11.4.1",
        "chai": "^4.1.2",
        "mocha": "^4.1.0",
        "tempy": "^0.2.1",
        "tslint": "^5.9.1",
        "ts-node": "^4.1.0",
        "typescript": "^2.4.2",
        "@types/chai": "^4.0.10",
        "@types/debug": "^0.0.30",
        "@types/mocha": "^2.2.45",
        "@types/tempy": "^0.1.0",
        "@types/fs-extra": "^4.0.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/galactus_0.2.1_1523188024385_0.7064753404748438",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.0.0": {
      "name": "galactus",
      "version": "1.0.0",
      "keywords": [
        "prune",
        "production"
      ],
      "author": {
        "name": "Samuel Attard"
      },
      "license": "MIT",
      "_id": "galactus@1.0.0",
      "maintainers": [
        {
          "name": "marshallofsound",
          "email": "samuel.r.attard@gmail.com"
        }
      ],
      "homepage": "https://github.com/marshallOfSound/galactus#readme",
      "bugs": {
        "url": "https://github.com/marshallOfSound/galactus/issues"
      },
      "dist": {
        "shasum": "c2615182afa0c6d0859b92e56ae36d052827db7e",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/galactus/-/galactus-1.0.0.tgz",
        "fileCount": 9,
        "integrity": "sha512-R1fam6D4CyKQGNlvJne4dkNF+PvUUl7TAJInvTGa9fti9qAv95quQz29GXapA4d8Ec266mJJxFVh82M4GIIGDQ==",
        "signatures": [
          {
            "sig": "MEUCIAxstz98zk1rKazifwkJ78DmwRUNc8VUc3GeA7aN/eo0AiEA1Sc9pelw2z0HTSrbZXQDvGHQPen1B6/A5zmGB4CwEIk=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 10688,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZM+4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCQA//X+B56K8OC7SS7CEDHa4Hnkn6wpMMQMLxlIoWdKXTtKdh41SF\r\nKVARLtOpuzduwGOYVKq2JANKFoIsDhZYTqqkNl0LpDgGaFpfxuy99xIssJfj\r\njDfQY3odkSNIzWhDi1KzghNjMpRcrM02imEWCiS0fd17RtlDFSECq6P4GdIl\r\nPDMZcRsKgbLk/UejI/lJadbkRVdRGAIXokiUNgtNB026u4evchPfUxpBCMzA\r\nqVgtaqAQL+kYFquR2GTf3wmpcwtoaC7JoU1XKMyvFtscQyHJpLXpDvl+u1H4\r\nqzqfVnlhACcDUsa/F6kY1cgd6w8TQYRZ8f4vJfrzaKuB/kOvIfi+gcyFNSNf\r\nBo0pvJz6gzoKFhsIlDCnGtVEuEiJsv8QaO8RuE2868kMaQcQ4FRn4VZJLTWp\r\nqTIBG0/12xAq0TxSP77bZ+WzEeJfJikdyaCpQfyOZce9d+R9WmLzW1Z5MRc/\r\nJxSa/Lq/ugwT0HEEXUTkWwrURm27q6VSnJQR2LhBVdNs24drm0Yb5dV1bBtB\r\nwgKFm+pEsavdzHYFUamXr3rjrAtS8kKR5Rkc5tX3XTVUhv2/MdP9kqSvauOj\r\npMND6CKSPFWNlaPDQ4tpYT3zLaYnQq6J1uHTzhdzlpq5VkvaDW5/QN7999zO\r\nWPny+6oQI6kiq/AROJf7HF5dBI4kq4QkT7c=\r\n=jDOf\r\n-----END PGP SIGNATURE-----\r\n"
      },
      "main": "lib/index.js",
      "types": "./lib/index.d.ts",
      "engines": {
        "node": ">= 12"
      },
      "gitHead": "1cb4439f07bf695170e603611717e058bca4c70c",
      "scripts": {
        "lint": "tslint src/**/*.ts test/**/*.ts",
        "test": "npm run lint && npm run mocha",
        "build": "tsc",
        "mocha": "nyc mocha --require ts-node/register test/*_spec.ts",
        "prepublish": "npm run build"
      },
      "_npmUser": {
        "name": "marshallofsound",
        "email": "samuel.r.attard@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/marshallOfSound/galactus.git",
        "type": "git"
      },
      "_npmVersion": "8.5.0",
      "description": "Prunes dependencies from your package",
      "directories": {},
      "_nodeVersion": "16.14.2",
      "dependencies": {
        "debug": "^4.3.4",
        "fs-extra": "^10.1.0",
        "flora-colossus": "^2.0.0"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "nyc": "^15.1.0",
        "chai": "^4.3.6",
        "mocha": "^9.1.0",
        "tempy": "^1.0.0",
        "tslint": "^6.1.3",
        "ts-node": "^10.9.1",
        "typescript": "^4.8.4",
        "@types/chai": "^4.3.3",
        "@types/node": "^12.20.55",
        "@types/debug": "^4.1.7",
        "@types/mocha": "^10.0.0",
        "@types/fs-extra": "^9.0.13",
        "@istanbuljs/nyc-config-typescript": "^1.0.2"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/galactus_1.0.0_1667551160414_0.3245663952082365",
        "host": "s3://npm-registry-packages"
      }
    },
    "2.0.2": {
      "name": "galactus",
      "version": "2.0.2",
      "type": "module",
      "exports": "./dist/index.js",
      "typings": "./dist/index.d.ts",
      "description": "Prunes dependencies from your package",
      "engines": {
        "node": ">=22.12.0"
      },
      "scripts": {
        "build": "tsc",
        "prepublish": "npm run build",
        "lint": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
        "lint:fix": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
        "test": "npm run lint && vitest run",
        "test:watch": "vitest",
        "test:coverage": "vitest run --coverage",
        "prepare": "husky"
      },
      "keywords": [
        "prune",
        "production"
      ],
      "author": {
        "name": "Samuel Attard"
      },
      "license": "MIT",
      "dependencies": {
        "debug": "^4.4.1",
        "flora-colossus": "^3.0.2"
      },
      "devDependencies": {
        "@tsconfig/node22": "^22.0.2",
        "@types/debug": "^4.1.12",
        "@types/node": "^22.0.13",
        "@vitest/coverage-v8": "^3.2.4",
        "husky": "^9.1.7",
        "lint-staged": "^16.1.2",
        "prettier": "^3.6.2",
        "typescript": "^5.8.3",
        "vitest": "^3.2.4"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/MarshallOfSound/galactus.git"
      },
      "bugs": {
        "url": "https://github.com/MarshallOfSound/galactus/issues"
      },
      "homepage": "https://github.com/MarshallOfSound/galactus#readme",
      "lint-staged": {
        "*.ts": [
          "prettier --write"
        ]
      },
      "_id": "galactus@2.0.2",
      "gitHead": "59c122dea088e7363fe30064b0637b4084fd5d75",
      "_nodeVersion": "24.3.0",
      "_npmVersion": "11.4.2",
      "dist": {
        "integrity": "sha512-HmKyTFGomdAchz4umx8MwBnrnfFmdpwiTyGA4ZOF7rya2Lmgbc9qate4yweInL+0gUBVImhaz12SBGpW3SY4Yg==",
        "shasum": "04a4e403e28bdae7622ed7b46519953bb0717098",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/galactus/-/galactus-2.0.2.tgz",
        "fileCount": 9,
        "unpackedSize": 10216,
        "signatures": [
          {
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
            "sig": "MEUCIC2ZBVNh/Y2Oi64kJhqpho/GWKEAPAzHWkldi8D8i06lAiEAiq6olXwUA/BUQtcaU7JIgW48oxUxXYYY7HPikunOI5U="
          }
        ]
      },
      "_npmUser": {
        "name": "marshallofsound",
        "email": "samuel.r.attard@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "marshallofsound",
          "email": "samuel.r.attard@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages-npm-production",
        "tmp": "tmp/galactus_2.0.2_1752470079706_0.12302439871437532"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "galactus",
  "time": {
    "created": "2018-01-02T01:28:56.778Z",
    "modified": "2026-05-22T13:51:59.238Z",
    "0.0.1": "2018-01-02T01:28:56.778Z",
    "0.1.0": "2018-02-27T05:17:25.188Z",
    "0.2.0": "2018-03-24T07:07:19.879Z",
    "0.2.1": "2018-04-08T11:47:04.470Z",
    "1.0.0": "2022-11-04T08:39:20.547Z",
    "2.0.2": "2025-07-14T05:14:39.899Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/MarshallOfSound/galactus#readme"
}