Skip to content
Snippets Groups Projects
package.json 15.7 KiB
Newer Older
Cam Saul's avatar
Cam Saul committed
{
  "name": "metabase",
Tom Robinson's avatar
Tom Robinson committed
  "private": true,
  "version": "0.0.0",
  "description": "Metabase Analytics Report Server",
  "repository": "https://github.com/metabase/metabase",
Tom Robinson's avatar
Tom Robinson committed
  "license": "private",
  "engines": {
Tom Robinson's avatar
Tom Robinson committed
  },
  "dependencies": {
Tom Robinson's avatar
Tom Robinson committed
    "d3": "^3.5.17",
Tom Robinson's avatar
Tom Robinson committed
    "diff": "^3.2.0",
Tom Robinson's avatar
Tom Robinson committed
  },
  "devDependencies": {
Tom Robinson's avatar
Tom Robinson committed
  },
  "resolutions": {
    "ansi-regex": "5.0.1",
    "set-value": "4.0.1",
    "ansi-html": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
    "unset-value": "2.0.1",
    "nth-check": "2.0.1",
    "json5": "2.2.2"
Cam Saul's avatar
Cam Saul committed
    "concurrently": "yarn && concurrently --kill-others -p name",
    "dev": "yarn concurrently -n 'backend,frontend,cljs,static-viz' -c 'blue,green,yellow,magenta,red' 'clojure -M:run' 'yarn build-hot:js' 'yarn build-hot:cljs' 'yarn build-static-viz:watch'",
    "dev-ee": "yarn concurrently -n 'backend,frontend,cljs,static-viz' -c 'blue,green,yellow,magenta,red' 'clojure -M:run:ee' 'MB_EDITION=ee yarn build-hot:js' 'MB_EDITION=ee yarn build-hot:cljs' 'yarn build-static-viz:watch'",
    "type-check": "rm -rf frontend/src/{cljs,cljs_release} && yarn build:cljs && tsc --noEmit",
    "remove-webpack-cache": "rm -rf ./node_modules/.cache",
    "lint": "yarn lint-eslint && yarn lint-prettier && yarn lint-docs-links && yarn lint-yaml && yarn type-check",
    "lint-eslint": "yarn build:cljs && eslint --ext .js,.jsx,.ts,.tsx --rulesdir frontend/lint/eslint-rules --max-warnings 0 --report-unused-disable-directives enterprise/frontend/src frontend/src frontend/test e2e/test",
    "lint-prettier": "yarn && prettier -l '{enterprise/,}frontend/**/*.{js,jsx,ts,tsx,css}' || (echo '\nThese files are not formatted correctly. Did you forget to \"yarn prettier\"?' && false)",
    "lint-docs-links": "yarn && ./bin/verify-doc-links",
    "lint-yaml": "yamllint **/*.{yaml,yml} --ignore=node_modules/**/*.{yaml,yml}",
    "test": "yarn test-unit && yarn test-timezones && yarn test-cypress",
    "test-debug": "yarn build:cljs && node --inspect-brk node_modules/.bin/jest --runInBand --detectOpenHandles --config jest.unit.conf.json",
    "test-unit": "yarn build:cljs && jest --maxWorkers=2 --config jest.unit.conf.json",
    "test-unit-keep-cljs": "jest --maxWorkers=2 --config jest.unit.conf.json",
    "test-unit-watch:cljs": "yarn concurrently -n 'cljs,tests' 'yarn build-watch:cljs' 'yarn test-unit-keep-cljs --watch'",
    "test-timezones-unit": "yarn build:cljs && jest --silent --maxWorkers=2 --config jest.tz.unit.conf.json",
    "test-timezones": "yarn && ./frontend/test/__runner__/run_timezone_tests",
Maz Ameli's avatar
Maz Ameli committed
    "build:js": "yarn && NODE_OPTIONS=--max-old-space-size=8196 webpack --bail",
    "build-watch:js": "yarn && NODE_OPTIONS=--max-old-space-size=8196 webpack --watch",
    "build-hot:js": "yarn && NODE_OPTIONS=--max-old-space-size=8196 WEBPACK_BUNDLE=hot webpack serve --host 0.0.0.0",
    "build-release:js": "yarn && WEBPACK_BUNDLE=production NODE_OPTIONS=--max-old-space-size=8196 webpack --bail",
    "build-release:cljs": "yarn && rm -rf frontend/src/cljs_release/* && shadow-cljs release app",
    "build:cljs": "yarn && rm -rf frontend/src/cljs/* && shadow-cljs compile app",
    "build-watch:cljs": "yarn && shadow-cljs watch app",
    "build-hot:cljs": "yarn && shadow-cljs watch app",
Cam Saul's avatar
Cam Saul committed
    "cljs-server-start": "yarn && shadow-cljs start",
    "cljs-server-stop": "yarn && shadow-cljs stop",
    "cljs-server-restart": "yarn && shadow-cljs restart",
    "cljs-nrepl": "yarn && shadow-cljs node-repl -d cider/cider-nrepl:0.30.0 -d cider/piggieback:0.5.3 -d refactor-nrepl:3.6.0",
Cam Saul's avatar
Cam Saul committed
    "test-cljs": "yarn && shadow-cljs compile test && node target/node-tests.js",
Cam Saul's avatar
Cam Saul committed
    "build": "yarn build:cljs && yarn build:js",
    "build-watch": "yarn concurrently -n 'cljs,js' 'yarn build-watch:cljs' 'yarn build-watch:js'",
    "build-hot": "yarn concurrently -n 'cljs,js' 'yarn build-hot:cljs' 'yarn build-hot:js'",
    "build-release": "yarn build-release:cljs && yarn build-release:js",
    "build-stats": "yarn && webpack --json > stats.json",
    "build-shared": "yarn && webpack --config webpack.shared.config.js",
    "build-static-viz": "yarn && yarn build-release:cljs && webpack --config webpack.static-viz.config.js",
    "build-static-viz:watch": "webpack --config webpack.static-viz.config.js --watch",
Tom Robinson's avatar
Tom Robinson committed
    "preinstall": "echo $npm_execpath | grep -q yarn || echo '\\033[0;33mSorry, npm is not supported. Please use Yarn (https://yarnpkg.com/).\\033[0m'",
    "prettier": "prettier --write '{enterprise/,}frontend/**/*.{js,jsx,ts,tsx,css}'",
    "eslint-fix": "yarn lint-eslint --fix",
    "ci": "yarn ci-frontend && yarn ci-backend",
    "ci-frontend": "yarn lint && yarn test",
    "ci-backend": "clojure -X:dev:ee:ee-dev:drivers:drivers-dev:eastwood && clojure -X:dev:test",
    "test-cypress-run": "node ./e2e/runner/run_cypress_tests.js",
    "test-cypress-open": "./bin/build-for-test && yarn test-cypress-run --e2e --open",
    "test-cypress-open-qa": "yarn test-qa-dbs:up && QA_DB_ENABLED=true TZ='US/Pacific' yarn test-cypress-open",
    "test-cypress-open-no-backend": "E2E_HOST='http://localhost:3000' yarn test-cypress-run --e2e --open",
    "test-cypress": "yarn build && ./bin/build-for-test && yarn test-cypress-run",
    "test-qa-dbs:up": "docker-compose -f ./e2e/test/scenarios/docker-compose.yml up -d",
    "test-qa-dbs:down": "docker-compose -f ./e2e/test/scenarios/docker-compose.yml down",
    "validate-e2e-filenames": "node e2e/validate-e2e-test-files.js",
    "clean-cypress-artifacts": "rm -R -f cypress/",
    "generate-cypress-html-report": "mochawesome-merge cypress/reports/mochareports/*.json > cypress/reports/cypress-test-report.json && marge cypress/reports/cypress-test-report.json -o cypress/reports/mochareports --inline",
    "test-visual-run": "percy exec -- yarn test-cypress-run --spec \"./e2e/test/visual/**/*.cy.spec.js\"",
    "test-visual-open": "percy exec -- yarn test-cypress-open",
    "test-visual": "yarn build && ./bin/build-for-test && yarn test-visual-run",
    "prepare": "husky install",
    "storybook": "yarn build:cljs && start-storybook -p 6006",
Maz Ameli's avatar
Maz Ameli committed
    "build-storybook": "yarn build:cljs && NODE_OPTIONS=--max-old-space-size=8196 build-storybook",
    "chromatic": "yarn build:cljs && NODE_OPTIONS=--max-old-space-size=8196 chromatic",
    "docs-lint-links": "find docs -type f -name '*.md' -print0 | xargs -0 markdown-link-check --quiet --config .mlc_config.json"
  "lint-staged": {
    "+(enterprise|frontend)/**/*.css": [
      "prettier --write"
    ],
    "+(enterprise|frontend)/**/*.{js,jsx,ts,tsx}": [
      "eslint --rulesdir frontend/lint/eslint-rules --max-warnings 0 --fix",
      "prettier --write",
      "node ./bin/verify-doc-links"
      "eslint --rulesdir frontend/lint/eslint-rules --max-warnings 0 --fix",
    "e2e/test/scenarios/*/{*.js,!(helpers|shared)/*.js}": [
      "eslint --rulesdir frontend/lint/eslint-rules --max-warnings 0 --fix",
      "node e2e/validate-e2e-test-files.js"
  "browserslist": [
    "defaults"
  ]