With the APF changes in version 14, the dts entrypoint file has been changed to `index.d.ts`, this results in TypeScript being able to resolve the type definition file without the need of the additional path to the flat module file dts.
By using the `strings` re-export from `@angular-devkit/schematics` instead of from `@angular-devkit/core`,
the number of imports from `@angular-devkit/core` has been reduced and lowers the direct dependency count
for many of the individual schematics.
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
With this change we update the validation of the libraries and application projects names to fully allow characters that make a valid NPM package name. http://json.schemastore.org/package has been used as reference.
We also remove validators that are no longer needed.
Closes#11051
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
With this change we removed several deprecated `@schematics/angular` deprecated options.
BREAKING CHANGE:
We removed several deprecated `@schematics/angular` deprecated options.
- `lintFix` have been removed from all schematics. `ng lint --fix` should be used instead.
- `legacyBrowsers` have been removed from the `application` schematics since IE 11 is no longer supported.
- `configuration` has been removed from the `web-worker` as it was unused.
- `target` has been removed from the `service-worker` as it was unused.
With this change we sync workspace and library schematic dependencies using Renovate. We do this to avoid having to keep these in sync by hand.
We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe. But `ts_library` doesn't support JSON inputs.
With this change we do several changes to the `angular.json` configuration for `build` , `server` and `app-shell` targets so that these are `production` by default.
- build, server and app-shell targets are configured to run production by default.
- We add a new configuration named `development` to run the mentioned builder targets in development. Ex: `ng build --configuration development`.
- When adding `universal` or `app-shell`, we generate the full set of configurations as per the `buiid` target. Previously, we only generated the `production` configuration.
- We added a helper script in `package.json` to run build in watch mode. `npm run watch` which is a shortcut for `ng build --watch --configuration development`
* fix(@schematics/angular): regression tsconfig.json
fix(@schematics/angular): regression tsconfig.json …
Unverified
0e318ae
Regression in tsconfig.json set `"outDir": "./dist/out-tsc"` for problems in VSCode TS(2307) when building library referred in tsconfig "paths"
Closes: #16708
* fix(@schematics/angular): regression tsconfig.json
Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's.
Closes#16709
* fix(@schematics/angular): regression tsconfig.json
Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's.
Fix code lint.
Closes#16709
* fix(@schematics/angular): regression tsconfig.json
Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's.
Fix test code to conform new behaviour.
Closes#16709
Currently the library schematic doesn't support adding a secondary entry-point and having deep imports is not recommanded.
It's best if paths are more stricter when having a secondary entry-point instead of a wildcard.
Instead of :
```
"lib/*": [
"dist/lib/*"
]
```
Users should configure:
```
"lib/secondary": [
"dist/lib/secondary"
]
```
This would allow a better DX experience when using auto imports in IDE's.
Closes: #15952
With this change we remove the requirement to add tsickle as a dependency when having a workspace library.
Since the CTOR downlevel transformer which was previously provided via tsickle is now in ng-packagr version 5.5.1+ We migrate existing libraries to remove the need for tsickle.
Since `NGCC` is non incremental and in library projects we have the original TS sources
we don't need to build a library using the `VE` and transform it using `NGCC`. Instead we can build the library using `NGTSC` (Ivy) directly
as this enables faster incremental compilations and a better development experience.
Libraries now have a `production` configuration, which enabled `VE` compilations. As it is not recommended to publish NGTSC (Ivy)
built libraries to NPM repositories, since Ivy libraries are not backwards compatible with the legacy View Engine.
This is required to support forward references in ES2015 target code. tsickle provides the constructor parameter downlevel logic that removes the runtime TDZ error that would otherwise be encountered.
When `newProjectRoot` the paths are prefixed with an `/` example `/project-name/tsconfig.lib.json` which results in these being marked as absolute paths, which causes build failures.
Fixes#14108
Currently when using `ivy-ngcc` it will print out a warning
```
Failed to read entry point info from //node_modules/@schematics/angular/workspace/files/package.json with error SyntaxError: Unexpected token < in JSON at position 1121.
```
Fixes#13378
At the moment some schematics contain this options for instance the `guard`, `component` etc.. But some others don't such as `module`
Fixes#12894 and Fixes#6272
* build: update `@angular/packages` to `7.1.0`
* feat(@schematics/angular): use tsickle `>=0.34.0` when creating a library
This is the official version that supports 3.1+
* feat(@schematics/angular): use angular version `7.1.0`