graph-algorithm/maximum-matching

View on GitHub
package.json

Summary

Maintainability
Test Coverage
{
  "name": "@graph-algorithm/maximum-matching",
  "description": "Maximum matching algorithms for JavaScript",
  "version": "3.0.0",
  "license": "AGPL-3.0",
  "author": "make-github-pseudonymous-again",
  "homepage": "https://graph-algorithm.github.io/maximum-matching",
  "repository": {
    "type": "git",
    "url": "https://github.com/graph-algorithm/maximum-matching"
  },
  "bugs": {
    "url": "https://github.com/graph-algorithm/maximum-matching/issues"
  },
  "keywords": [
    "algorithm",
    "graph",
    "javascript",
    "matching",
    "maximum"
  ],
  "sideEffects": false,
  "type": "module",
  "source": "src/index.js",
  "main": "dist/default/index.cjs",
  "module": "dist/module/index.js",
  "esmodule": "dist/module/index.js",
  "exports": {
    ".": {
      "browser": "./dist/browser/index.cjs",
      "node": "./dist/node/index.cjs",
      "default": "./dist/default/index.cjs"
    },
    "./*.js": {
      "browser": "./dist/browser/*.cjs",
      "node": "./dist/node/*.cjs",
      "default": "./dist/default/*.cjs"
    }
  },
  "files": [
    "dist"
  ],
  "publishConfig": {
    "access": "public"
  },
  "scripts": {
    "build": "npm-run-all --parallel build:*",
    "build-cmd": "babel --delete-dir-on-start --source-maps --minified src",
    "build-docs": "esdoc",
    "build-gh-pages": "npm run build-docs",
    "build:browser": "npm run build-cmd -- --env-name browser --out-dir dist/browser --out-file-extension .cjs",
    "build:default": "npm run build-cmd -- --env-name production --out-dir dist/default --out-file-extension .cjs",
    "build:module": "npm run build-cmd -- --env-name module --out-dir dist/module",
    "build:node": "npm run build-cmd -- --env-name node --out-dir dist/node --out-file-extension .cjs",
    "commit-msg": "commitlint --edit",
    "cover": "NODE_ENV=cover c8 --all --src src --reporter lcov --reporter text-summary --reporter text npm test",
    "debug": "NODE_ENV=debug npm run test -- -st --fail-fast",
    "dev": "npm run lint-config-and-fix && npm run lint-and-fix && npm run cover -- -- -st --fail-fast",
    "install-hooks": "husky",
    "lint": "xo",
    "lint-and-fix": "npm run lint -- --fix",
    "lint-config": "fixpack --dryRun",
    "lint-config-and-fix": "fixpack || fixpack",
    "postinstall": "npm run install-hooks",
    "postpublish": "pinst --enable",
    "precommit": "lint-staged",
    "prepare": "npm run build",
    "prepublishOnly": "pinst --disable",
    "release": "np --message ':hatching_chick: release: Bumping to v%s.'",
    "test": "npm run test:src",
    "test-cmd": "NODE_LOADER_CONFIG=test/loader/config.js ava",
    "test:browser": "IMPORT_MAP_PATH=test/import-maps/dist/index.browser.json npm run test-cmd",
    "test:default": "IMPORT_MAP_PATH=test/import-maps/dist/index.default.json npm run test-cmd",
    "test:dist": "npm run test:browser && npm run test:module && npm run test:node && npm run test:default",
    "test:module": "IMPORT_MAP_PATH=test/import-maps/dist/index.module.json npm run test-cmd",
    "test:node": "IMPORT_MAP_PATH=test/import-maps/dist/index.node.json npm run test-cmd",
    "test:src": "IMPORT_MAP_PATH=test/import-maps/src/index.json npm run test-cmd"
  },
  "dependencies": {},
  "devDependencies": {
    "@babel/cli": "7.25.9",
    "@babel/core": "7.26.0",
    "@babel/preset-env": "7.26.0",
    "@commitlint/cli": "19.5.0",
    "@iterable-iterator/zip": "1.0.1",
    "@js-library/commitlint-config": "0.0.4",
    "@node-loader/babel": "2.1.0",
    "@node-loader/core": "2.0.0",
    "@node-loader/import-maps": "1.1.0",
    "ava": "6.2.0",
    "babel-plugin-replace-import-extension": "1.1.4",
    "babel-plugin-transform-remove-console": "6.9.4",
    "babel-plugin-unassert": "3.2.0",
    "babel-preset-minify": "0.5.2",
    "babel-preset-power-assert": "3.0.0",
    "c8": "10.1.2",
    "esdoc": "1.1.0",
    "esdoc-inject-script-plugin": "1.0.0",
    "esdoc-inject-style-plugin": "1.0.0",
    "esdoc-standard-plugin": "1.0.0",
    "fixpack": "4.0.0",
    "husky": "9.1.6",
    "lint-staged": "15.2.10",
    "np": "10.0.7",
    "npm-run-all2": "7.0.1",
    "pinst": "3.0.0",
    "power-assert": "1.6.1",
    "regenerator-runtime": "0.14.1",
    "xo": "0.59.3"
  },
  "ava": {
    "files": [
      "test/src/**/*"
    ],
    "nodeArguments": [
      "--import=data:text/javascript,import {register} from 'node:module'; import {pathToFileURL} from 'node:url'; register('@node-loader/core', pathToFileURL('./'))"
    ],
    "require": [
      "regenerator-runtime/runtime.js"
    ],
    "timeout": "1m"
  },
  "babel": {
    "sourceMaps": true,
    "plugins": [
      [
        "transform-remove-console",
        {
          "exclude": [
            "log",
            "error",
            "warn"
          ]
        }
      ]
    ],
    "env": {
      "debug": {
        "sourceMaps": "both",
        "presets": [
          "babel-preset-power-assert"
        ],
        "plugins": [
          [
            "transform-remove-console",
            {
              "exclude": [
                "debug",
                "log",
                "error",
                "warn"
              ]
            }
          ]
        ]
      },
      "test": {
        "sourceMaps": "both",
        "presets": [
          "babel-preset-power-assert"
        ]
      },
      "cover": {
        "sourceMaps": "both",
        "presets": [
          "babel-preset-power-assert"
        ]
      },
      "development": {
        "presets": [
          [
            "@babel/preset-env",
            {
              "targets": [
                "defaults",
                "maintained node versions"
              ]
            }
          ],
          "babel-preset-power-assert"
        ]
      },
      "production": {
        "presets": [
          [
            "@babel/preset-env",
            {
              "targets": [
                "defaults",
                "maintained node versions"
              ]
            }
          ],
          [
            "minify",
            {
              "builtIns": false
            }
          ]
        ],
        "plugins": [
          "babel-plugin-unassert",
          [
            "replace-import-extension",
            {
              "extMapping": {
                ".js": ".cjs"
              }
            }
          ],
          [
            "@babel/plugin-transform-modules-commonjs",
            {
              "loose": true
            }
          ]
        ]
      },
      "browser": {
        "presets": [
          [
            "@babel/preset-env",
            {
              "targets": [
                "defaults"
              ]
            }
          ],
          [
            "minify",
            {
              "builtIns": false
            }
          ]
        ],
        "plugins": [
          "babel-plugin-unassert",
          [
            "replace-import-extension",
            {
              "extMapping": {
                ".js": ".cjs"
              }
            }
          ],
          [
            "@babel/plugin-transform-modules-commonjs",
            {
              "loose": true
            }
          ]
        ]
      },
      "module": {
        "presets": [
          [
            "@babel/preset-env",
            {
              "bugfixes": true,
              "modules": false,
              "targets": {
                "esmodules": true
              }
            }
          ],
          [
            "minify",
            {
              "builtIns": false
            }
          ]
        ],
        "plugins": [
          "babel-plugin-unassert"
        ]
      },
      "node": {
        "presets": [
          [
            "@babel/preset-env",
            {
              "targets": [
                "maintained node versions"
              ]
            }
          ],
          [
            "minify",
            {
              "builtIns": false
            }
          ]
        ],
        "plugins": [
          "babel-plugin-unassert",
          [
            "replace-import-extension",
            {
              "extMapping": {
                ".js": ".cjs"
              }
            }
          ],
          [
            "@babel/plugin-transform-modules-commonjs",
            {
              "loose": true
            }
          ]
        ]
      }
    }
  },
  "lint-staged": {
    "*.js": [
      "npm run lint-and-fix"
    ],
    "package.json": [
      "npm run lint-config-and-fix"
    ]
  },
  "prettier": {
    "trailingComma": "all"
  },
  "xo": {
    "prettier": true,
    "rules": {
      "camelcase": "off",
      "unicorn/filename-case": [
        "error",
        {
          "case": "camelCase"
        }
      ],
      "no-bitwise": "off",
      "unicorn/no-new-array": "off",
      "unicorn/prefer-node-protocol": "off",
      "unicorn/prevent-abbreviations": "off",
      "import/order": [
        "error",
        {
          "groups": [
            "builtin",
            "external",
            "internal",
            "parent",
            "sibling",
            "index",
            "object",
            "type"
          ],
          "pathGroups": [
            {
              "pattern": "ava",
              "group": "external",
              "position": "before"
            },
            {
              "pattern": "#module",
              "group": "index",
              "position": "after"
            }
          ],
          "pathGroupsExcludedImportTypes": [],
          "distinctGroup": true,
          "newlines-between": "always",
          "alphabetize": {
            "order": "asc",
            "orderImportKind": "asc",
            "caseInsensitive": false
          },
          "warnOnUnassignedImports": true
        }
      ]
    },
    "overrides": [
      {
        "files": [
          "doc/**"
        ],
        "env": "browser"
      }
    ]
  }
}