angular/package.json
Paul Gschwendtner dc80046132 refactor(compiler-cli): update type check generation code to use new import manager (#54819)
Updates the type-check block generation code (also for inline type check
blocks) to use the new import manager.

This is now a requirement because the translator utilities from the
reference emit environment expect an import manager that follows the
new contract established via `ImportGenerator<TFile, TExpression>`.

For type check files, we can simply print new imports as we don't expect
existing imports to be updated. That is because type check files do not
have any _original_ source files (or in practice— those are empty).

For type check blocks inline, or constructors, imports _may_ be re-used.
This is great as it helps fixing some incrementality bugs that we were
seeing in the type check code. That is, sometimes the type check block
code may generate imports conditionally for e.g. `TemplateRef`, or
animations. Those then **prevent** incremental re-use if TCB code
switches between those continously. We tried to account for that with
signal inputs by always pre-generating such imports. This fixed the
issue for type-check files, but for inline type check blocks this is
different as we would introduce new imports in user code that would then
be changed back in subsequential edit iterations. See:
https://github.com/angular/angular/pull/53521#pullrequestreview-1778130879.

In practice, the assumption was that we would be fine since user code is
most likely containing imports to `@angular/core` already. That is a
true assumption, but unfortunately it doesn't help with incremental
re-use because TypeScript's structural change detection does not dedupe
and expects 1:1 exact imports from their old source files.

https://github.com/microsoft/TypeScript/pull/56845

To improve incremental re-use for the type check integration, we should
re-use original source file imports when possible. This commit enables
this.

To update imports and execute inline operations, we are now uisng
`magic-string` (which is then bundled) as it simplifies the string
manipulatuons.

PR Close #54819
2024-03-15 15:09:40 -07:00

230 lines
9.9 KiB
JSON

{
"name": "angular-srcs",
"version": "18.0.0-next.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
"bugs": "https://github.com/angular/angular/issues",
"license": "MIT",
"//engines-comment": "Keep this in sync with /aio/package.json and /aio/tools/examples/shared/package.json",
"engines": {
"node": "^18.13.0 || ^20.9.0",
"yarn": ">=1.22.4 <2",
"npm": "Please use yarn instead of NPM to install dependencies"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"scripts": {
"/": "",
"// 1": "Many of our checks/scripts/tools have moved to our ng-dev tool",
"// 2": "Find the usage you are looking for with:",
"// 3": "yarn ng-dev --help",
"/ ": "",
"postinstall": "node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js && patch-package --patch-dir tools/esm-interop/patches/npm && patch-package --patch-dir tools/npm-patches",
"prepare": "husky",
"ng-dev": "ts-node --esm --project .ng-dev/tsconfig.json --transpile-only node_modules/@angular/ng-dev/bundles/cli.mjs",
"build": "ts-node --esm --project scripts/tsconfig.json scripts/build/build-packages-dist.mts",
"test": "bazelisk test",
"test:ci": "bazelisk test -- //... -//adev/... -//devtools/... -//aio/...",
"test-tsec": "bazelisk test //... --build_tag_filters=tsec --test_tag_filters=tsec",
"lint": "yarn -s tslint && yarn -s ng-dev format changed --check",
"tslint": "tslint -c tslint.json --project tsconfig-tslint.json",
"public-api:check": "node goldens/public-api/manage.js test",
"public-api:update": "node goldens/public-api/manage.js accept",
"symbol-extractor:check": "node tools/symbol-extractor/run_all_symbols_extractor_tests.js test",
"symbol-extractor:update": "node tools/symbol-extractor/run_all_symbols_extractor_tests.js accept",
"ts-circular-deps:check": "yarn -s ng-dev ts-circular-deps check --config ./packages/circular-deps-test.conf.js",
"ts-circular-deps:approve": "yarn -s ng-dev ts-circular-deps approve --config ./packages/circular-deps-test.conf.js",
"check-tooling-setup": "yarn tsc --project .ng-dev/tsconfig.json && yarn tsc --project scripts/tsconfig.json",
"devtools:devserver": "ibazel run //devtools/src:devserver",
"devtools:devserver:demo-standalone": "ibazel run //devtools/projects/demo-standalone/src:devserver",
"devtools:build:chrome": "bazelisk build --config snapshot-build --//devtools/projects/shell-browser/src:flag_browser=chrome -- devtools/projects/shell-browser/src:prodapp",
"devtools:build:firefox": "bazelisk build --config snapshot-build --//devtools/projects/shell-browser/src:flag_browser=firefox -- devtools/projects/shell-browser/src:prodapp",
"devtools:test": "bazelisk test --config snapshot-build --//devtools/projects/shell-browser/src:flag_browser=chrome -- //devtools/...",
"docs": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel run //adev:serve --fast_adev",
"docs:build": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel build //adev:build --fast_adev",
"benchmarks": "ts-node --esm scripts/benchmarks/index.mts"
},
"// 1": "dependencies are used locally and by bazel",
"dependencies": {
"@angular-devkit/build-angular": "17.3.0-rc.0",
"@angular-devkit/core": "17.3.0-rc.0",
"@angular-devkit/schematics": "17.3.0-rc.0",
"@angular/cdk": "17.3.0-rc.0",
"@angular/cli": "17.3.0-rc.0",
"@angular/material": "17.3.0-rc.0",
"@babel/cli": "7.23.9",
"@babel/core": "7.23.9",
"@babel/generator": "7.23.6",
"@bazel/concatjs": "5.8.1",
"@bazel/esbuild": "5.8.1",
"@bazel/jasmine": "5.8.1",
"@bazel/protractor": "5.8.1",
"@bazel/rollup": "5.8.1",
"@bazel/runfiles": "5.8.1",
"@bazel/terser": "5.8.1",
"@bazel/worker": "5.8.1",
"@jridgewell/sourcemap-codec": "^1.4.14",
"@microsoft/api-extractor": "^7.24.2",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@schematics/angular": "17.3.0-rc.0",
"@types/angular": "^1.6.47",
"@types/babel__core": "7.20.5",
"@types/babel__generator": "7.6.8",
"@types/bluebird": "^3.5.27",
"@types/chrome": "^0.0.263",
"@types/convert-source-map": "^2.0.0",
"@types/diff": "^5.0.0",
"@types/dom-view-transitions": "^1.0.1",
"@types/hammerjs": "2.0.45",
"@types/jasmine": "^5.0.0",
"@types/jasmine-ajax": "^3.3.1",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^16.11.7",
"@types/selenium-webdriver": "3.0.7",
"@types/selenium-webdriver4": "npm:@types/selenium-webdriver@4.1.22",
"@types/semver": "^7.3.4",
"@types/shelljs": "^0.8.6",
"@types/systemjs": "6.13.5",
"@types/yargs": "^17.0.3",
"angular-1.5": "npm:angular@1.5",
"angular-1.6": "npm:angular@1.6",
"angular-1.7": "npm:angular@1.7",
"angular-1.8": "npm:angular@1.8",
"angular-mocks-1.5": "npm:angular-mocks@1.5",
"angular-mocks-1.6": "npm:angular-mocks@1.6",
"angular-mocks-1.7": "npm:angular-mocks@1.7",
"angular-mocks-1.8": "npm:angular-mocks@1.8",
"bluebird": "^3.7.2",
"canonical-path": "1.0.0",
"chalk": "^4.1.0",
"chokidar": "^3.5.1",
"convert-source-map": "^1.5.1",
"d3": "^7.0.0",
"diff": "^5.0.0",
"domino": "https://github.com/angular/domino.git#9e7881d2ac1e5977cefbc557f935931ec23f6658",
"hammerjs": "~2.0.8",
"http-server": "^14.0.0",
"jasmine": "~5.1.0",
"jasmine-ajax": "^4.0.0",
"jasmine-core": "^5.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^2.1.0",
"karma-jasmine": "^5.0.0",
"karma-requirejs": "^1.1.0",
"karma-sourcemap-loader": "^0.4.0",
"magic-string": "^0.30.8",
"memo-decorator": "^2.0.1",
"ngx-flamegraph": "0.0.12",
"ngx-progressbar": "^11.1.0",
"protractor": "^7.0.0",
"reflect-metadata": "^0.2.0",
"requirejs": "^2.3.6",
"rollup": "~2.79.0",
"rollup-plugin-preserve-shebang": "^1.0.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"rxjs": "^7.0.0",
"selenium-webdriver": "3.5.0",
"selenium-webdriver4": "npm:selenium-webdriver@4.18.1",
"semver-dsl": "^1.0.1",
"shelljs": "^0.8.5",
"source-map": "0.7.4",
"source-map-support": "0.5.21",
"systemjs": "0.18.10",
"terser": "^5.8.0",
"todomvc-app-css": "^2.3.0",
"todomvc-common": "^1.0.5",
"tslib": "^2.3.0",
"tslint": "6.1.3",
"typescript": "5.4.2",
"webtreemap": "^2.0.1",
"ws": "^8.15.0",
"xhr2": "0.2.1",
"yargs": "^17.2.1"
},
"// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.",
"devDependencies": {
"@actions/core": "^1.10.0",
"@angular-devkit/architect-cli": "^0.1703.0-rc",
"@angular/animations": "^17.3.0-rc",
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#65d002a534a74daa3c9bd26bdea5a092cbd519df",
"@angular/docs": "https://github.com/angular/dev-infra-private-docs-builds.git#82c4573f5c9d4fb864271a1c74259fc251457e2f",
"@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#7dea535110c0215b221908e37067ee6b605db373",
"@babel/helper-remap-async-to-generator": "^7.18.9",
"@babel/plugin-proposal-async-generator-functions": "^7.20.7",
"@bazel/bazelisk": "^1.7.5",
"@bazel/buildifier": "^6.0.0",
"@bazel/ibazel": "^0.16.0",
"@codemirror/autocomplete": "^6.11.1",
"@codemirror/commands": "^6.3.2",
"@codemirror/lang-angular": "^0.1.2",
"@codemirror/lang-css": "^6.2.1",
"@codemirror/lang-html": "^6.4.7",
"@codemirror/lang-javascript": "^6.2.1",
"@codemirror/lang-sass": "^6.0.2",
"@codemirror/language": "^6.9.3",
"@codemirror/lint": "^6.4.2",
"@codemirror/search": "^6.5.5",
"@codemirror/state": "^6.3.3",
"@codemirror/view": "^6.22.2",
"@lezer/common": "^1.1.2",
"@lezer/highlight": "^1.2.0",
"@lezer/javascript": "^1.4.10",
"@octokit/graphql": "^8.0.0",
"@types/adm-zip": "^0.5.0",
"@types/cldrjs": "^0.4.22",
"@types/d3": "^7.4.3",
"@types/inquirer": "^9.0.3",
"@types/jsdom": "^21.1.5",
"@typescript/vfs": "^1.5.0",
"@yarnpkg/lockfile": "^1.1.0",
"adm-zip": "^0.5.10",
"angular-split": "^17.1.1",
"assert": "^2.1.0",
"check-side-effects": "0.0.23",
"cldr": "7.5.0",
"cldrjs": "0.5.5",
"conventional-changelog": "^5.0.0",
"fast-glob": "3.3.2",
"firebase-tools": "^13.0.0",
"glob": "8.1.0",
"gsap": "^3.12.3",
"gulp": "^4.0.2",
"gulp-conventional-changelog": "^4.0.0",
"husky": "9.0.11",
"inquirer": "^9.2.7",
"jsdom": "^24.0.0",
"karma-coverage": "^2.2.1",
"karma-jasmine-html-reporter": "^2.1.0",
"karma-sauce-launcher": "^4.3.6",
"madge": "^6.0.0",
"marked": "^12.0.0",
"mermaid": "^10.8.0",
"ogl": "^1.0.3",
"patch-package": "^7.0.0",
"playwright-core": "^1.41.2",
"prettier": "^3.0.0",
"sauce-connect": "https://saucelabs.com/downloads/sc-4.9.1-linux.tar.gz",
"semver": "^7.3.5",
"ts-node": "^10.9.1",
"tsec": "0.2.8",
"tslint-eslint-rules": "5.4.0",
"tslint-no-toplevel-property-access": "0.0.2",
"typed-graphqlify": "^3.1.1",
"vrsource-tslint-rules": "6.0.0",
"xregexp": "^5.1.1",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0"
},
"// 3": "Ensure that transitive dependencies on `https-proxy-agent` are at minimum v5 as older versions patch NodeJS directly, breaking tools like webdriver which is used by the karma-sauce-launcher as an example.",
"// 4": "Ensure that a single instance of the `saucelabs` package is used. Protractor and the Karma sauce launcher pull this package as dependency. A single instance allows for e.g. easier patching in the Karma config.",
"resolutions": {
"**/https-proxy-agent": "7.0.4",
"**/saucelabs": "7.5.0"
}
}