Deliver web apps with confidence 🚀
Find a file
Paul Gschwendtner 2e60eb08f4 refactor(migrations): ensure project paths respect root directories (#57677)
Migrations may resolve files in e.g. `blaze-out` and try to compute a
path for the file that is "recognizable" across workers. E.g. in one
worker, it may be the actual `.ts` file inside the source tree, while in
the other, the file may be inside `blaze-out`.

Tsurge currently expects project relative paths to be passed around.
Those project relative paths are currently only based on the single root
directory. Hence paths inside `blaze-out` would actually not be
recognizable.

The fix idea here is that we introduce a structure for Project files.
This structure will contain two fields:

- an ID of a file. This is similar to a module ID in the project. Those
  are resolved with respect to all root directories. This matches the
  conceptual virtual roots of `tsconfig#rootDirs`. The IDs can be used
  for matching files across workers, assuming those are executing using
  the same root directories, and handle the same overall project (e.g.
  google3).

- a path relative to the primary project root. Multiple roots may be
  configured, but the primary project root, is the directory that
  contains all others. See: `tsconfig.rootDir`. This path is NOT
  necessarily useful for matching files between stages etc, but it's
  useful for writing replacements for a given file to disk.

Note that those two things cannot be combind into one conceptual
"project relative path" because a path relative to the most appropriate
root directory cannot be used for safe replacements. E.g. consider a
replacement matches a file from a root directory like `/sub/`. The path
inside `/sub/` would then omit the `/sub/` and later on when writing
replacements, we wouldn't know which root directory it actually was part
of. Hence the concept of a "project root relative path" and the "ID".

ds

PR Close #57677
2024-09-06 19:44:07 +00:00
.circleci refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
.devcontainer refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
.github docs(docs-infra): enable tests for api-gen (#57618) 2024-09-05 14:05:04 +00:00
.husky build: simplify husky setup (#54315) 2024-02-07 16:34:13 +00:00
.ng-dev refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
.vscode refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
.yarn build: update yarn (#50732) 2023-06-16 10:51:09 +02:00
adev docs: Enable direct links to class/interface methods for @link (#57615) 2024-09-06 16:03:36 +00:00
contributing-docs docs: cover time-based statements in docs authoring guide (#57536) 2024-08-28 08:45:10 -07:00
devtools refactor(devtools): use signal apis in visualizer and devtools-tabs (#57192) 2024-09-05 17:23:34 +00:00
goldens feat(compiler): add diagnostic for unused standalone imports (#57605) 2024-09-03 14:30:56 -07:00
integration feat(core): drop support for TypeScript 5.4 (#57577) 2024-08-29 10:19:20 -07:00
modules refactor: add select scenario to the js-web-frameworks benchmark (#56362) 2024-06-13 08:59:18 -07:00
packages refactor(migrations): ensure project paths respect root directories (#57677) 2024-09-06 19:44:07 +00:00
scripts build: replace deprecated inquirer with new npm package (#57205) 2024-07-31 16:02:11 +00:00
third_party build: create NodeJS ESM loader for supporting Bazel setup (#48521) 2022-12-19 19:50:40 +00:00
tools refactor(migrations): switch from esbuild to Rollup for schematics bundling (#57602) 2024-09-03 09:07:03 -07:00
.bazelignore refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
.bazelrc fix(docs-infra): leverage http_server rule from @angular/build-tooling for adev local serving (#57427) 2024-08-19 09:18:47 -07:00
.bazelversion build: update to bazel v5 for new runfiles API used in dev-infra (#45407) 2022-03-21 16:55:36 -07:00
.clang-format feat(tooling): Add a .clang-format for automated JavaScript formatting. 2015-04-02 08:44:34 -07:00
.editorconfig build: use https link to editorconfig.org in .editorconfig (#27664) 2018-12-18 09:30:09 -08:00
.gitattributes build: cleanup .gitattributes file and remove outdated CRLF attribute (#46513) 2022-06-28 13:38:27 -07:00
.gitignore build: add ignores for aio (#56538) 2024-06-21 10:03:34 -07:00
.gitmessage build: clean up references to old master branch (#45856) 2022-05-04 16:23:33 -07:00
.mailmap build: add a Git .mailmap with my new name (#19550) 2017-10-09 14:35:30 -07:00
.npmrc build: rely on engines to prevent using npm for dependency install (#41477) 2021-04-07 12:05:01 -07:00
.nvmrc build: bump to node 18.20 to support v18 (#55162) 2024-04-12 14:51:44 -07:00
.prettierrc ci: correct invalid attributes in prettierrc configuration (#56279) 2024-06-10 14:05:17 -07:00
.pullapprove.yml ci: fix fw-testing group triggering for schematics testing changes (#57526) 2024-08-27 13:21:47 -07:00
.yarnrc build: update yarn (#50732) 2023-06-16 10:51:09 +02:00
browser-providers.conf.d.ts build: share Saucelabs browsers between karma test targets using background Saucelabs daemon and custom karma launcher (#49200) 2023-05-15 09:21:46 -07:00
browser-providers.conf.js ci: Update Saucelabs config to use Andoid 13 and 14 (#55710) 2024-05-30 16:43:25 +00:00
BUILD.bazel refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
CHANGELOG.md release: cut the v19.0.0-next.3 release 2024-09-04 08:32:56 -07:00
CHANGELOG_ARCHIVE.md docs: fix typos 2023-06-22 12:56:49 +02:00
CODE_OF_CONDUCT.md build: update CODE_OF_CONDUCT.md to match the content of angular/.github 2023-03-13 21:07:51 +00:00
CONTRIBUTING.md docs: change code formatting for better readability (#56974) 2024-07-15 12:05:43 -07:00
gulpfile.js ci: complete migration to prettier formatting (#55580) 2024-04-29 14:00:16 -07:00
karma-js.conf.js ci: complete migration to prettier formatting (#55580) 2024-04-29 14:00:16 -07:00
LICENSE docs: bump to 2024 for copyright text (#54822) 2024-03-11 13:39:38 -07:00
package.json release: cut the v19.0.0-next.3 release 2024-09-04 08:32:56 -07:00
packages.bzl refactor(docs-infra): migrate api-gen from dev-infra into the repo (#57241) 2024-08-05 17:06:29 +00:00
README.md docs: use new blog in links of new documentation (#56052) 2024-07-29 13:48:37 -07:00
renovate.json ci: replace matchDepPatterns with matchPackageNames (#57175) 2024-07-29 10:50:45 +02:00
SECURITY.md docs: update security guide link to adev (#56469) 2024-06-17 08:54:08 -07:00
tsconfig-tslint.json build: bump to node 18.20 to support v18 (#55162) 2024-04-12 14:51:44 -07:00
tslint.json refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
WORKSPACE build: update io_bazel_rules_sass digest to 5a7e3f4 (#57649) 2024-09-04 17:04:53 +00:00
yarn.bzl build: update yarn (#50732) 2023-06-16 10:51:09 +02:00
yarn.lock build: update babel dependencies to v7.25.6 (#57634) 2024-09-03 07:52:12 -07:00

Angular - The modern web developer's platform

angular-logo
Angular is a development platform for building mobile and desktop web applications
using TypeScript/JavaScript and other languages.

angular.dev

Contributing Guidelines · Submit an Issue · Blog

CI status   Angular on npm   Discord conversation

InsightsSnapshot


Documentation

Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.

Advanced

Local Development

To contribute to the Angular Docs, check out the Angular.dev README

Development Setup

Prerequisites

Setting Up a Project

Install the Angular CLI globally:

npm install -g @angular/cli

Create workspace:

ng new [PROJECT NAME]

Run the application:

cd [PROJECT NAME]
ng serve

Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.

Quickstart

Get started in 5 minutes.

Ecosystem

angular ecosystem logos

Changelog

Learn about the latest improvements.

Upgrading

Check out our upgrade guide to find out the best way to upgrade your project.

Contributing

Contributing Guidelines

Read through our contributing guidelines to learn about our submission process, coding rules, and more.

Want to Help?

Want to report a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.

Code of Conduct

Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.

Community

Join the conversation and help the community.

Love Angular badge

Love Angular? Give our repo a star ⬆️.