Skip to content
Snippets Groups Projects
package.json 20.5 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
      },
      "dependencies": {
    
    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
      },
    
        "ansi-html": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
    
        "ansi-regex": "5.0.1",
        "d3-color": "^3.1.0",
    
        "jsdom": "^22.1.0",
    
        "json5": "2.2.2",
        "nth-check": "2.0.1",
    
    Nick Fitzpatrick's avatar
    Nick Fitzpatrick committed
        "@types/react": "^18.2.42",
        "@types/react-dom": "^18.2.17",
    
        "source-map-js": "1.2.0",
    
        "unset-value": "2.0.1",
        "webpack-dev-middleware": "^5.3.4"
    
        "build": "yarn build:cljs && yarn build:js",
    
        "build-embedding-sdk": "yarn && yarn build-release:cljs && yarn embedding-sdk:generate-package && yarn build-release:sdk && yarn build-embedding-sdk-cli && yarn embedding-sdk:fixup-types-imports",
    
        "build-embedding-sdk:pure": "WEBPACK_BUNDLE=development webpack --config webpack.embedding-sdk.config.js",
    
        "build-embedding-sdk:watch": "yarn embedding-sdk:generate-package && yarn build-embedding-sdk:pure --watch",
    
        "build-embedding-sdk-cli": "webpack --config webpack.embedding-sdk-cli.config.js",
        "build-embedding-sdk-cli:watch": "yarn build-embedding-sdk-cli --watch",
    
        "build-hot": "rm -f target/cljs_dev/cljs.core.js && yarn concurrently -n 'cljs,js' -c 'yellow,green' 'yarn build-hot:cljs' 'yarn build-hot:js-wait'",
        "build-hot:cljs": "yarn && shadow-cljs watch app",
    
        "build-hot:js": "yarn && yarn clean-dev:js && NODE_OPTIONS=--max-old-space-size=8196 WEBPACK_BUNDLE=hot rspack serve",
    
        "build-hot:js-wait": "yarn wait:cljs; yarn build-hot:js",
        "build-pure:cljs": "yarn clean-dev:cljs && shadow-cljs compile app",
        "build-release": "yarn build-release:cljs && yarn build-release:js",
    
        "build-release:cljs": "yarn clean-release:cljs && shadow-cljs release app",
    
        "build-release:js": "WEBPACK_BUNDLE=production NODE_OPTIONS=--max-old-space-size=8196 rspack build",
    
        "build-release:sdk": "WEBPACK_BUNDLE=production webpack --config webpack.embedding-sdk.config.js",
    
        "build-release:static-viz": "WEBPACK_BUNDLE=production webpack --config webpack.static-viz.config.js",
    
        "build-shared": "yarn && webpack --config webpack.shared.config.js",
        "build-static-viz": "yarn && yarn build-release:cljs && WEBPACK_BUNDLE=production webpack --config webpack.static-viz.config.js",
        "build-static-viz:watch": "webpack --config webpack.static-viz.config.js --watch",
        "build-static-viz:watch-wait": "yarn wait:cljs; yarn build-static-viz:watch",
        "build-stats": "yarn && webpack --json > stats.json",
    
        "build-storybook": "NODE_ENV=development yarn build:cljs && NODE_OPTIONS=--max-old-space-size=8196 build-storybook",
    
        "build-storybook-embedding-sdk": "NODE_OPTIONS=--max-old-space-size=8196 IS_EMBEDDING_SDK=true build-storybook --quiet",
    
        "build-watch": "yarn concurrently -n 'cljs,js' 'yarn build-watch:cljs' 'yarn build-watch:js'",
        "build-watch:cljs": "yarn && shadow-cljs watch app",
    
        "build-watch:js": "yarn && NODE_OPTIONS=--max-old-space-size=8196 rspack serve --watch",
    
        "build:cljs": "yarn && yarn build-pure:cljs",
    
        "build:js": "yarn && NODE_OPTIONS=--max-old-space-size=8196 rspack build",
    
        "chromatic": "yarn build:cljs && NODE_OPTIONS=--max-old-space-size=8196 chromatic",
        "ci": "yarn ci-frontend && yarn ci-backend",
        "ci-backend": "clojure -X:dev:ee:ee-dev:drivers:drivers-dev:eastwood && clojure -X:dev:test",
        "ci-frontend": "yarn lint && yarn test",
        "clean-cypress-artifacts": "rm -R -f cypress/",
        "clean-dev:cljs": "rm -rf target/cljs_dev/*",
    
        "clean-dev:js": "rm -rf resources/frontend_client/app/dist target/classes/frontend_client/app/dist",
    
        "clean-release:cljs": "rm -rf target/cljs_release/*",
        "clean:cljs": "yarn && yarn clean-dev:cljs && yarn clean-release:cljs",
    
        "cljs-nrepl": "yarn && shadow-cljs node-repl -d cider/cider-nrepl:0.45.0 -d cider/piggieback:0.5.3 -d refactor-nrepl/refactor-nrepl:3.9.1",
    
        "cljs-server-restart": "yarn && shadow-cljs restart",
        "cljs-server-start": "yarn && shadow-cljs start",
        "cljs-server-stop": "yarn && shadow-cljs stop",
    
        "concurrently": "yarn && concurrently --kill-others -p name",
    
        "dev": "yarn && yarn clean-dev:cljs && concurrently -n 'backend,frontend,cljs,static-viz' -c 'blue,green,yellow,magenta,red' 'clojure -M:run' 'yarn build-hot:js-wait' 'yarn build-hot:cljs' 'yarn build-static-viz:watch-wait'",
        "dev-ee": "yarn && yarn clean-dev:cljs && concurrently -n 'backend,frontend,cljs,static-viz' -c 'blue,green,yellow,magenta,red' 'clojure -M:run:ee' 'MB_EDITION=ee yarn build-hot:js-wait' 'MB_EDITION=ee yarn build-hot:cljs' 'yarn build-static-viz:watch-wait'",
    
        "docs-lint-links": "find docs -type f -name '*.md' -print0 | xargs -0 markdown-link-check --quiet --config .mlc_config.json",
    
        "embedding-sdk:fixup-types-imports": "node ./bin/embedding-sdk/fixup-types-after-compilation.js",
    
        "embedding-sdk:generate-package": "node ./bin/embedding-sdk/generate-sdk-package-files.js",
    
        "embedding-sdk:generate-changelog": "yarn conventional-changelog -p angular --pkg enterprise/frontend/src/embedding-sdk/package.template.json --config enterprise/frontend/src/embedding-sdk/conventional-changelog-config.js --tagPrefix embedding-sdk-",
    
        "embedding-sdk:publish": "cd ./resources/embedding-sdk && npm publish",
    
        "embedding-sdk:test-unit": "yarn test-unit enterprise/frontend/src/embedding-sdk/",
    
        "eslint-fix": "yarn lint-eslint --fix",
        "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",
    
        "lint": "yarn lint-eslint && yarn lint-prettier && yarn lint-docs-links && yarn lint-yaml && yarn type-check",
    
        "lint-docs-links": "yarn && ./bin/verify-doc-links",
    
        "lint-eslint": "yarn build:cljs && yarn lint-eslint-pure",
    
        "lint-eslint-pure": "eslint --ext .js,.jsx,.ts,.tsx --rulesdir frontend/lint/eslint-rules --max-warnings 0 --report-unused-disable-directives enterprise/frontend frontend e2e",
    
        "lint-prettier": "yarn && yarn lint-prettier-pure",
    
        "lint-prettier-pure": "prettier --check '{frontend,enterprise/frontend,e2e}/**/*.{js,jsx,ts,tsx,css}'",
    
        "lint-yaml": "yamllint **/*.{yaml,yml} --ignore=node_modules/**/*.{yaml,yml}",
    
        "postinstall": "yarn yarn-deduplicate --scopes @babel && patch-package",
    
        "precommit": "lint-staged --shell",
    
    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'",
    
        "prepare": "husky install",
    
        "prettier": "prettier --write '{frontend,enterprise/frontend,e2e}/**/*.{js,jsx,ts,tsx,css}'",
    
        "remove-webpack-cache": "rm -rf ./node_modules/.cache",
        "storybook": "yarn build:cljs && start-storybook -p 6006",
    
        "storybook-embedding-sdk": "yarn build:cljs && IS_EMBEDDING_SDK=true start-storybook -p 6006",
    
        "test": "yarn test-unit && yarn test-timezones && yarn test-cypress",
    
        "test-cljs": "yarn && shadow-cljs compile test && node target/node-tests.js",
    
        "test-cypress": "yarn build && ./bin/build-for-test && yarn test-cypress-run",
    
        "test-cypress-open": "./bin/build-for-test && CYPRESS_FE_HEALTHCHECK=false yarn test-cypress-run --e2e --open",
    
        "test-cypress-open-no-backend": "E2E_HOST='http://localhost:3000' 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-sdk": "CYPRESS_IS_EMBEDDING_SDK=true yarn test-cypress-open --e2e --open --folder 'embedding-sdk'",
    
        "test-cypress-run": "node ./e2e/runner/run_cypress_tests.js",
        "test-debug": "yarn build:cljs && node --inspect-brk node_modules/.bin/jest --runInBand --detectOpenHandles",
    
        "test-qa-dbs:down": "docker compose -f ./e2e/test/scenarios/docker-compose.yml down",
        "test-qa-dbs:up": "docker compose -f ./e2e/test/scenarios/docker-compose.yml up -d",
    
        "test-timezones": "yarn && ./frontend/test/__runner__/run_timezone_tests",
    
        "test-timezones-unit": "yarn build:cljs && jest --silent --maxWorkers=4 --config jest.tz.unit.conf.json",
        "test-unit": "yarn build:cljs && jest --maxWorkers=4",
        "test-unit-keep-cljs": "jest --maxWorkers=4",
    
        "test-unit-watch": "yarn test-unit --watch",
        "test-unit-watch:cljs": "yarn concurrently -n 'cljs,tests' 'yarn build-watch:cljs' 'yarn test-unit-keep-cljs --watch'",
    
        "test-visual": "yarn build && ./bin/build-for-test && yarn test-visual-run",
    
        "test-visual:loki": "yarn loki test --chromeFlags='--headless --disable-gpu'",
    
        "test-visual:loki-approve-diff": "ls .loki/difference | xargs -I _ find .loki/current -name _ | xargs -I _ cp _ .loki/reference/",
    
        "test-visual:loki-update": "yarn loki update --chromeFlags='--headless --disable-gpu'",
    
        "test-visual:loki-report": "node frontend/test/generate-loki-report-json.js && reg-cli --from .loki/report.json --report .loki/report.html",
    
    Aleksandr Lesnenko's avatar
    Aleksandr Lesnenko committed
        "test-visual:loki-report-open": "yarn test-visual:loki || (echo 'Visual test failed, opening report...' && yarn test-visual:loki-report && open-cli .loki/report.html)",
    
        "type-check": "yarn clean:cljs && yarn build:cljs && yarn type-check-pure",
        "type-check-pure": "tsc --noEmit",
        "validate-e2e-filenames": "node e2e/validate-e2e-test-files.js",
        "wait:cljs": "echo Waiting for first CLJS build; until [ -f target/cljs_dev/cljs.core.js ]; do sleep 1; done; echo CLJS build done"
    
      "lint-staged": {
    
        "+(frontend|enterprise)/**/*.styled.tsx": [
          "stylelint --customSyntax postcss-styled-syntax --fix"
        ],
    
        "+(frontend|enterprise/frontend|e2e)/**/*.css": [
    
          "stylelint --fix",
    
          "prettier --write"
    
        "+(frontend|enterprise/frontend)/**/*.{js,jsx,ts,tsx}": [
    
          "LINT_CSS_MODULES=true 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|ts),!(helpers|shared)/*.(js|ts)}": [
    
          "node e2e/validate-e2e-test-files.js"
    
        ],
        "**/*.{clj,cljc,cljs,bb}": [
          "clj-kondo --config ./.clj-kondo/config.edn --config-dir ./.clj-kondo --parallel --lint",
          "./bin/whitespace_lint_staged.sh"
    
      "browserslist": [
        "defaults"
      ]