chromium-dashboard/package.json

115 строки
5.7 KiB
JSON
Исходник Обычный вид История

{
"name": "chromestatus-dashboard",
"description": "Chrome platform status - chromestatus.com",
"homepage": "https://www.chromestatus.com",
"private": true,
"type": "module",
"engines": {
"node": ">=18.0.0"
},
Manual changes to support using openapi [3/5] (#2771) * Manual changes to support using openapi .devcontainer/Dockerfile - Install java in devcontainer .devcontainer/devcontainer.json - Make devcontainer automatically install VSCode OpenAPI plugin mentioned in #2769 - Make devcontainer automatically install VSCode plugin for Lit client-src/elements/chromedash-app.js - Use the generated client in the frontend. - Leverage lit-labs/context to provide the client. - Docs about context and use-cases: https://lit.dev/docs/data/context/ client-src/elements/chromedash-app_test.js - Add tests for the changes in client-src/elements/chromedash-app.js client-src/contexts/openapi-context.js - Declare a context for the openapi client. framework/basehandlers.py - add do_put function. previously, all other HTTP verbs had a `do_<verb>` version except PUT. - Add put function that uses defensive_jsonify. This enables XSSI for PUT requests. - This needed change is safe to do because the only route using PUT is the admin/blink page which I am migrating into the SPA. gulpfile.babel.js - Fix usage of rollupBabel. Previously, @rollup/plugin-node-resolve's default export was named rollupBabel. Which is the wrong package. Fixed to use @rollup/plugin-babel - Using the correct parameters to rollupBabel from https://www.npmjs.com/package/@rollup/plugin-babel - Add client-src/contexts/*.js to lint and watch targets - Add custom onwarn for rollup that comes from using the generated frontend code. Check comment for explanation package.json - Add lit-labs/context. Needed for changes in client-src/contexts/openapi-context.js - Tell NPM to use the generated javascript changes via the `workspaces` key. - Instead of adding as a dependency like [I initially did here](https://github.com/GoogleChrome/chromium-dashboard/pull/2734/commits/ccd5c8e71b14219299808575ec22e60ababa8cb6#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R101), rather keep the "dependencies" only for ones pulled from npm remotely. - workspaces are meant more for packages that comes from the filesystem - Docs: https://docs.npmjs.com/cli/v9/using-npm/workspaces?v=true requirements.txt - Tell pip to install the python package. package-lock.json - Generated changes from adding context and workspaces. * revert accidental Werkzeug upgrade * fix devcontainer * Remove context & failed attempt at global changes: - Remove the context - Move the openapi client to js-src - modify gulp task to: - ignore the test file - add the openapi-client to the rollup task instead of the js task since it is a es6 module (because it has an import / require statement) - Attempt to construct the object in the spa template. It failed to work at load time. More details below: When trying to call my exported class at page load like the regular client, I get a not defined error. There are thoughts about this: - https://stackoverflow.com/a/75026222 - https://stackoverflow.com/a/53630402 - https://stackoverflow.com/a/69888825 This commit serves as an attempt to try it out Turns out, script type "module" is automatically set to defer and cannot be disabled. * add new rollup for cjs for openapi client * add more tests * fix middleware
2023-03-25 00:46:28 +03:00
"workspaces": [
"./gen/js/*"
],
2015-11-17 20:11:51 +03:00
"scripts": {
"setup": "npm ci; python3.10 -m venv cs-env; npm run deps",
2022-07-01 03:45:02 +03:00
"clean-setup": "rm -rf node_modules cs-env; npm run setup",
"deps": "source cs-env/bin/activate; pip install -r requirements.txt --upgrade; pip install -r requirements.dev.txt --upgrade",
"dev-deps": "echo 'dev-deps is no longer needed'",
"do-tests": "source cs-env/bin/activate; curl -X POST 'http://localhost:15606/reset' && python3.10 -m unittest discover -p '*_test.py' -b",
"start-emulator-persist": "gcloud beta emulators datastore start --host-port=:15606 --consistency=1.0",
"start-emulator": "gcloud beta emulators datastore start --host-port=:15606 --no-store-on-disk --consistency=1.0",
"stop-emulator": "curl -X POST 'http://localhost:15606/shutdown'",
2022-07-01 03:45:02 +03:00
"build": "gulp",
"watch": "gulp watch",
"start-app": "npm run build && curl --retry 4 http://localhost:15606/ --retry-connrefused && ./scripts/start_server.sh",
"start": "source cs-env/bin/activate; (npm run start-emulator-persist > /dev/null 2>&1 &); npm run start-app; status=$?; npm run stop-emulator; exit $status",
"stop": "killall cs-env/bin/python3.10",
"test": "(npm run start-emulator > /dev/null 2>&1 &); sleep 6; curl --retry 4 http://localhost:15606/ --retry-connrefused; npm run do-tests; status=$?; npm run stop-emulator; exit $status",
"webtest": "web-test-runner \"client-src/**/*_test.js\" --node-resolve --playwright --browsers chromium firefox",
"webtest-coverage": "web-test-runner \"client-src/**/*_test.js\" --node-resolve --playwright --coverage --browsers chromium firefox",
"do-coverage": "coverage3 erase && coverage3 run -m unittest discover -p '*_test.py' -b && coverage3 html",
"coverage": "source cs-env/bin/activate; (npm run start-emulator > /dev/null 2>&1 &); sleep 3; curl --retry 4 http://localhost:15606/ --retry-connrefused; npm run do-coverage; npm run stop-emulator",
"view-coverage": "pushd htmlcov/; python3.10 -m http.server 8080; popd",
"mypy": "source cs-env/bin/activate; mypy --ignore-missing-imports --exclude cs-env/ --exclude gen/ --exclude appengine_config.py .",
"lint": "gulp lint-fix && lit-analyzer \"client-src/elements/chromedash-!(featurelist)*.js\"",
"presubmit": "npm test && npm run webtest && npm run lint && npm run mypy",
"pylint": "pylint --output-format=parseable *py api/*py framework/*py internals/*py pages/*py",
"staging": "./scripts/deploy_site.sh `git describe --always --abbrev=7 --match 'NOT A TAG' --dirty='-tainted'` cr-status-staging",
"staging-rc": "./scripts/deploy_site.sh rc cr-status-staging",
"deploy": "./scripts/deploy_site.sh `git describe --always --abbrev=7 --match 'NOT A TAG' --dirty='-tainted'`",
"deploy-rc": "./scripts/deploy_site.sh rc",
"openapi": "npm run openapi-backend && npm run openapi-frontend",
"openapi-frontend": "rm -rf gen/js/chromestatus-openapi && openapi-generator-cli generate -i openapi/api.yaml -g typescript-fetch -o gen/js/chromestatus-openapi --additional-properties=npmName=chromestatus-openapi,withInterfaces=true,supportsES6=true && npm install",
"openapi-backend": "rm -rf gen/py/chromestatus_openapi && openapi-generator-cli generate -i openapi/api.yaml -g python-flask -o gen/py/chromestatus_openapi --additional-properties=packageName=chromestatus_openapi && pip install -r requirements.txt",
"openapi-validate": "openapi-generator-cli validate -i openapi/api.yaml"
2015-11-17 20:11:51 +03:00
},
"repository": {
"type": "git",
"url": "https://github.com/GoogleChrome/chromium-dashboard"
},
"bugs": {
"url": "https://github.com/GoogleChrome/chromium-dashboard/issues"
},
"devDependencies": {
"@babel/core": "^7.21.3",
"@babel/eslint-parser": "^7.21.3",
"@babel/eslint-plugin": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.20.2",
"@babel/register": "^7.21.0",
"@open-wc/testing": "^3.1.7",
"@openapitools/openapi-generator-cli": "^2.5.2",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-node-resolve": "^15.0.1",
"@shoelace-style/shoelace": "^2.3.0",
"@web/test-runner": "^0.15.1",
"@web/test-runner-playwright": "^0.9.0",
"acorn": ">=8.8.2",
"color-string": ">=1.9.0",
"del": "^7.0.0",
"dot-prop": ">=7.2.0",
"eslint": "^8.36.0",
"eslint-config-google": "^0.14.0",
"glob-parent": ">=6.0.2",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^8.0.0",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.6.1",
"gulp-eslint": "^6.0.0",
2019-07-02 00:28:54 +03:00
"gulp-eslint-if-fixed": "^1.0.0",
"gulp-license": "^1.1.0",
"gulp-rename": "^2.0.0",
"gulp-sass": "^5.1.0",
"gulp-uglify-es": "^3.0.0",
"ini": ">=3.0.1",
"kind-of": ">=6.0.3",
"lit-analyzer": "^1.2.1",
"lodash": ">=4.17.21",
"lodash.template": ">=4.5.0",
"minimist": ">=1.2.8",
"path-parse": ">=1.0.7",
"regenerator-runtime": "^0.13.11",
"rollup": "^3.19.1",
"rollup-plugin-babel-minify": "^10.0.0",
"sinon": "^15.0.2",
"tar": ">=6.1.13",
"trim-newlines": ">=5.0.0"
2018-06-05 00:56:45 +03:00
},
"dependencies": {
Manual changes to support using openapi [3/5] (#2771) * Manual changes to support using openapi .devcontainer/Dockerfile - Install java in devcontainer .devcontainer/devcontainer.json - Make devcontainer automatically install VSCode OpenAPI plugin mentioned in #2769 - Make devcontainer automatically install VSCode plugin for Lit client-src/elements/chromedash-app.js - Use the generated client in the frontend. - Leverage lit-labs/context to provide the client. - Docs about context and use-cases: https://lit.dev/docs/data/context/ client-src/elements/chromedash-app_test.js - Add tests for the changes in client-src/elements/chromedash-app.js client-src/contexts/openapi-context.js - Declare a context for the openapi client. framework/basehandlers.py - add do_put function. previously, all other HTTP verbs had a `do_<verb>` version except PUT. - Add put function that uses defensive_jsonify. This enables XSSI for PUT requests. - This needed change is safe to do because the only route using PUT is the admin/blink page which I am migrating into the SPA. gulpfile.babel.js - Fix usage of rollupBabel. Previously, @rollup/plugin-node-resolve's default export was named rollupBabel. Which is the wrong package. Fixed to use @rollup/plugin-babel - Using the correct parameters to rollupBabel from https://www.npmjs.com/package/@rollup/plugin-babel - Add client-src/contexts/*.js to lint and watch targets - Add custom onwarn for rollup that comes from using the generated frontend code. Check comment for explanation package.json - Add lit-labs/context. Needed for changes in client-src/contexts/openapi-context.js - Tell NPM to use the generated javascript changes via the `workspaces` key. - Instead of adding as a dependency like [I initially did here](https://github.com/GoogleChrome/chromium-dashboard/pull/2734/commits/ccd5c8e71b14219299808575ec22e60ababa8cb6#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R101), rather keep the "dependencies" only for ones pulled from npm remotely. - workspaces are meant more for packages that comes from the filesystem - Docs: https://docs.npmjs.com/cli/v9/using-npm/workspaces?v=true requirements.txt - Tell pip to install the python package. package-lock.json - Generated changes from adding context and workspaces. * revert accidental Werkzeug upgrade * fix devcontainer * Remove context & failed attempt at global changes: - Remove the context - Move the openapi client to js-src - modify gulp task to: - ignore the test file - add the openapi-client to the rollup task instead of the js task since it is a es6 module (because it has an import / require statement) - Attempt to construct the object in the spa template. It failed to work at load time. More details below: When trying to call my exported class at page load like the regular client, I get a not defined error. There are thoughts about this: - https://stackoverflow.com/a/75026222 - https://stackoverflow.com/a/53630402 - https://stackoverflow.com/a/69888825 This commit serves as an attempt to try it out Turns out, script type "module" is automatically set to defer and cannot be disabled. * add new rollup for cjs for openapi client * add more tests * fix middleware
2023-03-25 00:46:28 +03:00
"@lit-labs/context": "^0.2.0",
"@polymer/iron-collapse": "^3.0.1",
"@polymer/iron-icon": "^3.0.1",
"@polymer/iron-iconset-svg": "^3.0.1",
"lit": "^2",
"node-fetch": ">=3.3.1",
"page": "^1.11.6",
"sass": ">=1.59.3",
"urijs": ">=1.19.11",
"yargs-parser": ">=21.1.1"
},
"overrides": {
"glob-parent@<5.1.2": ">=5.1.2"
}
2021-06-03 04:12:35 +03:00
}