Skip to content
Snippets Groups Projects
package.json 12.7 KiB
Newer Older
  • Learn to ignore specific revisions
  • 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
        "yarn": ">=1.12.3"
    
    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",
        "nth-check": "2.0.1",
        "set-value": "4.0.1",
        "immer": "9.0.6",
    
        "ansi-html": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
        "cypress": "6.4.0"
    
    Cam Saul's avatar
    Cam Saul committed
        "concurrently": "yarn && concurrently --kill-others -p name",
    
        "dev": "yarn concurrently -n 'backend,frontend,cljs,docs' -c 'blue,green,yellow,magenta' 'clojure -M:run' 'yarn build-hot:js' 'yarn build-hot:cljs' 'yarn docs'",
        "dev-ee": "yarn concurrently -n 'backend,frontend,cljs,docs' -c 'blue,green,yellow,magenta' 'clojure -M:run:ee' 'MB_EDITION=ee yarn build-hot:js' 'MB_EDITION=ee yarn build-hot:cljs' 'yarn docs'",
    
        "type-check": "yarn && 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-quick:cljs && eslint --ext .js --ext .jsx --rulesdir frontend/lint/eslint-rules --max-warnings 0 enterprise/frontend/src frontend/src frontend/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-unit": "yarn build-quick:cljs && jest --silent --maxWorkers=2 --config jest.unit.conf.json",
    
        "test-timezones-unit": "yarn build-quick:cljs && jest --silent --maxWorkers=2 --config jest.tz.unit.conf.json",
    
        "test-timezones": "yarn && ./frontend/test/__runner__/run_timezone_tests",
    
    Cam Saul's avatar
    Cam Saul committed
        "build:js": "yarn && webpack --bail",
        "build-watch:js": "yarn && webpack --watch",
    
        "build-hot:js": "yarn && NODE_OPTIONS=--max-old-space-size=8096 WEBPACK_BUNDLE=hot webpack serve --progress --host 0.0.0.0",
    
    Cam Saul's avatar
    Cam Saul committed
        "build:cljs": "yarn && rm -rf frontend/src/cljs/* && shadow-cljs release app",
    
    Cam Saul's avatar
    Cam Saul committed
        "build-quick:cljs": "yarn build:cljs",
    
    Cam Saul's avatar
    Cam Saul committed
        "build-watch:cljs": "yarn cljs-server-restart && shadow-cljs watch app",
        "build-hot:cljs": "yarn cljs-server-restart && shadow-cljs watch app",
        "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.25.8 -d cider/piggieback:0.5.1 -d refactor-nrepl:2.5.1",
        "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-stats": "yarn && webpack --json > stats.json",
    
        "build-shared": "yarn && webpack --config webpack.shared.config.js",
    
        "build-static-viz": "yarn && webpack --config webpack.static-viz.config.js",
    
    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 && eslint --fix --ext .js,.jsx,.ts,.tsx --rulesdir frontend/lint/eslint-rules {enterprise/,}frontend/{src,test}",
    
        "docs": "documentation serve --watch frontend/src/metabase-lib/lib/**",
    
        "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": "yarn build && ./bin/build-for-test && yarn test-cypress-no-build",
    
        "test-cypress-open": "./bin/build-for-test && yarn test-cypress-no-build --open",
    
        "test-cypress-open-no-backend": "E2E_HOST='http://localhost:3000' yarn test-cypress-no-build --open",
    
        "test-cypress-no-build": "yarn && ELECTRON_EXTRA_LAUNCH_ARGS=\"--force-prefers-reduced-motion\" babel-node ./frontend/test/__runner__/run_cypress_tests.js",
        "test-visual": "ELECTRON_EXTRA_LAUNCH_ARGS=\"--force-prefers-reduced-motion\" yarn build && ./bin/build-for-test && yarn test-visual-no-build",
    
        "test-visual-no-build": "percy exec -- yarn test-cypress-no-build --spec \"./frontend/test/metabase-visual/**/*.cy.spec.js\"",
    
        "test-visual-open": "percy exec -- yarn test-cypress-open --spec \"./frontend/test/metabase-visual/**/*.cy.spec.js\"",
    
        "prepare": "husky install",
        "storybook": "start-storybook -p 6006",
    
        "build-storybook": "build-storybook",
        "chromatic": "chromatic"
    
      "lint-staged": {
    
        "frontend/**/*.{js,jsx,ts,tsx,css}": [
    
          "prettier --write"
    
      "browserslist": [
        "defaults"
      ]