package.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. "name": "baseline-browser-mapping",
  3. "main": "./dist/index.cjs",
  4. "version": "2.8.4",
  5. "description": "A library for obtaining browser versions with their maximum supported Baseline feature set and Widely Available status.",
  6. "exports": {
  7. ".": {
  8. "require": "./dist/index.cjs",
  9. "types": "./dist/index.d.ts",
  10. "default": "./dist/index.js"
  11. },
  12. "./legacy": {
  13. "require": "./dist/index.cjs",
  14. "types": "./dist/index.d.ts"
  15. }
  16. },
  17. "jsdelivr": "./dist/index.js",
  18. "files": [
  19. "dist/*",
  20. "!dist/scripts/*",
  21. "LICENSE.txt",
  22. "README.md"
  23. ],
  24. "types": "./dist/index.d.ts",
  25. "type": "module",
  26. "bin": {
  27. "baseline-browser-mapping": "./dist/cli.js"
  28. },
  29. "scripts": {
  30. "fix-cli-permissions": "output=$(npx baseline-browser-mapping 2>&1); path=$(printf '%s\n' \"$output\" | sed -n 's/^sh: \\(.*\\): Permission denied$/\\1/p'); if [ -n \"$path\" ]; then echo \"Permission denied for: $path\"; echo \"Removing $path ...\"; rm -rf \"$path\"; else echo \"$output\"; fi",
  31. "test:format": "npx prettier --check .",
  32. "test:lint": "npx eslint .",
  33. "test:bcb": "mkdir test-bcb && cd test-bcb && npm init -y && npm i ../../baseline-browser-mapping browserslist browserslist-config-baseline &&jq '. += {\"browserslist\":[\"extends browserslist-config-baseline\"]}' package.json >p && mv p package.json && npx browserslist && cd ../ && rm -rf test-bcb",
  34. "test:jasmine": "npx jasmine",
  35. "test": "npm run build && npm run fix-cli-permissions && rm -rf test-bcb && npm run test:format && npm run test:lint && npx jasmine && npm run test:bcb",
  36. "build": "rm -rf dist; npx prettier . --write; rollup -c; rm -rf ./dist/scripts/expose-data.d.ts ./dist/cli.d.ts",
  37. "refresh-downstream": "npx tsx scripts/refresh-downstream.ts",
  38. "refresh-static": "npx tsx scripts/refresh-static.ts",
  39. "update-data-file": "npx tsx scripts/update-data-file.ts; npx prettier ./src/data/data.js --write",
  40. "update-data-dependencies": "npm i @mdn/browser-compat-data@latest web-features@latest -D",
  41. "check-data-changes": "git diff --name-only | grep -q '^src/data/data.js$' && echo 'changes-available=TRUE' || echo 'changes-available=FALSE'"
  42. },
  43. "license": "Apache-2.0",
  44. "devDependencies": {
  45. "@mdn/browser-compat-data": "^7.1.5",
  46. "@rollup/plugin-terser": "^0.4.4",
  47. "@rollup/plugin-typescript": "^12.1.3",
  48. "@types/node": "^22.15.17",
  49. "eslint-plugin-new-with-error": "^5.0.0",
  50. "jasmine": "^5.8.0",
  51. "jasmine-spec-reporter": "^7.0.0",
  52. "prettier": "^3.5.3",
  53. "rollup": "^4.44.0",
  54. "tslib": "^2.8.1",
  55. "typescript": "^5.7.2",
  56. "typescript-eslint": "^8.35.0",
  57. "web-features": "^2.48.1"
  58. },
  59. "repository": "git+https://github.com/web-platform-dx/baseline-browser-mapping.git"
  60. }