From 8acdcb634f9666495ba0149f3ea7e7c490e08019 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 6 Jan 2021 10:13:09 +0100 Subject: [PATCH 001/113] feat(angular: generate convert-to-buildable generator --- packages/angular/generators.json | 6 ++ .../files/src/index.ts__template__ | 1 + .../convert-to-buildable/generator.spec.ts | 20 ++++++ .../convert-to-buildable/generator.ts | 69 +++++++++++++++++++ .../convert-to-buildable/schema.d.ts | 5 ++ .../convert-to-buildable/schema.json | 29 ++++++++ 6 files changed, 130 insertions(+) create mode 100644 packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ create mode 100644 packages/angular/src/generators/convert-to-buildable/generator.spec.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generator.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/schema.d.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/schema.json diff --git a/packages/angular/generators.json b/packages/angular/generators.json index f3378a8..77aec7e 100644 --- a/packages/angular/generators.json +++ b/packages/angular/generators.json @@ -7,6 +7,12 @@ "factory": "./src/generators/angular/generator", "schema": "./src/generators/angular/schema.json", "description": "angular generator" + }, + "convert-to-buildable": { + "factory": "./src/generators/convert-to-buildable/generator", + "schema": "./src/generators/convert-to-buildable/schema.json", + "aliases": ["buildable"], + "description": "Convert to buildable but non-publishable project. Supports application and library projects." } } } diff --git a/packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ b/packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ new file mode 100644 index 0000000..dde3cb6 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ @@ -0,0 +1 @@ +const variable = "<%= projectName %>"; \ No newline at end of file diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts new file mode 100644 index 0000000..8b8a803 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -0,0 +1,20 @@ +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { Tree, readProjectConfiguration } from '@nrwl/devkit'; + +import generator from './generator'; +import { ConvertToBuildableGeneratorSchema } from './schema'; + +describe('convert-to-buildable generator', () => { + let appTree: Tree; + const options: ConvertToBuildableGeneratorSchema = { name: 'test' }; + + beforeEach(() => { + appTree = createTreeWithEmptyWorkspace(); + }); + + it('should run successfully', async () => { + await generator(appTree, options); + const config = readProjectConfiguration(appTree, 'test'); + expect(config).toBeDefined(); + }) +}); diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts new file mode 100644 index 0000000..6954e2d --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -0,0 +1,69 @@ +import { + addProjectConfiguration, + formatFiles, + generateFiles, + getWorkspaceLayout, + names, + offsetFromRoot, + Tree, +} from '@nrwl/devkit'; +import * as path from 'path'; +import { ConvertToBuildableGeneratorSchema } from './schema'; + +interface NormalizedSchema extends ConvertToBuildableGeneratorSchema { + projectName: string; + projectRoot: string; + projectDirectory: string; + parsedTags: string[] +} + +function normalizeOptions(host: Tree, options: ConvertToBuildableGeneratorSchema): NormalizedSchema { + const name = names(options.name).fileName; + const projectDirectory = options.directory + ? `${names(options.directory).fileName}/${name}` + : name; + const projectName = projectDirectory.replace(new RegExp('/', 'g'), '-'); + const projectRoot = `${getWorkspaceLayout(host).libsDir}/${projectDirectory}`; + const parsedTags = options.tags + ? options.tags.split(',').map((s) => s.trim()) + : []; + + return { + ...options, + projectName, + projectRoot, + projectDirectory, + parsedTags, + }; +} + +function addFiles(host: Tree, options: NormalizedSchema) { + const templateOptions = { + ...options, + ...names(options.name), + offsetFromRoot: offsetFromRoot(options.projectRoot), + template: '' + }; + generateFiles(host, path.join(__dirname, 'files'), options.projectRoot, templateOptions); +} + +export default async function (host: Tree, options: ConvertToBuildableGeneratorSchema) { + const normalizedOptions = normalizeOptions(host, options); + addProjectConfiguration( + host, + normalizedOptions.projectName, + { + root: normalizedOptions.projectRoot, + projectType: 'library', + sourceRoot: `${normalizedOptions.projectRoot}/src`, + targets: { + build: { + executor: "@nxworker/convert-to-buildable:build", + }, + }, + tags: normalizedOptions.parsedTags, + } + ); + addFiles(host, normalizedOptions); + await formatFiles(host); +} diff --git a/packages/angular/src/generators/convert-to-buildable/schema.d.ts b/packages/angular/src/generators/convert-to-buildable/schema.d.ts new file mode 100644 index 0000000..bb941dc --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/schema.d.ts @@ -0,0 +1,5 @@ +export interface ConvertToBuildableGeneratorSchema { + name: string; + tags?: string; + directory?: string; +} \ No newline at end of file diff --git a/packages/angular/src/generators/convert-to-buildable/schema.json b/packages/angular/src/generators/convert-to-buildable/schema.json new file mode 100644 index 0000000..fbd9deb --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "id": "ConvertToBuildable", + "title": "", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "", + "$default": { + "$source": "argv", + "index": 0 + }, + "x-prompt": "What name would you like to use?" + }, + "tags": { + "type": "string", + "description": "Add tags to the project (used for linting)", + "alias": "t" + }, + "directory": { + "type": "string", + "description": "A directory where the project is placed", + "alias": "d" + } + }, + "required": ["name"] +} From 9c541fef6c4ca3ad0257adb068d501ef5ae52b0a Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 6 Jan 2021 12:01:31 +0100 Subject: [PATCH 002/113] feat(angular): add convert-to-buildable generator --- packages/angular/generators.json | 2 +- .../files/src/index.ts__template__ | 1 - .../file-template-replacements.d.ts | 24 ++ .../file-types/index.d.ts | 2 + .../file-types/tsconfig-base-json.d.ts | 14 + .../files/ng-package.json__template__ | 7 + .../files/package.json__template__ | 4 + .../files/tsconfig.lib.prod.json__template__ | 11 + ...e-buildable-library-configurations.spec.ts | 240 ++++++++++++++++++ ...nerate-buildable-library-configurations.ts | 71 ++++++ .../util/read-import-path-or-throw.ts | 43 ++++ .../convert-to-buildable/generator.ts | 75 +----- .../convert-to-buildable/normalize-options.ts | 40 +++ .../normalized-schema.d.ts | 27 ++ .../convert-to-buildable/schema.d.ts | 17 +- .../convert-to-buildable/schema.json | 30 +-- 16 files changed, 523 insertions(+), 85 deletions(-) delete mode 100644 packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-base-json.d.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/ng-package.json__template__ create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/package.json__template__ create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/normalize-options.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts diff --git a/packages/angular/generators.json b/packages/angular/generators.json index 77aec7e..f662fc9 100644 --- a/packages/angular/generators.json +++ b/packages/angular/generators.json @@ -12,7 +12,7 @@ "factory": "./src/generators/convert-to-buildable/generator", "schema": "./src/generators/convert-to-buildable/schema.json", "aliases": ["buildable"], - "description": "Convert to buildable but non-publishable project. Supports application and library projects." + "description": "Convert to buildable but non-publishable project. Supports application and workspace library projects." } } } diff --git a/packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ b/packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ deleted file mode 100644 index dde3cb6..0000000 --- a/packages/angular/src/generators/convert-to-buildable/files/src/index.ts__template__ +++ /dev/null @@ -1 +0,0 @@ -const variable = "<%= projectName %>"; \ No newline at end of file diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts new file mode 100644 index 0000000..801e852 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts @@ -0,0 +1,24 @@ +export interface FileTemplateReplacements { + /** + * Whether the production build is compiled with Ivy. This speeds up + * incremental build. + */ + readonly enableIvy: boolean; + /** + * Library import path, for example `@nrwl-airlines/booking/data-access`. + */ + readonly importPath: string; + /** + * Project folder offset from root workspace folder, for example: `'../../'`. + */ + readonly offsetFromRoot: string; + /** + * Project root folder. + */ + readonly projectRoot: string; + /** + * Template files have the `__template__` suffix which will be removed when + * this is set. + */ + readonly template: ''; +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts new file mode 100644 index 0000000..909dcbc --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts @@ -0,0 +1,2 @@ +export * from './file-template-replacements'; +export * from './tsconfig-base-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-base-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-base-json.d.ts new file mode 100644 index 0000000..1dfbcfe --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-base-json.d.ts @@ -0,0 +1,14 @@ +/** + * tsconfig.base.json configuration file in workspace root. + */ +export interface TsconfigBaseJson { + /** + * TypeScript compiler options. + */ + readonly compilerOptions: { + /** + * Import paths also known as TypeScript path mappings. + */ + readonly paths?: { readonly [importPath: string]: readonly string[] }; + }; +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/ng-package.json__template__ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/ng-package.json__template__ new file mode 100644 index 0000000..291387c --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/ng-package.json__template__ @@ -0,0 +1,7 @@ +{ + "$schema": "<%= offsetFromRoot %>node_modules/ng-packagr/ng-package.schema.json", + "dest": "<%= offsetFromRoot %>dist/<%= projectRoot %>", + "lib": { + "entryFile": "src/index.ts" + } +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/package.json__template__ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/package.json__template__ new file mode 100644 index 0000000..bf5092e --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/package.json__template__ @@ -0,0 +1,4 @@ +{ + "name": "<%= importPath %>", + "private": true +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ new file mode 100644 index 0000000..57f1032 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, + "angularCompilerOptions": { + <% if (enableIvy) { %> + "enableIvy": true + <% } %> + } +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts new file mode 100644 index 0000000..3bb12b9 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -0,0 +1,240 @@ +import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import * as path from 'path'; + +import { GeneratorOptions } from '../schema'; +import { + AngularCompilerOptions, + BuildableLibraryPackageJson, + NgPackageJson, + TsconfigBaseJson, + TsconfigJson, +} from '../types'; +import { generatePackageConfigurations } from './generate-package-configurations'; + +describe(generatePackageConfigurations.name, () => { + beforeEach(() => { + host = createTreeWithEmptyWorkspace(); + project = 'shared-ui-buttons'; + importPath = `@nrwl-airlines/shared/ui-buttons`; + projectConfiguration = { + projectType: 'library', + root: 'libs/shared/ui-buttons', + sourceRoot: 'libs/shared/ui-buttons/src', + targets: { + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + 'libs/shared/ui-buttons/src/**/*.ts', + 'libs/shared/ui-buttons/src/**/*.html', + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: ['coverage/libs/shared/ui-buttons'], + options: { + jestConfig: 'libs/shared/ui-buttons/jest.config.js', + passWithNoTests: true, + }, + }, + }, + }; + const tsconfigBase: TsconfigBaseJson = { + compilerOptions: { + paths: { + [importPath]: [`${projectConfiguration.root}/src/index.ts`], + }, + }, + }; + options = { + enableIvy: true, + project, + skipFormat: false, + }; + + host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); + addProjectConfiguration(host, project, projectConfiguration); + }); + + let host: Tree; + let importPath: string; + let options: GeneratorOptions; + let projectConfiguration: ProjectConfiguration; + let project: string; + + describe('Package configurations', () => { + it('generates ng-package.json', async () => { + const filePath = path.join(projectConfiguration.root, 'ng-package.json'); + const expectedNgPackageJson: NgPackageJson = { + $schema: '../../../node_modules/ng-packagr/ng-package.schema.json', + dest: `../../../dist/${projectConfiguration.root}`, + lib: { + entryFile: 'src/index.ts', + }, + }; + + await generatePackageConfigurations(host, options); + + expect(host.exists(filePath)).toBe(true); + const actualNgPackageJson: NgPackageJson = readJson(host, filePath); + expect(actualNgPackageJson).toEqual(expectedNgPackageJson); + }); + + it('generates package.json', async () => { + const filePath = path.join(projectConfiguration.root, 'package.json'); + const expectedPackageJson: BuildableLibraryPackageJson = { + name: importPath, + private: true, + }; + + await generatePackageConfigurations(host, options); + + expect(host.exists(filePath)).toBe(true); + const actualPackageJson: BuildableLibraryPackageJson = readJson( + host, + filePath + ); + expect(actualPackageJson).toEqual(expectedPackageJson); + }); + + it('generates tsconfig.lib.prod.json', async () => { + const filePath = path.join( + projectConfiguration.root, + 'tsconfig.lib.prod.json' + ); + const expectedTsconfig: TsconfigJson = { + extends: './tsconfig.lib.json', + compilerOptions: { + declarationMap: false, + }, + angularCompilerOptions: { + enableIvy: true, + }, + }; + + await generatePackageConfigurations(host, options); + + expect(host.exists(filePath)).toBe(true); + const actualTsconfig: TsconfigJson = readJson(host, filePath); + expect(actualTsconfig).toEqual(expectedTsconfig); + }); + + it('keeps package configurations when they all exist', async () => { + const testConfiguration = { test: true }; + const ngPackageJsonPath = path.join( + projectConfiguration.root, + 'ng-package.json' + ); + const packageJsonPath = path.join( + projectConfiguration.root, + 'package.json' + ); + const productionTsconfigPath = path.join( + projectConfiguration.root, + 'tsconfig.lib.prod.json' + ); + host.write(ngPackageJsonPath, JSON.stringify(testConfiguration)); + host.write(packageJsonPath, JSON.stringify(testConfiguration)); + host.write(productionTsconfigPath, JSON.stringify(testConfiguration)); + + await generatePackageConfigurations(host, options); + + const ngPackageJson = readJson(host, ngPackageJsonPath); + const packageJson = readJson(host, packageJsonPath); + const productionTsconfig = readJson(host, productionTsconfigPath); + expect(ngPackageJson).toEqual(testConfiguration); + expect(packageJson).toEqual(testConfiguration); + expect(productionTsconfig).toEqual(testConfiguration); + }); + + it('overwrites package configurations when only some of them exist', async () => { + const testConfiguration = { test: true }; + const ngPackageJsonPath = path.join( + projectConfiguration.root, + 'ng-package.json' + ); + const packageJsonPath = path.join( + projectConfiguration.root, + 'package.json' + ); + host.write(ngPackageJsonPath, JSON.stringify(testConfiguration)); + host.write(packageJsonPath, JSON.stringify(testConfiguration)); + + await generatePackageConfigurations(host, options); + + const ngPackageJson = readJson(host, ngPackageJsonPath); + const packageJson = readJson(host, packageJsonPath); + expect(ngPackageJson).not.toEqual(testConfiguration); + expect(packageJson).not.toEqual(testConfiguration); + }); + }); + + describe('enableIvy option', () => { + beforeEach(() => { + filePath = path.join(projectConfiguration.root, 'tsconfig.lib.prod.json'); + }); + + let filePath: string; + + it('sets the enableIvy option to true when true is passed', async () => { + options = { + ...options, + enableIvy: true, + }; + const expectedAngularCompilerOptions: AngularCompilerOptions = { + enableIvy: true, + }; + + await generatePackageConfigurations(host, options); + + const actualTsconfig: TsconfigJson = readJson(host, filePath); + expect(actualTsconfig.angularCompilerOptions).toEqual( + expectedAngularCompilerOptions + ); + }); + + it('omits the enableIvy option when false is passed', async () => { + options = { + ...options, + enableIvy: false, + }; + const expectedAngularCompilerOptions: AngularCompilerOptions = {}; + + await generatePackageConfigurations(host, options); + + const actualTsconfig: TsconfigJson = readJson(host, filePath); + expect(actualTsconfig.angularCompilerOptions).toEqual( + expectedAngularCompilerOptions + ); + }); + }); + + describe('Errors', () => { + const tsconfigBaseFilePath = 'tsconfig.base.json'; + + it('throws an error if tsconfig.base.json is missing', async () => { + host.delete(tsconfigBaseFilePath); + + const act = () => generatePackageConfigurations(host, options); + + await expect(act).rejects.toThrowError( + `Cannot find ${tsconfigBaseFilePath}` + ); + }); + + it('throws an error if import path is missing', async () => { + const noPathMap: TsconfigBaseJson = { + compilerOptions: {}, + }; + host.write(tsconfigBaseFilePath, JSON.stringify(noPathMap)); + + const act = () => generatePackageConfigurations(host, options); + + await expect(act).rejects.toThrowError( + `Import path is missing for project "${project}"` + ); + }); + }); +}); diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts new file mode 100644 index 0000000..35feb6c --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts @@ -0,0 +1,71 @@ +import { generateFiles, offsetFromRoot, readJson, Tree } from '@nrwl/devkit'; +import * as path from 'path'; + +import { NormalizedSchema } from '../normalized-schema'; +import { FileTemplateReplacements, TsconfigBaseJson } from './file-types'; + +function getImportPathOrThrow( + host: Tree, + { + project, + projectRoot, + }: { readonly project: string; readonly projectRoot: string } +): string { + const tsconfigBaseJson = readJson( + host, + 'tsconfig.base.json' + ); + const pathMap = tsconfigBaseJson.compilerOptions.paths ?? {}; + const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => + publicApis.some(publicApi => publicApi.startsWith(projectRoot)) + ); + + if (!maybePathEntry) { + throw new Error(`Import path is missing for project "${project}"`); + } + + const [importPath] = maybePathEntry; + + return importPath; +} + +function hasPackageConfigurations(host: Tree, projectRoot: string): boolean { + if (!host.exists(path.join(projectRoot, 'ng-package.json'))) { + return false; + } + + if (!host.exists(path.join(projectRoot, 'package.json'))) { + return false; + } + + if (!host.exists(path.join(projectRoot, 'tsconfig.lib.prod.json'))) { + return false; + } + + return true; +} + +export async function generatePackageConfigurations( + host: Tree, + options: NormalizedSchema +) { + const replacements: FileTemplateReplacements = { + enableIvy: options.enableIvy, + importPath: getImportPathOrThrow(host, { + project: options.projectName, + projectRoot: options.projectRoot, + }), + offsetFromRoot: options.offsetFromRoot, + projectRoot: options.projectRoot, + template: '', + }; + + if (!hasPackageConfigurations(host, options.projectRoot)) { + generateFiles( + host, + path.join(__dirname, '../files'), + options.projectRoot, + replacements + ); + } +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts new file mode 100644 index 0000000..9040fcc --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts @@ -0,0 +1,43 @@ +import { readJson, Tree } from '@nrwl/devkit'; + +import { TsconfigBaseJson } from '../file-types'; + +/** + * Get the import path of the specified project. + * + * @param host Virtual workspace tree. Must have tsconfig.base.json in the + * workspace root folder. + * @param options Project options. + * @param options.projectName The name of the project. + * @param options.projectRoot The root folder of the project. + * @throws {Error} Throws an error if `tsconfig.base.json` is missing from the + * workspace root or if import path for the specified project is missing from + * tsconfig.base.json. + */ +export function readImportPathOrThrow( + host: Tree, + options: { + readonly projectName: string; + readonly projectRoot: string; + } +): string { + const tsconfigBaseJson = readJson( + host, + 'tsconfig.base.json' + ); + const pathMap = tsconfigBaseJson.compilerOptions.paths ?? {}; + + const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => + publicApis.some(publicApi => publicApi.startsWith(options.projectRoot)) + ); + + if (!maybePathEntry) { + throw new Error( + `Import path is missing for project with name "${options.projectName}".` + ); + } + + const [importPath] = maybePathEntry; + + return importPath; +} diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts index 6954e2d..167b0cd 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -1,69 +1,16 @@ +import { Tree } from '@nrwl/devkit'; + import { - addProjectConfiguration, - formatFiles, - generateFiles, - getWorkspaceLayout, - names, - offsetFromRoot, - Tree, -} from '@nrwl/devkit'; -import * as path from 'path'; + generatePackageConfigurations, +} from './generate-buildable-library-configurations/generate-buildable-library-configurations'; +import { normalizeOptions } from './normalize-options'; import { ConvertToBuildableGeneratorSchema } from './schema'; -interface NormalizedSchema extends ConvertToBuildableGeneratorSchema { - projectName: string; - projectRoot: string; - projectDirectory: string; - parsedTags: string[] -} - -function normalizeOptions(host: Tree, options: ConvertToBuildableGeneratorSchema): NormalizedSchema { - const name = names(options.name).fileName; - const projectDirectory = options.directory - ? `${names(options.directory).fileName}/${name}` - : name; - const projectName = projectDirectory.replace(new RegExp('/', 'g'), '-'); - const projectRoot = `${getWorkspaceLayout(host).libsDir}/${projectDirectory}`; - const parsedTags = options.tags - ? options.tags.split(',').map((s) => s.trim()) - : []; - - return { - ...options, - projectName, - projectRoot, - projectDirectory, - parsedTags, - }; -} - -function addFiles(host: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - ...names(options.name), - offsetFromRoot: offsetFromRoot(options.projectRoot), - template: '' - }; - generateFiles(host, path.join(__dirname, 'files'), options.projectRoot, templateOptions); -} - -export default async function (host: Tree, options: ConvertToBuildableGeneratorSchema) { +export default async function ( + host: Tree, + options: ConvertToBuildableGeneratorSchema +) { const normalizedOptions = normalizeOptions(host, options); - addProjectConfiguration( - host, - normalizedOptions.projectName, - { - root: normalizedOptions.projectRoot, - projectType: 'library', - sourceRoot: `${normalizedOptions.projectRoot}/src`, - targets: { - build: { - executor: "@nxworker/convert-to-buildable:build", - }, - }, - tags: normalizedOptions.parsedTags, - } - ); - addFiles(host, normalizedOptions); - await formatFiles(host); + + await generatePackageConfigurations(host, normalizedOptions); } diff --git a/packages/angular/src/generators/convert-to-buildable/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/normalize-options.ts new file mode 100644 index 0000000..7b2093a --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/normalize-options.ts @@ -0,0 +1,40 @@ +import { offsetFromRoot, readProjectConfiguration, Tree } from '@nrwl/devkit'; + +import { readImportPathOrThrow } from './generate-buildable-library-configurations/util/read-import-path-or-throw'; +import { NormalizedSchema } from './normalized-schema'; +import { ConvertToBuildableGeneratorSchema } from './schema'; + +export function normalizeOptions( + host: Tree, + options: ConvertToBuildableGeneratorSchema +): NormalizedSchema { + const { + enableIvy = true, + project: projectName, + skipFormat = false, + } = options; + const { sourceRoot: maybeProjectRoot } = readProjectConfiguration( + host, + projectName + ); + + if (!maybeProjectRoot) { + throw new Error( + `No "sourceRoot" setting for project with name "${projectName}"` + ); + } + + const projectRoot = maybeProjectRoot; + + return { + enableIvy, + importPath: readImportPathOrThrow(host, { + projectName, + projectRoot, + }), + offsetFromRoot: offsetFromRoot(projectRoot), + projectName, + projectRoot, + skipFormat, + }; +} diff --git a/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts b/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts new file mode 100644 index 0000000..f313af6 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts @@ -0,0 +1,27 @@ +export interface NormalizedSchema + extends Exclude { + /** + * Enable incremental Angular Ivy compilation? + */ + readonly enableIvy: boolean; + /** + * Library import path, for example `@nrwl-airlines/booking/data-access`. + */ + readonly importPath: string; + /** + * Project folder offset from root workspace folder, for example: `'../../'`. + */ + readonly offsetFromRoot: string; + /** + * The name of the project. + */ + readonly projectName: string; + /** + * Project root folder. + */ + readonly projectRoot: string; + /** + * Skip formatting files? + */ + readonly skipFormat: boolean; +} diff --git a/packages/angular/src/generators/convert-to-buildable/schema.d.ts b/packages/angular/src/generators/convert-to-buildable/schema.d.ts index bb941dc..dd9aad8 100644 --- a/packages/angular/src/generators/convert-to-buildable/schema.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/schema.d.ts @@ -1,5 +1,14 @@ export interface ConvertToBuildableGeneratorSchema { - name: string; - tags?: string; - directory?: string; -} \ No newline at end of file + /** + * Enable incremental Angular Ivy compilation? + */ + readonly enableIvy?: boolean; + /** + * The name of the project. + */ + readonly project: string; + /** + * Skip formatting files? + */ + readonly skipFormat?: boolean; +} diff --git a/packages/angular/src/generators/convert-to-buildable/schema.json b/packages/angular/src/generators/convert-to-buildable/schema.json index fbd9deb..5798dbe 100644 --- a/packages/angular/src/generators/convert-to-buildable/schema.json +++ b/packages/angular/src/generators/convert-to-buildable/schema.json @@ -2,28 +2,28 @@ "$schema": "http://json-schema.org/schema", "cli": "nx", "id": "ConvertToBuildable", - "title": "", + "title": "Convert to buildable but non-publishable project. Supports application and workspace library projects.", "type": "object", "properties": { - "name": { + "enableIvy": { + "type": "boolean", + "description": "Enable incremental Angular Ivy compilation? (default: true)", + "alias": "i", + "default": true + }, + "project": { "type": "string", - "description": "", + "description": "The name of the project", "$default": { "$source": "argv", "index": 0 - }, - "x-prompt": "What name would you like to use?" + } }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "d" + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files? (default: false)", + "default": false } }, - "required": ["name"] + "required": ["project"] } From 3425916c6e8c05835ad530e9aaa012c34dbf7ce9 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 6 Jan 2021 12:35:52 +0100 Subject: [PATCH 003/113] feat(angular): [WIP] convert-to-buildable --- ...e-buildable-library-configurations.spec.ts | 45 ++++++++--------- ...nerate-buildable-library-configurations.ts | 50 +++++-------------- .../util/read-import-path-or-throw.ts | 9 ++-- .../convert-to-buildable/generator.ts | 15 ++++-- .../normalized-schema.d.ts | 2 +- 5 files changed, 54 insertions(+), 67 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 3bb12b9..0153168 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -2,20 +2,21 @@ import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { GeneratorOptions } from '../schema'; import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigBaseJson, TsconfigJson, -} from '../types'; -import { generatePackageConfigurations } from './generate-package-configurations'; +} from '../file-types'; +import { normalizeOptions } from '../normalize-options'; +import { NormalizedSchema } from '../normalized-schema'; +import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; -describe(generatePackageConfigurations.name, () => { +describe(generateBuildableLibraryConfigurations.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); - project = 'shared-ui-buttons'; + projectName = 'shared-ui-buttons'; importPath = `@nrwl-airlines/shared/ui-buttons`; projectConfiguration = { projectType: 'library', @@ -48,21 +49,19 @@ describe(generatePackageConfigurations.name, () => { }, }, }; - options = { - enableIvy: true, - project, - skipFormat: false, - }; host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); - addProjectConfiguration(host, project, projectConfiguration); + addProjectConfiguration(host, projectName, projectConfiguration); + options = normalizeOptions(host, { + project: projectName, + }); }); let host: Tree; let importPath: string; - let options: GeneratorOptions; + let options: NormalizedSchema; let projectConfiguration: ProjectConfiguration; - let project: string; + let projectName: string; describe('Package configurations', () => { it('generates ng-package.json', async () => { @@ -75,7 +74,7 @@ describe(generatePackageConfigurations.name, () => { }, }; - await generatePackageConfigurations(host, options); + await generateBuildableLibraryConfigurations(host, options); expect(host.exists(filePath)).toBe(true); const actualNgPackageJson: NgPackageJson = readJson(host, filePath); @@ -89,7 +88,7 @@ describe(generatePackageConfigurations.name, () => { private: true, }; - await generatePackageConfigurations(host, options); + await generateBuildableLibraryConfigurations(host, options); expect(host.exists(filePath)).toBe(true); const actualPackageJson: BuildableLibraryPackageJson = readJson( @@ -114,7 +113,7 @@ describe(generatePackageConfigurations.name, () => { }, }; - await generatePackageConfigurations(host, options); + await generateBuildableLibraryConfigurations(host, options); expect(host.exists(filePath)).toBe(true); const actualTsconfig: TsconfigJson = readJson(host, filePath); @@ -139,7 +138,7 @@ describe(generatePackageConfigurations.name, () => { host.write(packageJsonPath, JSON.stringify(testConfiguration)); host.write(productionTsconfigPath, JSON.stringify(testConfiguration)); - await generatePackageConfigurations(host, options); + await generateBuildableLibraryConfigurations(host, options); const ngPackageJson = readJson(host, ngPackageJsonPath); const packageJson = readJson(host, packageJsonPath); @@ -162,7 +161,7 @@ describe(generatePackageConfigurations.name, () => { host.write(ngPackageJsonPath, JSON.stringify(testConfiguration)); host.write(packageJsonPath, JSON.stringify(testConfiguration)); - await generatePackageConfigurations(host, options); + await generateBuildableLibraryConfigurations(host, options); const ngPackageJson = readJson(host, ngPackageJsonPath); const packageJson = readJson(host, packageJsonPath); @@ -187,7 +186,7 @@ describe(generatePackageConfigurations.name, () => { enableIvy: true, }; - await generatePackageConfigurations(host, options); + await generateBuildableLibraryConfigurations(host, options); const actualTsconfig: TsconfigJson = readJson(host, filePath); expect(actualTsconfig.angularCompilerOptions).toEqual( @@ -202,7 +201,7 @@ describe(generatePackageConfigurations.name, () => { }; const expectedAngularCompilerOptions: AngularCompilerOptions = {}; - await generatePackageConfigurations(host, options); + await generateBuildableLibraryConfigurations(host, options); const actualTsconfig: TsconfigJson = readJson(host, filePath); expect(actualTsconfig.angularCompilerOptions).toEqual( @@ -217,7 +216,7 @@ describe(generatePackageConfigurations.name, () => { it('throws an error if tsconfig.base.json is missing', async () => { host.delete(tsconfigBaseFilePath); - const act = () => generatePackageConfigurations(host, options); + const act = () => generateBuildableLibraryConfigurations(host, options); await expect(act).rejects.toThrowError( `Cannot find ${tsconfigBaseFilePath}` @@ -230,10 +229,10 @@ describe(generatePackageConfigurations.name, () => { }; host.write(tsconfigBaseFilePath, JSON.stringify(noPathMap)); - const act = () => generatePackageConfigurations(host, options); + const act = () => generateBuildableLibraryConfigurations(host, options); await expect(act).rejects.toThrowError( - `Import path is missing for project "${project}"` + `Import path is missing for project "${projectName}"` ); }); }); diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts index 35feb6c..071f368 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts @@ -1,33 +1,9 @@ -import { generateFiles, offsetFromRoot, readJson, Tree } from '@nrwl/devkit'; +import { generateFiles, Tree } from '@nrwl/devkit'; import * as path from 'path'; import { NormalizedSchema } from '../normalized-schema'; -import { FileTemplateReplacements, TsconfigBaseJson } from './file-types'; - -function getImportPathOrThrow( - host: Tree, - { - project, - projectRoot, - }: { readonly project: string; readonly projectRoot: string } -): string { - const tsconfigBaseJson = readJson( - host, - 'tsconfig.base.json' - ); - const pathMap = tsconfigBaseJson.compilerOptions.paths ?? {}; - const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => - publicApis.some(publicApi => publicApi.startsWith(projectRoot)) - ); - - if (!maybePathEntry) { - throw new Error(`Import path is missing for project "${project}"`); - } - - const [importPath] = maybePathEntry; - - return importPath; -} +import { FileTemplateReplacements } from './file-types'; +import { readImportPathOrThrow } from './util/read-import-path-or-throw'; function hasPackageConfigurations(host: Tree, projectRoot: string): boolean { if (!host.exists(path.join(projectRoot, 'ng-package.json'))) { @@ -45,26 +21,26 @@ function hasPackageConfigurations(host: Tree, projectRoot: string): boolean { return true; } -export async function generatePackageConfigurations( +export async function generateBuildableLibraryConfigurations( host: Tree, - options: NormalizedSchema + { enableIvy, offsetFromRoot, projectName, projectRoot }: NormalizedSchema ) { const replacements: FileTemplateReplacements = { - enableIvy: options.enableIvy, - importPath: getImportPathOrThrow(host, { - project: options.projectName, - projectRoot: options.projectRoot, + enableIvy, + importPath: readImportPathOrThrow(host, { + projectName, + projectRoot, }), - offsetFromRoot: options.offsetFromRoot, - projectRoot: options.projectRoot, + offsetFromRoot, + projectRoot, template: '', }; - if (!hasPackageConfigurations(host, options.projectRoot)) { + if (!hasPackageConfigurations(host, projectRoot)) { generateFiles( host, path.join(__dirname, '../files'), - options.projectRoot, + projectRoot, replacements ); } diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts index 9040fcc..065aaca 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts @@ -16,7 +16,10 @@ import { TsconfigBaseJson } from '../file-types'; */ export function readImportPathOrThrow( host: Tree, - options: { + { + projectName, + projectRoot, + }: { readonly projectName: string; readonly projectRoot: string; } @@ -28,12 +31,12 @@ export function readImportPathOrThrow( const pathMap = tsconfigBaseJson.compilerOptions.paths ?? {}; const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => - publicApis.some(publicApi => publicApi.startsWith(options.projectRoot)) + publicApis.some(publicApi => publicApi.startsWith(projectRoot)) ); if (!maybePathEntry) { throw new Error( - `Import path is missing for project with name "${options.projectName}".` + `Import path is missing for project with name "${projectName}".` ); } diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts index 167b0cd..d755e02 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -1,7 +1,7 @@ -import { Tree } from '@nrwl/devkit'; +import { formatFiles, installPackagesTask, Tree } from '@nrwl/devkit'; import { - generatePackageConfigurations, + generateBuildableLibraryConfigurations, } from './generate-buildable-library-configurations/generate-buildable-library-configurations'; import { normalizeOptions } from './normalize-options'; import { ConvertToBuildableGeneratorSchema } from './schema'; @@ -12,5 +12,14 @@ export default async function ( ) { const normalizedOptions = normalizeOptions(host, options); - await generatePackageConfigurations(host, normalizedOptions); + await generateBuildableLibraryConfigurations(host, normalizedOptions); + // installNgPackagr(host); + + if (!normalizedOptions.skipFormat) { + await formatFiles(host); + } + + return () => { + installPackagesTask(host); + }; } diff --git a/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts b/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts index f313af6..f76f0e6 100644 --- a/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts @@ -1,5 +1,5 @@ export interface NormalizedSchema - extends Exclude { + extends Omit { /** * Enable incremental Angular Ivy compilation? */ From 760f3ea0e4515526f59586a2e95c0bc5a02d5472 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 6 Jan 2021 21:48:16 +0100 Subject: [PATCH 004/113] docs: change "folder" to "directory" --- .../file-types/file-template-replacements.d.ts | 4 ++-- .../util/read-import-path-or-throw.ts | 4 ++-- .../generators/convert-to-buildable/normalized-schema.d.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts index 801e852..54cc080 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts @@ -9,11 +9,11 @@ export interface FileTemplateReplacements { */ readonly importPath: string; /** - * Project folder offset from root workspace folder, for example: `'../../'`. + * Project directory offset from root workspace directory, for example: `'../../'`. */ readonly offsetFromRoot: string; /** - * Project root folder. + * Project root directory. */ readonly projectRoot: string; /** diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts index 065aaca..2e54f03 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts @@ -6,10 +6,10 @@ import { TsconfigBaseJson } from '../file-types'; * Get the import path of the specified project. * * @param host Virtual workspace tree. Must have tsconfig.base.json in the - * workspace root folder. + * workspace root directory. * @param options Project options. * @param options.projectName The name of the project. - * @param options.projectRoot The root folder of the project. + * @param options.projectRoot The root directory of the project. * @throws {Error} Throws an error if `tsconfig.base.json` is missing from the * workspace root or if import path for the specified project is missing from * tsconfig.base.json. diff --git a/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts b/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts index f76f0e6..f62921c 100644 --- a/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts @@ -9,7 +9,7 @@ export interface NormalizedSchema */ readonly importPath: string; /** - * Project folder offset from root workspace folder, for example: `'../../'`. + * Project directory offset from root workspace directory, for example: `'../../'`. */ readonly offsetFromRoot: string; /** @@ -17,7 +17,7 @@ export interface NormalizedSchema */ readonly projectName: string; /** - * Project root folder. + * Project root directory. */ readonly projectRoot: string; /** From eed4058d4d2f043526ac47d4dc281d964046fdbe Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 6 Jan 2021 22:06:54 +0100 Subject: [PATCH 005/113] test: add missing file declarations --- .../file-types/index.d.ts | 3 + .../file-types/ng-package-json.d.ts | 27 ++++++++ .../file-types/package-json.d.ts | 28 +++++++++ .../file-types/tsconfig-lib-prod-json.d.ts | 37 +++++++++++ ...e-buildable-library-configurations.spec.ts | 61 +++++++------------ 5 files changed, 118 insertions(+), 38 deletions(-) create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/ng-package-json.d.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/package-json.d.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts index 909dcbc..d322fe3 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts @@ -1,2 +1,5 @@ export * from './file-template-replacements'; +export * from './ng-package-json'; +export * from './package-json'; export * from './tsconfig-base-json'; +export * from './tsconfig-lib-prod-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/ng-package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/ng-package-json.d.ts new file mode 100644 index 0000000..eb57adc --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/ng-package-json.d.ts @@ -0,0 +1,27 @@ +/** + * ng-package.json configuration file in buildable library root directory. Used + * by ng-packagr for publishable libraries and ng-packagr-lite for buildable + * libraries. + */ +export interface NgPackageJson { + /** + * Relative path referring to the + * node_modules/ng-packagr/ng-packagr.schema.json JSON schema file. + */ + readonly $schema: string; + /** + * Relative path referring to the project output path, for example + * `../../../dist/libs/booking/data-access`. + */ + readonly dest: string; + /** + * Library configuration. + */ + readonly lib: { + /** + * Absolute projet path referring to the public API file, for example + * `src/index.ts`. + */ + readonly entryFile: string; + }; +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/package-json.d.ts new file mode 100644 index 0000000..d9744f6 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/package-json.d.ts @@ -0,0 +1,28 @@ +/** + * package.json configuration file in buildable library root directory. + */ +export interface BuildableLibraryPackageJson { + /** + * Import path of the buildable library. + */ + readonly name: string; + /** + * Set to `true` to prevent accidental publishing to a package registry. + */ + readonly private: boolean; +} + +/** + * package.json configuration file in workspace root directory. + */ +export interface WorkspaceRootPackageJson { + /** + * Package dependencies not used during runtime. + */ + readonly devDependencies?: { + /** + * Package name mapped to version range. + */ + readonly [packageName: string]: string; + }; +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts new file mode 100644 index 0000000..6188bcc --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts @@ -0,0 +1,37 @@ +/** + * Angular compiler options in a TypeScript configuration file + * (tsconfig[.*].json). + */ +export interface AngularCompilerOptions { + /** + * `true` uses the Angular Ivy compiler. `false` uses the Angular View Engine + * compiler. + */ + readonly enableIvy?: boolean; +} + +/** + * tsconfig.lib.prod.json configuration file in project root folder. Used for + * `production` configuration to the `build` target of a buildable library. + */ +export interface TsconfigLibProdJson { + /** + * References tsconfig.lib.json in the same directory. + */ + readonly extends: string; + /** + * TypeScript compiler options. + */ + readonly compilerOptions: { + /** + * When set to `true` while the `declaration` option is enabled, a + * `d.ts.map` source map is also output. Set to `false` in production builds + * for faster compilation. + */ + readonly declarationMap: boolean; + }; + /** + * Angular compiler options. + */ + readonly angularCompilerOptions: AngularCompilerOptions; +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 0153168..0561b9c 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -2,15 +2,15 @@ import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; +import { normalizeOptions } from '../normalize-options'; +import { NormalizedSchema } from '../normalized-schema'; import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigBaseJson, - TsconfigJson, -} from '../file-types'; -import { normalizeOptions } from '../normalize-options'; -import { NormalizedSchema } from '../normalized-schema'; + TsconfigLibProdJson, +} from './file-types'; import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; describe(generateBuildableLibraryConfigurations.name, () => { @@ -18,7 +18,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { host = createTreeWithEmptyWorkspace(); projectName = 'shared-ui-buttons'; importPath = `@nrwl-airlines/shared/ui-buttons`; - projectConfiguration = { + project = { projectType: 'library', root: 'libs/shared/ui-buttons', sourceRoot: 'libs/shared/ui-buttons/src', @@ -45,13 +45,13 @@ describe(generateBuildableLibraryConfigurations.name, () => { const tsconfigBase: TsconfigBaseJson = { compilerOptions: { paths: { - [importPath]: [`${projectConfiguration.root}/src/index.ts`], + [importPath]: [`${project.root}/src/index.ts`], }, }, }; host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); - addProjectConfiguration(host, projectName, projectConfiguration); + addProjectConfiguration(host, projectName, project); options = normalizeOptions(host, { project: projectName, }); @@ -60,15 +60,15 @@ describe(generateBuildableLibraryConfigurations.name, () => { let host: Tree; let importPath: string; let options: NormalizedSchema; - let projectConfiguration: ProjectConfiguration; + let project: ProjectConfiguration; let projectName: string; describe('Package configurations', () => { it('generates ng-package.json', async () => { - const filePath = path.join(projectConfiguration.root, 'ng-package.json'); + const filePath = path.join(project.root, 'ng-package.json'); const expectedNgPackageJson: NgPackageJson = { $schema: '../../../node_modules/ng-packagr/ng-package.schema.json', - dest: `../../../dist/${projectConfiguration.root}`, + dest: `../../../dist/${project.root}`, lib: { entryFile: 'src/index.ts', }, @@ -82,7 +82,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { }); it('generates package.json', async () => { - const filePath = path.join(projectConfiguration.root, 'package.json'); + const filePath = path.join(project.root, 'package.json'); const expectedPackageJson: BuildableLibraryPackageJson = { name: importPath, private: true, @@ -99,11 +99,8 @@ describe(generateBuildableLibraryConfigurations.name, () => { }); it('generates tsconfig.lib.prod.json', async () => { - const filePath = path.join( - projectConfiguration.root, - 'tsconfig.lib.prod.json' - ); - const expectedTsconfig: TsconfigJson = { + const filePath = path.join(project.root, 'tsconfig.lib.prod.json'); + const expectedTsconfig: TsconfigLibProdJson = { extends: './tsconfig.lib.json', compilerOptions: { declarationMap: false, @@ -116,22 +113,16 @@ describe(generateBuildableLibraryConfigurations.name, () => { await generateBuildableLibraryConfigurations(host, options); expect(host.exists(filePath)).toBe(true); - const actualTsconfig: TsconfigJson = readJson(host, filePath); + const actualTsconfig: TsconfigLibProdJson = readJson(host, filePath); expect(actualTsconfig).toEqual(expectedTsconfig); }); it('keeps package configurations when they all exist', async () => { const testConfiguration = { test: true }; - const ngPackageJsonPath = path.join( - projectConfiguration.root, - 'ng-package.json' - ); - const packageJsonPath = path.join( - projectConfiguration.root, - 'package.json' - ); + const ngPackageJsonPath = path.join(project.root, 'ng-package.json'); + const packageJsonPath = path.join(project.root, 'package.json'); const productionTsconfigPath = path.join( - projectConfiguration.root, + project.root, 'tsconfig.lib.prod.json' ); host.write(ngPackageJsonPath, JSON.stringify(testConfiguration)); @@ -150,14 +141,8 @@ describe(generateBuildableLibraryConfigurations.name, () => { it('overwrites package configurations when only some of them exist', async () => { const testConfiguration = { test: true }; - const ngPackageJsonPath = path.join( - projectConfiguration.root, - 'ng-package.json' - ); - const packageJsonPath = path.join( - projectConfiguration.root, - 'package.json' - ); + const ngPackageJsonPath = path.join(project.root, 'ng-package.json'); + const packageJsonPath = path.join(project.root, 'package.json'); host.write(ngPackageJsonPath, JSON.stringify(testConfiguration)); host.write(packageJsonPath, JSON.stringify(testConfiguration)); @@ -172,7 +157,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { describe('enableIvy option', () => { beforeEach(() => { - filePath = path.join(projectConfiguration.root, 'tsconfig.lib.prod.json'); + filePath = path.join(project.root, 'tsconfig.lib.prod.json'); }); let filePath: string; @@ -188,7 +173,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { await generateBuildableLibraryConfigurations(host, options); - const actualTsconfig: TsconfigJson = readJson(host, filePath); + const actualTsconfig: TsconfigLibProdJson = readJson(host, filePath); expect(actualTsconfig.angularCompilerOptions).toEqual( expectedAngularCompilerOptions ); @@ -203,7 +188,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { await generateBuildableLibraryConfigurations(host, options); - const actualTsconfig: TsconfigJson = readJson(host, filePath); + const actualTsconfig: TsconfigLibProdJson = readJson(host, filePath); expect(actualTsconfig.angularCompilerOptions).toEqual( expectedAngularCompilerOptions ); @@ -232,7 +217,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { const act = () => generateBuildableLibraryConfigurations(host, options); await expect(act).rejects.toThrowError( - `Import path is missing for project "${projectName}"` + `Import path is missing for project with name "${projectName}"` ); }); }); From 633985d19721352d3d6d11c4ea6d79a2cac13bc9 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 6 Jan 2021 23:50:08 +0100 Subject: [PATCH 006/113] feat(angular): fix file generation --- ...nerate-buildable-library-configurations.ts | 19 ++--------------- .../util/has-package-configurations.ts | 21 +++++++++++++++++++ .../convert-to-buildable/normalize-options.ts | 13 +----------- 3 files changed, 24 insertions(+), 29 deletions(-) create mode 100644 packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/has-package-configurations.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts index 071f368..24117b2 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts @@ -3,24 +3,9 @@ import * as path from 'path'; import { NormalizedSchema } from '../normalized-schema'; import { FileTemplateReplacements } from './file-types'; +import { hasPackageConfigurations } from './util/has-package-configurations'; import { readImportPathOrThrow } from './util/read-import-path-or-throw'; -function hasPackageConfigurations(host: Tree, projectRoot: string): boolean { - if (!host.exists(path.join(projectRoot, 'ng-package.json'))) { - return false; - } - - if (!host.exists(path.join(projectRoot, 'package.json'))) { - return false; - } - - if (!host.exists(path.join(projectRoot, 'tsconfig.lib.prod.json'))) { - return false; - } - - return true; -} - export async function generateBuildableLibraryConfigurations( host: Tree, { enableIvy, offsetFromRoot, projectName, projectRoot }: NormalizedSchema @@ -39,7 +24,7 @@ export async function generateBuildableLibraryConfigurations( if (!hasPackageConfigurations(host, projectRoot)) { generateFiles( host, - path.join(__dirname, '../files'), + path.join(__dirname, 'files'), projectRoot, replacements ); diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/has-package-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/has-package-configurations.ts new file mode 100644 index 0000000..aae4bc1 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/has-package-configurations.ts @@ -0,0 +1,21 @@ +import { Tree } from '@nrwl/devkit'; +import * as path from 'path'; + +export function hasPackageConfigurations( + host: Tree, + projectRoot: string +): boolean { + if (!host.exists(path.join(projectRoot, 'ng-package.json'))) { + return false; + } + + if (!host.exists(path.join(projectRoot, 'package.json'))) { + return false; + } + + if (!host.exists(path.join(projectRoot, 'tsconfig.lib.prod.json'))) { + return false; + } + + return true; +} diff --git a/packages/angular/src/generators/convert-to-buildable/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/normalize-options.ts index 7b2093a..3252232 100644 --- a/packages/angular/src/generators/convert-to-buildable/normalize-options.ts +++ b/packages/angular/src/generators/convert-to-buildable/normalize-options.ts @@ -13,18 +13,7 @@ export function normalizeOptions( project: projectName, skipFormat = false, } = options; - const { sourceRoot: maybeProjectRoot } = readProjectConfiguration( - host, - projectName - ); - - if (!maybeProjectRoot) { - throw new Error( - `No "sourceRoot" setting for project with name "${projectName}"` - ); - } - - const projectRoot = maybeProjectRoot; + const { root: projectRoot } = readProjectConfiguration(host, projectName); return { enableIvy, From 0e4bf4325841aa7d855cd99a7c6179fd25205aaf Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 7 Jan 2021 00:23:57 +0100 Subject: [PATCH 007/113] refactor(angular): restructure convert-to-buildable files --- .../file-types/index.d.ts | 2 + .../file-types/package-json.d.ts | 14 ++++ .../file-types/tsconfig-base-json.d.ts | 0 .../convert-to-buildable/generator.spec.ts | 6 +- .../convert-to-buildable/generator.ts | 6 +- .../file-template-replacements.d.ts | 0 .../file-types/index.d.ts | 1 - .../file-types/ng-package-json.d.ts | 0 .../file-types/package-json.d.ts | 15 ---- .../file-types/tsconfig-lib-prod-json.d.ts | 0 .../files/ng-package.json__template__ | 0 .../files/package.json__template__ | 0 .../files/tsconfig.lib.prod.json__template__ | 0 ...e-buildable-library-configurations.spec.ts | 12 +-- ...nerate-buildable-library-configurations.ts | 3 +- .../index.ts | 1 + .../util/has-package-configurations.ts | 0 .../tasks/install-ng-packagr.spec.ts | 79 +++++++++++++++++++ .../tasks/install-ng-packagr.ts | 27 +++++++ .../convert-to-buildable/util/index.ts | 3 + .../{ => util}/normalize-options.ts | 4 +- .../normalized-schema.ts} | 2 + .../util/read-import-path-or-throw.ts | 0 23 files changed, 139 insertions(+), 36 deletions(-) create mode 100644 packages/angular/src/generators/convert-to-buildable/file-types/index.d.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/file-types/package-json.d.ts rename packages/angular/src/generators/convert-to-buildable/{generate-buildable-library-configurations => }/file-types/tsconfig-base-json.d.ts (100%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts (100%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/file-types/index.d.ts (80%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/file-types/ng-package-json.d.ts (100%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/file-types/package-json.d.ts (50%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts (100%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/files/ng-package.json__template__ (100%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/files/package.json__template__ (100%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ (100%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts (96%) rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/generate-buildable-library-configurations.ts (85%) create mode 100644 packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/index.ts rename packages/angular/src/generators/convert-to-buildable/{ => generators}/generate-buildable-library-configurations/util/has-package-configurations.ts (100%) create mode 100644 packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.spec.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/util/index.ts rename packages/angular/src/generators/convert-to-buildable/{ => util}/normalize-options.ts (78%) rename packages/angular/src/generators/convert-to-buildable/{normalized-schema.d.ts => util/normalized-schema.ts} (91%) rename packages/angular/src/generators/convert-to-buildable/{generate-buildable-library-configurations => }/util/read-import-path-or-throw.ts (100%) diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/index.d.ts b/packages/angular/src/generators/convert-to-buildable/file-types/index.d.ts new file mode 100644 index 0000000..44252ec --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/file-types/index.d.ts @@ -0,0 +1,2 @@ +export * from './package-json'; +export * from './tsconfig-base-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/file-types/package-json.d.ts new file mode 100644 index 0000000..78d71c7 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/file-types/package-json.d.ts @@ -0,0 +1,14 @@ +/** + * package.json configuration file in workspace root directory. + */ +export interface WorkspaceRootPackageJson { + /** + * Package dependencies not used during runtime. + */ + readonly devDependencies?: { + /** + * Package name mapped to version range. + */ + readonly [packageName: string]: string; + }; +} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-base-json.d.ts b/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-base-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 8b8a803..038c42a 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -1,12 +1,12 @@ +import { readProjectConfiguration, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { Tree, readProjectConfiguration } from '@nrwl/devkit'; import generator from './generator'; import { ConvertToBuildableGeneratorSchema } from './schema'; describe('convert-to-buildable generator', () => { let appTree: Tree; - const options: ConvertToBuildableGeneratorSchema = { name: 'test' }; + const options: ConvertToBuildableGeneratorSchema = { project: 'test' }; beforeEach(() => { appTree = createTreeWithEmptyWorkspace(); @@ -16,5 +16,5 @@ describe('convert-to-buildable generator', () => { await generator(appTree, options); const config = readProjectConfiguration(appTree, 'test'); expect(config).toBeDefined(); - }) + }); }); diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts index d755e02..f1fc53a 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -1,10 +1,8 @@ import { formatFiles, installPackagesTask, Tree } from '@nrwl/devkit'; -import { - generateBuildableLibraryConfigurations, -} from './generate-buildable-library-configurations/generate-buildable-library-configurations'; -import { normalizeOptions } from './normalize-options'; +import { generateBuildableLibraryConfigurations } from './generators/generate-buildable-library-configurations'; import { ConvertToBuildableGeneratorSchema } from './schema'; +import { normalizeOptions } from './util'; export default async function ( host: Tree, diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/index.d.ts similarity index 80% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/index.d.ts index d322fe3..fb57653 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/index.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/index.d.ts @@ -1,5 +1,4 @@ export * from './file-template-replacements'; export * from './ng-package-json'; export * from './package-json'; -export * from './tsconfig-base-json'; export * from './tsconfig-lib-prod-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/ng-package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/ng-package-json.d.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/ng-package-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/ng-package-json.d.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/package-json.d.ts similarity index 50% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/package-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/package-json.d.ts index d9744f6..c22750b 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/package-json.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/package-json.d.ts @@ -11,18 +11,3 @@ export interface BuildableLibraryPackageJson { */ readonly private: boolean; } - -/** - * package.json configuration file in workspace root directory. - */ -export interface WorkspaceRootPackageJson { - /** - * Package dependencies not used during runtime. - */ - readonly devDependencies?: { - /** - * Package name mapped to version range. - */ - readonly [packageName: string]: string; - }; -} diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/ng-package.json__template__ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/files/ng-package.json__template__ similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/ng-package.json__template__ rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/files/ng-package.json__template__ diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/package.json__template__ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/files/package.json__template__ similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/package.json__template__ rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/files/package.json__template__ diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/files/tsconfig.lib.prod.json__template__ diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts similarity index 96% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 0561b9c..4fc928d 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -2,15 +2,9 @@ import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { normalizeOptions } from '../normalize-options'; -import { NormalizedSchema } from '../normalized-schema'; -import { - AngularCompilerOptions, - BuildableLibraryPackageJson, - NgPackageJson, - TsconfigBaseJson, - TsconfigLibProdJson, -} from './file-types'; +import { TsconfigBaseJson } from '../../file-types'; +import { NormalizedSchema, normalizeOptions } from '../../util'; +import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigLibProdJson } from './file-types'; import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; describe(generateBuildableLibraryConfigurations.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts similarity index 85% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts index 24117b2..8d935b2 100644 --- a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/generate-buildable-library-configurations.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts @@ -1,10 +1,9 @@ import { generateFiles, Tree } from '@nrwl/devkit'; import * as path from 'path'; -import { NormalizedSchema } from '../normalized-schema'; +import { NormalizedSchema, readImportPathOrThrow } from '../../util'; import { FileTemplateReplacements } from './file-types'; import { hasPackageConfigurations } from './util/has-package-configurations'; -import { readImportPathOrThrow } from './util/read-import-path-or-throw'; export async function generateBuildableLibraryConfigurations( host: Tree, diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/index.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/index.ts new file mode 100644 index 0000000..02e08dd --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/index.ts @@ -0,0 +1 @@ +export * from './generate-buildable-library-configurations'; diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/has-package-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/util/has-package-configurations.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/has-package-configurations.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/util/has-package-configurations.ts diff --git a/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.spec.ts new file mode 100644 index 0000000..2798626 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.spec.ts @@ -0,0 +1,79 @@ +import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; + +import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../file-types'; +import { installNgPackagr } from './install-ng-packagr'; + +describe(installNgPackagr.name, () => { + beforeEach(() => { + host = createTreeWithEmptyWorkspace(); + project = 'shared-ui-buttons'; + importPath = `@nrwl-airlines/shared/ui-buttons`; + projectConfiguration = { + projectType: 'library', + root: 'libs/shared/ui-buttons', + sourceRoot: 'libs/shared/ui-buttons/src', + targets: { + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + 'libs/shared/ui-buttons/src/**/*.ts', + 'libs/shared/ui-buttons/src/**/*.html', + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: ['coverage/libs/shared/ui-buttons'], + options: { + jestConfig: 'libs/shared/ui-buttons/jest.config.js', + passWithNoTests: true, + }, + }, + }, + }; + const tsconfigBase: TsconfigBaseJson = { + compilerOptions: { + paths: { + [importPath]: [`${projectConfiguration.sourceRoot}/index.ts`], + }, + }, + }; + + host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); + addProjectConfiguration(host, project, projectConfiguration); + }); + + let host: Tree; + let importPath: string; + let projectConfiguration: ProjectConfiguration; + let project: string; + + it('installs ng-packagr when not installed', async () => { + await installNgPackagr(host); + + const { devDependencies = {} } = readJson( + host, + 'package.json' + ); + expect(devDependencies['ng-packagr']).toBe('*'); + }); + + it('leaves ng-packagr version intact when already installed', async () => { + const packageJson: WorkspaceRootPackageJson = { + devDependencies: { + ['ng-packagr']: '13.37.0', + }, + }; + host.write('package.json', JSON.stringify(packageJson)); + + await installNgPackagr(host); + + const { devDependencies = {} } = readJson( + host, + 'package.json' + ); + expect(devDependencies['ng-packagr']).toBe('13.37.0'); + }); +}); diff --git a/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.ts b/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.ts new file mode 100644 index 0000000..6132518 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.ts @@ -0,0 +1,27 @@ +import { readJson, Tree } from '@nrwl/devkit'; + +import { WorkspaceRootPackageJson } from '../file-types'; + +export function installNgPackagr(host: Tree) { + const packageJsonPath = 'package.json'; + const currentPackageJson: WorkspaceRootPackageJson = readJson( + host, + packageJsonPath + ); + const isNgPackagrInstalled = + currentPackageJson?.devDependencies['ng-packagr'] !== undefined; + + if (isNgPackagrInstalled) { + return; + } + + const modifiedPackageJson: WorkspaceRootPackageJson = { + ...currentPackageJson, + devDependencies: { + ...currentPackageJson.devDependencies, + 'ng-packagr': '*', + }, + }; + + host.write(packageJsonPath, JSON.stringify(modifiedPackageJson, null, 2)); +} diff --git a/packages/angular/src/generators/convert-to-buildable/util/index.ts b/packages/angular/src/generators/convert-to-buildable/util/index.ts new file mode 100644 index 0000000..5c49195 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/util/index.ts @@ -0,0 +1,3 @@ +export * from './normalize-options'; +export * from './normalized-schema'; +export * from './read-import-path-or-throw'; diff --git a/packages/angular/src/generators/convert-to-buildable/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts similarity index 78% rename from packages/angular/src/generators/convert-to-buildable/normalize-options.ts rename to packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts index 3252232..e69227e 100644 --- a/packages/angular/src/generators/convert-to-buildable/normalize-options.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts @@ -1,8 +1,8 @@ import { offsetFromRoot, readProjectConfiguration, Tree } from '@nrwl/devkit'; -import { readImportPathOrThrow } from './generate-buildable-library-configurations/util/read-import-path-or-throw'; +import { ConvertToBuildableGeneratorSchema } from '../schema'; import { NormalizedSchema } from './normalized-schema'; -import { ConvertToBuildableGeneratorSchema } from './schema'; +import { readImportPathOrThrow } from './read-import-path-or-throw'; export function normalizeOptions( host: Tree, diff --git a/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts similarity index 91% rename from packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts rename to packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts index f62921c..0a3b540 100644 --- a/packages/angular/src/generators/convert-to-buildable/normalized-schema.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts @@ -1,3 +1,5 @@ +import { ConvertToBuildableGeneratorSchema } from '../schema'; + export interface NormalizedSchema extends Omit { /** diff --git a/packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generate-buildable-library-configurations/util/read-import-path-or-throw.ts rename to packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts From 66775f3cb7df91edbb5bb75508e9d10facb8cd94 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 7 Jan 2021 00:42:21 +0100 Subject: [PATCH 008/113] refactor(angular): rename addNgPackagr --- .../src/generators/convert-to-buildable/generator.ts | 11 ++++++----- .../add-ng-packagr/add-ng-packagr.spec.ts} | 10 +++++----- .../add-ng-packagr/add-ng-packagr.ts} | 6 +++--- .../generators/add-ng-packagr/index.ts | 1 + 4 files changed, 15 insertions(+), 13 deletions(-) rename packages/angular/src/generators/convert-to-buildable/{tasks/install-ng-packagr.spec.ts => generators/add-ng-packagr/add-ng-packagr.spec.ts} (89%) rename packages/angular/src/generators/convert-to-buildable/{tasks/install-ng-packagr.ts => generators/add-ng-packagr/add-ng-packagr.ts} (75%) create mode 100644 packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/index.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts index f1fc53a..c3c455a 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -1,19 +1,20 @@ import { formatFiles, installPackagesTask, Tree } from '@nrwl/devkit'; +import { addNgPackagr } from './generators/add-ng-packagr'; import { generateBuildableLibraryConfigurations } from './generators/generate-buildable-library-configurations'; import { ConvertToBuildableGeneratorSchema } from './schema'; import { normalizeOptions } from './util'; export default async function ( host: Tree, - options: ConvertToBuildableGeneratorSchema + schema: ConvertToBuildableGeneratorSchema ) { - const normalizedOptions = normalizeOptions(host, options); + const options = normalizeOptions(host, schema); - await generateBuildableLibraryConfigurations(host, normalizedOptions); - // installNgPackagr(host); + await generateBuildableLibraryConfigurations(host, options); + addNgPackagr(host); - if (!normalizedOptions.skipFormat) { + if (!options.skipFormat) { await formatFiles(host); } diff --git a/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts similarity index 89% rename from packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.spec.ts rename to packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 2798626..55914bc 100644 --- a/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -1,10 +1,10 @@ import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../file-types'; -import { installNgPackagr } from './install-ng-packagr'; +import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; +import { addNgPackagr } from './add-ng-packagr'; -describe(installNgPackagr.name, () => { +describe(addNgPackagr.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); project = 'shared-ui-buttons'; @@ -51,7 +51,7 @@ describe(installNgPackagr.name, () => { let project: string; it('installs ng-packagr when not installed', async () => { - await installNgPackagr(host); + await addNgPackagr(host); const { devDependencies = {} } = readJson( host, @@ -68,7 +68,7 @@ describe(installNgPackagr.name, () => { }; host.write('package.json', JSON.stringify(packageJson)); - await installNgPackagr(host); + await addNgPackagr(host); const { devDependencies = {} } = readJson( host, diff --git a/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts similarity index 75% rename from packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.ts rename to packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts index 6132518..ca55c5d 100644 --- a/packages/angular/src/generators/convert-to-buildable/tasks/install-ng-packagr.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts @@ -1,15 +1,15 @@ import { readJson, Tree } from '@nrwl/devkit'; -import { WorkspaceRootPackageJson } from '../file-types'; +import { WorkspaceRootPackageJson } from '../../file-types'; -export function installNgPackagr(host: Tree) { +export function addNgPackagr(host: Tree) { const packageJsonPath = 'package.json'; const currentPackageJson: WorkspaceRootPackageJson = readJson( host, packageJsonPath ); const isNgPackagrInstalled = - currentPackageJson?.devDependencies['ng-packagr'] !== undefined; + currentPackageJson.devDependencies?.['ng-packagr'] !== undefined; if (isNgPackagrInstalled) { return; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/index.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/index.ts new file mode 100644 index 0000000..939f223 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/index.ts @@ -0,0 +1 @@ +export * from './add-ng-packagr'; From f71f24651291530d84ec950090e105ea75ca2628 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 7 Jan 2021 00:44:30 +0100 Subject: [PATCH 009/113] test(angular): rename variables --- .../generators/add-ng-packagr/add-ng-packagr.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 55914bc..282a536 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -7,9 +7,9 @@ import { addNgPackagr } from './add-ng-packagr'; describe(addNgPackagr.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); - project = 'shared-ui-buttons'; + projectName = 'shared-ui-buttons'; importPath = `@nrwl-airlines/shared/ui-buttons`; - projectConfiguration = { + project = { projectType: 'library', root: 'libs/shared/ui-buttons', sourceRoot: 'libs/shared/ui-buttons/src', @@ -36,19 +36,19 @@ describe(addNgPackagr.name, () => { const tsconfigBase: TsconfigBaseJson = { compilerOptions: { paths: { - [importPath]: [`${projectConfiguration.sourceRoot}/index.ts`], + [importPath]: [`${project.sourceRoot}/index.ts`], }, }, }; host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); - addProjectConfiguration(host, project, projectConfiguration); + addProjectConfiguration(host, projectName, project); }); let host: Tree; let importPath: string; - let projectConfiguration: ProjectConfiguration; - let project: string; + let project: ProjectConfiguration; + let projectName: string; it('installs ng-packagr when not installed', async () => { await addNgPackagr(host); From f7ee04695a136ae30f5606c712c312f0b5c23eeb Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 7 Jan 2021 01:04:23 +0100 Subject: [PATCH 010/113] feat(angular): accept source root folder in readImportPathOrThrow --- ...nerate-buildable-library-configurations.ts | 10 +++- .../util/normalize-options.ts | 16 +++++- .../util/normalized-schema.ts | 7 ++- .../util/read-import-path-or-throw.spec.ts | 53 +++++++++++++++++++ .../util/read-import-path-or-throw.ts | 6 +-- 5 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts index 8d935b2..278558a 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts @@ -7,13 +7,19 @@ import { hasPackageConfigurations } from './util/has-package-configurations'; export async function generateBuildableLibraryConfigurations( host: Tree, - { enableIvy, offsetFromRoot, projectName, projectRoot }: NormalizedSchema + { + enableIvy, + offsetFromRoot, + projectName, + projectRoot, + sourceRoot, + }: NormalizedSchema ) { const replacements: FileTemplateReplacements = { enableIvy, importPath: readImportPathOrThrow(host, { projectName, - projectRoot, + sourceRoot, }), offsetFromRoot, projectRoot, diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts index e69227e..a108186 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts @@ -13,17 +13,29 @@ export function normalizeOptions( project: projectName, skipFormat = false, } = options; - const { root: projectRoot } = readProjectConfiguration(host, projectName); + const { + root: projectRoot, + sourceRoot: maybeSourceRoot, + } = readProjectConfiguration(host, projectName); + + if (!maybeSourceRoot) { + throw new Error( + `No "sourceRoot" option for project with name "${projectName}"` + ); + } + + const sourceRoot = maybeSourceRoot; return { enableIvy, importPath: readImportPathOrThrow(host, { projectName, - projectRoot, + sourceRoot, }), offsetFromRoot: offsetFromRoot(projectRoot), projectName, projectRoot, skipFormat, + sourceRoot, }; } diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts index 0a3b540..29a1c1a 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts @@ -11,7 +11,8 @@ export interface NormalizedSchema */ readonly importPath: string; /** - * Project directory offset from root workspace directory, for example: `'../../'`. + * Project directory offset from root workspace directory, for example + * `'../../'`. */ readonly offsetFromRoot: string; /** @@ -22,6 +23,10 @@ export interface NormalizedSchema * Project root directory. */ readonly projectRoot: string; + /** + * Project source directory, for example `libs/shared/util-formatting/src`. + */ + readonly sourceRoot: string; /** * Skip formatting files? */ diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts new file mode 100644 index 0000000..bacfaaf --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts @@ -0,0 +1,53 @@ +import { Tree } from '@nrwl/devkit'; +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; + +import { TsconfigBaseJson } from '../file-types'; +import { readImportPathOrThrow } from './read-import-path-or-throw'; + +describe(readImportPathOrThrow.name, () => { + beforeEach(() => { + host = createTreeWithEmptyWorkspace(); + }); + + let host: Tree; + const projectName = 'shared-ui-buttons'; + const sourceRoot = 'libs/shared/ui-buttons'; + + it('reads import path when defined in path map', () => { + const expectedImportPath = '@nrwl-airlines/shared/ui-buttons'; + const tsconfigBase: TsconfigBaseJson = { + compilerOptions: { + paths: { + [expectedImportPath]: [`${sourceRoot}/index.ts`], + }, + }, + }; + host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); + + const actualImportPath = readImportPathOrThrow(host, { + projectName, + sourceRoot, + }); + + expect(actualImportPath).toBe(expectedImportPath); + }); + + it('throws an error when import path is undefined in path map', () => { + const noPathMap: TsconfigBaseJson = { + compilerOptions: { + paths: {}, + }, + }; + host.write('tsconfig.base.json', JSON.stringify(noPathMap)); + + const act = () => + readImportPathOrThrow(host, { + projectName, + sourceRoot, + }); + + expect(act).toThrowError( + `Import path is missing for project with name "${projectName}"` + ); + }); +}); diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts index 2e54f03..7aba367 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts @@ -18,10 +18,10 @@ export function readImportPathOrThrow( host: Tree, { projectName, - projectRoot, + sourceRoot, }: { readonly projectName: string; - readonly projectRoot: string; + readonly sourceRoot: string; } ): string { const tsconfigBaseJson = readJson( @@ -31,7 +31,7 @@ export function readImportPathOrThrow( const pathMap = tsconfigBaseJson.compilerOptions.paths ?? {}; const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => - publicApis.some(publicApi => publicApi.startsWith(projectRoot)) + publicApis.some(publicApi => publicApi.startsWith(sourceRoot)) ); if (!maybePathEntry) { From 88286d8e7a9feb93ce782d353b790e87cea892f3 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 7 Jan 2021 23:41:11 +0100 Subject: [PATCH 011/113] test(angular): use sourceRoot property --- .../generate-buildable-library-configurations.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 4fc928d..791233a 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -39,7 +39,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { const tsconfigBase: TsconfigBaseJson = { compilerOptions: { paths: { - [importPath]: [`${project.root}/src/index.ts`], + [importPath]: [`${project.sourceRoot}/index.ts`], }, }, }; From f6ee20b275e50f9ed88fd83df4e206da15eda7ee Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 8 Jan 2021 00:03:39 +0100 Subject: [PATCH 012/113] feat(angular): normalize import source path based on OS --- .../file-types/tsconfig-base-json.d.ts | 6 +- .../util/normalize-options.ts | 7 +- .../util/read-import-path-or-throw.ts | 84 ++++++++++++++----- 3 files changed, 71 insertions(+), 26 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts b/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts index 1dfbcfe..7de97b2 100644 --- a/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts +++ b/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts @@ -1,3 +1,7 @@ +export interface PathMap { + readonly [importPath: string]: readonly string[]; +} + /** * tsconfig.base.json configuration file in workspace root. */ @@ -9,6 +13,6 @@ export interface TsconfigBaseJson { /** * Import paths also known as TypeScript path mappings. */ - readonly paths?: { readonly [importPath: string]: readonly string[] }; + readonly paths?: PathMap; }; } diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts index a108186..5fb988b 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts @@ -6,13 +6,12 @@ import { readImportPathOrThrow } from './read-import-path-or-throw'; export function normalizeOptions( host: Tree, - options: ConvertToBuildableGeneratorSchema -): NormalizedSchema { - const { + { enableIvy = true, project: projectName, skipFormat = false, - } = options; + }: ConvertToBuildableGeneratorSchema +): NormalizedSchema { const { root: projectRoot, sourceRoot: maybeSourceRoot, diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts index 7aba367..840061f 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts @@ -1,6 +1,57 @@ import { readJson, Tree } from '@nrwl/devkit'; +import * as path from 'path'; -import { TsconfigBaseJson } from '../file-types'; +import { PathMap, TsconfigBaseJson } from '../file-types'; + +export interface ReadImportPathProjectOptions { + readonly projectName: string; + readonly sourceRoot: string; +} + +/** + * Find the import path having an entry under the specified source root + * directory. + * @throws {Error} Throws an error if `tsconfig.base.json` is missing from the + * workspace root or if import path for the specified project is missing from + * tsconfig.base.json. + */ +function findPathEntryOrThrow( + { projectName, sourceRoot }: ReadImportPathProjectOptions, + pathMap: PathMap +): string { + const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => + publicApis.some(publicApi => publicApi.startsWith(sourceRoot)) + ); + + if (!maybePathEntry) { + throw new Error( + `Import path is missing for project with name "${projectName}".` + ); + } + + const [importPath] = maybePathEntry; + + return importPath; +} + +/** + * Normalize the source paths of the specified path map according to operating + * system. + */ +function normalizePathMap(pathMap: PathMap): PathMap { + return Object.entries(pathMap) + .map(([importPath, sourcePaths]): [string, readonly string[]] => [ + importPath, + sourcePaths.map(sourcePath => path.normalize(sourcePath)), + ]) + .reduce( + (normalizePathMap, [importPath, sourcePaths]) => ({ + ...normalizePathMap, + [importPath]: sourcePaths, + }), + {} + ); +} /** * Get the import path of the specified project. @@ -16,31 +67,22 @@ import { TsconfigBaseJson } from '../file-types'; */ export function readImportPathOrThrow( host: Tree, - { - projectName, - sourceRoot, - }: { - readonly projectName: string; - readonly sourceRoot: string; - } + { projectName, sourceRoot }: ReadImportPathProjectOptions ): string { + sourceRoot = path.normalize(sourceRoot); const tsconfigBaseJson = readJson( host, 'tsconfig.base.json' ); - const pathMap = tsconfigBaseJson.compilerOptions.paths ?? {}; - - const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => - publicApis.some(publicApi => publicApi.startsWith(sourceRoot)) + const pathMap = normalizePathMap( + tsconfigBaseJson.compilerOptions.paths ?? {} ); - if (!maybePathEntry) { - throw new Error( - `Import path is missing for project with name "${projectName}".` - ); - } - - const [importPath] = maybePathEntry; - - return importPath; + return findPathEntryOrThrow( + { + projectName, + sourceRoot, + }, + pathMap + ); } From 3277befb46c30912cbce088987e426b3333c86a2 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 8 Jan 2021 00:54:54 +0100 Subject: [PATCH 013/113] test(angular): add integration tests for convert-to-buildable generator --- .../convert-to-buildable/generator.spec.ts | 83 ++++++++++++++++--- 1 file changed, 73 insertions(+), 10 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 038c42a..d9a0831 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -1,20 +1,83 @@ -import { readProjectConfiguration, Tree } from '@nrwl/devkit'; +import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import * as path from 'path'; +import { TsconfigBaseJson, WorkspaceRootPackageJson } from './file-types'; import generator from './generator'; -import { ConvertToBuildableGeneratorSchema } from './schema'; describe('convert-to-buildable generator', () => { - let appTree: Tree; - const options: ConvertToBuildableGeneratorSchema = { project: 'test' }; - beforeEach(() => { - appTree = createTreeWithEmptyWorkspace(); + host = createTreeWithEmptyWorkspace(); + projectName = 'booking-feature-flight-search'; + project = { + projectType: 'library', + root: 'libs/booking/feature-flight-search', + sourceRoot: 'libs/booking/feature-flight-search/src', + targets: { + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + 'libs/booking/feature-flight-search/src/**/*.ts', + 'libs/booking/feature-flight-search/**/*.html', + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: ['coverage/libs/booking/feature-flight-search'], + options: { + jestConfig: 'libs/booking/feature-flight-search/jest.config.js', + passWithNoTests: true, + }, + }, + }, + }; + const tsconfigBase: TsconfigBaseJson = { + compilerOptions: { + paths: { + '@nrwl-airlines/booking/feature-flight-search': [ + path.join(project.sourceRoot ?? '', 'index.ts'), + ], + }, + }, + }; + + host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); + addProjectConfiguration(host, projectName, project); + }); + + let project: ProjectConfiguration; + let projectName: string; + let host: Tree; + + it('generates buildable library configurations when none of them exist', async () => { + const configurationFileNames = [ + 'ng-package.json', + 'package.json', + 'tsconfig.lib.prod.json', + ]; + + await generator(host, { + project: projectName, + }); + + configurationFileNames.forEach(configurationFileName => + expect(host.exists(path.join(project.root, configurationFileName))).toBe( + true + ) + ); }); - it('should run successfully', async () => { - await generator(appTree, options); - const config = readProjectConfiguration(appTree, 'test'); - expect(config).toBeDefined(); + it('adds ng-packagr as a development dependency when not installed', async () => { + await generator(host, { + project: projectName, + }); + + const { devDependencies = {} } = readJson( + host, + 'package.json' + ); + expect(devDependencies['ng-packagr']).toBeDefined(); }); }); From 723b37fd5b0d5a01d7df93467532c9f24933cd79 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 8 Jan 2021 02:01:15 +0100 Subject: [PATCH 014/113] chore: sort test project paths --- jest.config.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jest.config.js b/jest.config.js index a2a9201..b7fca36 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,22 +1,22 @@ module.exports = { projects: [ '/e2e/angular-e2e', - '/packages/angular', - '/tools', '/e2e/examples/angular/nrwl-airlines/booking/desktop-app', '/e2e/examples/angular/nrwl-airlines/booking/mobile-app', '/e2e/examples/angular/nrwl-airlines/check-in/desktop-app', '/e2e/examples/angular/nrwl-airlines/check-in/mobile-app', - '/packages/examples/angular/nrwl-airlines/shared/root/data-access', - '/packages/examples/angular/nrwl-airlines/check-in/root/feature-shell', - '/packages/examples/angular/nrwl-airlines/check-in/data-access', - '/packages/examples/angular/nrwl-airlines/shared/ui-buttons', - '/packages/examples/angular/nrwl-airlines/shared/util-formatting', - '/packages/examples/angular/nrwl-airlines/seatmap/data-access', - '/packages/examples/angular/nrwl-airlines/seatmap/feature-seat-listing', + '/packages/angular', '/packages/examples/angular/nrwl-airlines/booking/data-access', '/packages/examples/angular/nrwl-airlines/booking/feature-flight-search', '/packages/examples/angular/nrwl-airlines/booking/feature-passenger-info', '/packages/examples/angular/nrwl-airlines/booking/root/feature-shell', + '/packages/examples/angular/nrwl-airlines/check-in/data-access', + '/packages/examples/angular/nrwl-airlines/check-in/root/feature-shell', + '/packages/examples/angular/nrwl-airlines/seatmap/data-access', + '/packages/examples/angular/nrwl-airlines/seatmap/feature-seat-listing', + '/packages/examples/angular/nrwl-airlines/shared/root/data-access', + '/packages/examples/angular/nrwl-airlines/shared/ui-buttons', + '/packages/examples/angular/nrwl-airlines/shared/util-formatting', + '/tools', ], }; From 5a1efa2c42b562ce984e2ca02cc3ebe4cfda88c7 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 8 Jan 2021 02:01:29 +0100 Subject: [PATCH 015/113] chore: correct coverage directory --- e2e/angular-e2e/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/angular-e2e/jest.config.js b/e2e/angular-e2e/jest.config.js index 85cd0fe..4fbd4f9 100644 --- a/e2e/angular-e2e/jest.config.js +++ b/e2e/angular-e2e/jest.config.js @@ -11,5 +11,5 @@ module.exports = { '^.+\\.[tj]s$': 'ts-jest', }, moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/e2eangular-e2e', + coverageDirectory: '../../coverage/e2e/angular-e2e', }; From 78a9ea34fd5bf34b55854d9383f19fc8247c9ea4 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 8 Jan 2021 02:04:39 +0100 Subject: [PATCH 016/113] feat(angular): remove auto-generated executor and generator --- e2e/angular-e2e/tests/angular.spec.ts | 61 -------------- packages/angular/executors.json | 8 +- packages/angular/generators.json | 5 -- .../angular/files/src/index.ts__template__ | 1 - .../src/generators/angular/generator.spec.ts | 20 ----- .../src/generators/angular/generator.ts | 81 ------------------- .../src/generators/angular/schema.d.ts | 5 -- .../src/generators/angular/schema.json | 29 ------- 8 files changed, 1 insertion(+), 209 deletions(-) delete mode 100644 e2e/angular-e2e/tests/angular.spec.ts delete mode 100644 packages/angular/src/generators/angular/files/src/index.ts__template__ delete mode 100644 packages/angular/src/generators/angular/generator.spec.ts delete mode 100644 packages/angular/src/generators/angular/generator.ts delete mode 100644 packages/angular/src/generators/angular/schema.d.ts delete mode 100644 packages/angular/src/generators/angular/schema.json diff --git a/e2e/angular-e2e/tests/angular.spec.ts b/e2e/angular-e2e/tests/angular.spec.ts deleted file mode 100644 index c876486..0000000 --- a/e2e/angular-e2e/tests/angular.spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - checkFilesExist, - ensureNxProject, - readJson, - runNxCommandAsync, - uniq, - updateFile, -} from '@nrwl/nx-plugin/testing'; - -describe('angular e2e', () => { - beforeEach(() => { - ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - updateFile('workspace.json', raw => { - const workspaceJson = JSON.parse(raw); - const workspaceJsonUsingYarn = { - ...workspaceJson, - cli: { - ...workspaceJson.cli, - packageManager: 'yarn', - }, - }; - - return JSON.stringify(workspaceJsonUsingYarn, null, 2); - }); - }); - - it('should create angular', async done => { - const plugin = uniq('angular'); - await runNxCommandAsync(`generate @nxworker/angular:angular ${plugin}`); - - const result = await runNxCommandAsync(`build ${plugin}`); - expect(result.stdout).toContain('Executor ran'); - - done(); - }); - - describe('--directory', () => { - it('should create src in the specified directory', async done => { - const plugin = uniq('angular'); - await runNxCommandAsync( - `generate @nxworker/angular:angular ${plugin} --directory subdir` - ); - expect(() => - checkFilesExist(`libs/subdir/${plugin}/src/index.ts`) - ).not.toThrow(); - done(); - }); - }); - - describe('--tags', () => { - it('should add tags to nx.json', async done => { - const plugin = uniq('angular'); - await runNxCommandAsync( - `generate @nxworker/angular:angular ${plugin} --tags e2etag,e2ePackage` - ); - const nxJson = readJson('nx.json'); - expect(nxJson.projects[plugin].tags).toEqual(['e2etag', 'e2ePackage']); - done(); - }); - }); -}); diff --git a/packages/angular/executors.json b/packages/angular/executors.json index b9de79b..35a7ccc 100644 --- a/packages/angular/executors.json +++ b/packages/angular/executors.json @@ -1,11 +1,5 @@ { "$schema": "http://json-schema.org/schema", "generators": {}, - "executors": { - "build": { - "implementation": "./src/executors/build/executor", - "schema": "./src/executors/build/schema.json", - "description": "build executor" - } - } + "executors": {} } diff --git a/packages/angular/generators.json b/packages/angular/generators.json index f662fc9..31fb281 100644 --- a/packages/angular/generators.json +++ b/packages/angular/generators.json @@ -3,11 +3,6 @@ "name": "angular", "version": "0.0.1", "generators": { - "angular": { - "factory": "./src/generators/angular/generator", - "schema": "./src/generators/angular/schema.json", - "description": "angular generator" - }, "convert-to-buildable": { "factory": "./src/generators/convert-to-buildable/generator", "schema": "./src/generators/convert-to-buildable/schema.json", diff --git a/packages/angular/src/generators/angular/files/src/index.ts__template__ b/packages/angular/src/generators/angular/files/src/index.ts__template__ deleted file mode 100644 index dde3cb6..0000000 --- a/packages/angular/src/generators/angular/files/src/index.ts__template__ +++ /dev/null @@ -1 +0,0 @@ -const variable = "<%= projectName %>"; \ No newline at end of file diff --git a/packages/angular/src/generators/angular/generator.spec.ts b/packages/angular/src/generators/angular/generator.spec.ts deleted file mode 100644 index 52a8164..0000000 --- a/packages/angular/src/generators/angular/generator.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { Tree, readProjectConfiguration } from '@nrwl/devkit'; - -import generator from './generator'; -import { AngularGeneratorSchema } from './schema'; - -describe('angular generator', () => { - let appTree: Tree; - const options: AngularGeneratorSchema = { name: 'test' }; - - beforeEach(() => { - appTree = createTreeWithEmptyWorkspace(); - }); - - it('should run successfully', async () => { - await generator(appTree, options); - const config = readProjectConfiguration(appTree, 'test'); - expect(config).toBeDefined(); - }); -}); diff --git a/packages/angular/src/generators/angular/generator.ts b/packages/angular/src/generators/angular/generator.ts deleted file mode 100644 index e6888c6..0000000 --- a/packages/angular/src/generators/angular/generator.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { - addProjectConfiguration, - formatFiles, - generateFiles, - getWorkspaceLayout, - installPackagesTask, - names, - offsetFromRoot, - Tree, -} from '@nrwl/devkit'; -import * as path from 'path'; - -import { addNgPackagr } from './add-ng-packagr'; -import { AngularGeneratorSchema } from './schema'; - -interface NormalizedSchema extends AngularGeneratorSchema { - projectName: string; - projectRoot: string; - projectDirectory: string; - parsedTags: string[]; -} - -function normalizeOptions( - host: Tree, - options: AngularGeneratorSchema -): NormalizedSchema { - const name = names(options.name).fileName; - const projectDirectory = options.directory - ? `${names(options.directory).fileName}/${name}` - : name; - const projectName = projectDirectory.replace(new RegExp('/', 'g'), '-'); - const projectRoot = `${getWorkspaceLayout(host).libsDir}/${projectDirectory}`; - const parsedTags = options.tags - ? options.tags.split(',').map(s => s.trim()) - : []; - - return { - ...options, - projectName, - projectRoot, - projectDirectory, - parsedTags, - }; -} - -function addFiles(host: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - ...names(options.name), - offsetFromRoot: offsetFromRoot(options.projectRoot), - template: '', - }; - generateFiles( - host, - path.join(__dirname, 'files'), - options.projectRoot, - templateOptions - ); -} - -export default async function (host: Tree, options: AngularGeneratorSchema) { - const normalizedOptions = normalizeOptions(host, options); - addProjectConfiguration(host, normalizedOptions.projectName, { - root: normalizedOptions.projectRoot, - projectType: 'library', - sourceRoot: `${normalizedOptions.projectRoot}/src`, - targets: { - build: { - executor: '@nxworker/angular:build', - }, - }, - tags: normalizedOptions.parsedTags, - }); - addFiles(host, normalizedOptions); - addNgPackagr(host); - await formatFiles(host); - - return () => { - installPackagesTask(host); - }; -} diff --git a/packages/angular/src/generators/angular/schema.d.ts b/packages/angular/src/generators/angular/schema.d.ts deleted file mode 100644 index 8df3ac3..0000000 --- a/packages/angular/src/generators/angular/schema.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface AngularGeneratorSchema { - name: string; - tags?: string; - directory?: string; -} diff --git a/packages/angular/src/generators/angular/schema.json b/packages/angular/src/generators/angular/schema.json deleted file mode 100644 index ae0f1fb..0000000 --- a/packages/angular/src/generators/angular/schema.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "id": "Angular", - "title": "", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "d" - } - }, - "required": ["name"] -} From 13ef6f7dff867108e48f433ad1c9a2f1e5b87652 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 8 Jan 2021 02:05:03 +0100 Subject: [PATCH 017/113] test(angular): add e2e test for convert-to-buildable generator --- .../tests/convert-to-buildable.spec.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 e2e/angular-e2e/tests/convert-to-buildable.spec.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts new file mode 100644 index 0000000..3b44730 --- /dev/null +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -0,0 +1,26 @@ +import { checkFilesExist, copyNodeModules, ensureNxProject, runNxCommandAsync, uniq } from '@nrwl/nx-plugin/testing'; +import * as path from 'path'; + +describe('@nxworker/angular:convert-to-buildable generator e2e', () => { + beforeAll(() => { + copyNodeModules(['@nrwl/angular']); + }); + + it('generates buildable library configurations', async done => { + const projectName = uniq('test-library'); + const configurationFileNames = [ + 'ng-package.json', + 'package.json', + 'tsconfig.lib.prod.json', + ].map(fileName => path.join('libs', projectName, fileName)); + ensureNxProject('@nxworker/angular', 'dist/packages/angular'); + await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); + + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); + + expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); + done(); + }, 30000); +}); From 08b129f58bcf3c3f818ad7a396c4ed7ecf5947ca Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 8 Jan 2021 02:22:48 +0100 Subject: [PATCH 018/113] test(angular): cover adding ng-packagr --- .../tests/convert-to-buildable.spec.ts | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 3b44730..9aa7a5f 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,11 @@ -import { checkFilesExist, copyNodeModules, ensureNxProject, runNxCommandAsync, uniq } from '@nrwl/nx-plugin/testing'; +import { + checkFilesExist, + copyNodeModules, + ensureNxProject, + readJson, + runNxCommandAsync, + uniq, +} from '@nrwl/nx-plugin/testing'; import * as path from 'path'; describe('@nxworker/angular:convert-to-buildable generator e2e', () => { @@ -6,15 +13,20 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { copyNodeModules(['@nrwl/angular']); }); + beforeEach(async () => { + ensureNxProject('@nxworker/angular', 'dist/packages/angular'); + projectName = uniq('test-library'); + await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); + }, 30000); + + let projectName: string; + it('generates buildable library configurations', async done => { - const projectName = uniq('test-library'); const configurationFileNames = [ 'ng-package.json', 'package.json', 'tsconfig.lib.prod.json', ].map(fileName => path.join('libs', projectName, fileName)); - ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); await runNxCommandAsync( `generate @nxworker/angular:convert-to-buildable ${projectName}` @@ -23,4 +35,14 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); done(); }, 30000); + + it('adds ng-packagr', async done => { + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); + + const { devDependencies = {} } = readJson('package.json'); + expect(devDependencies['ng-packagr']).toBeDefined(); + done(); + }, 30000); }); From 9466effc0265f47de22d342c434ad1aeb27a7a65 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 9 Jan 2021 15:44:53 +0100 Subject: [PATCH 019/113] feat: remove auto-generated build executor --- packages/angular/src/executors/build/executor.spec.ts | 11 ----------- packages/angular/src/executors/build/executor.ts | 8 -------- packages/angular/src/executors/build/schema.d.ts | 1 - packages/angular/src/executors/build/schema.json | 9 --------- 4 files changed, 29 deletions(-) delete mode 100644 packages/angular/src/executors/build/executor.spec.ts delete mode 100644 packages/angular/src/executors/build/executor.ts delete mode 100644 packages/angular/src/executors/build/schema.d.ts delete mode 100644 packages/angular/src/executors/build/schema.json diff --git a/packages/angular/src/executors/build/executor.spec.ts b/packages/angular/src/executors/build/executor.spec.ts deleted file mode 100644 index 32de13c..0000000 --- a/packages/angular/src/executors/build/executor.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BuildExecutorSchema } from './schema'; -import executor from './executor'; - -const options: BuildExecutorSchema = {}; - -describe('Build Executor', () => { - it('can run', async () => { - const output = await executor(options); - expect(output.success).toBe(true); - }); -}); diff --git a/packages/angular/src/executors/build/executor.ts b/packages/angular/src/executors/build/executor.ts deleted file mode 100644 index 39569a7..0000000 --- a/packages/angular/src/executors/build/executor.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { BuildExecutorSchema } from './schema'; - -export default async function runExecutor(options: BuildExecutorSchema) { - console.log('Executor ran for Build', options); - return { - success: true, - }; -} diff --git a/packages/angular/src/executors/build/schema.d.ts b/packages/angular/src/executors/build/schema.d.ts deleted file mode 100644 index f8247ab..0000000 --- a/packages/angular/src/executors/build/schema.d.ts +++ /dev/null @@ -1 +0,0 @@ -export interface BuildExecutorSchema {} // eslint-disable-line diff --git a/packages/angular/src/executors/build/schema.json b/packages/angular/src/executors/build/schema.json deleted file mode 100644 index 54d8d22..0000000 --- a/packages/angular/src/executors/build/schema.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "title": "Build executor", - "description": "", - "type": "object", - "properties": {}, - "required": [] -} From 2833ad35ac39b88be49afbd9b1ae9022d8986db1 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 02:14:12 +0100 Subject: [PATCH 020/113] feat(angular): add build target to specified library project --- .../tests/convert-to-buildable.spec.ts | 18 ++++++++-- .../convert-to-buildable/generator.ts | 4 ++- .../add-library-build-target.ts | 36 +++++++++++++++++++ .../add-library-build-target/index.ts | 1 + ...nerate-buildable-library-configurations.ts | 2 +- 5 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/index.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 9aa7a5f..f261d78 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -3,6 +3,7 @@ import { copyNodeModules, ensureNxProject, readJson, + runNxCommand, runNxCommandAsync, uniq, } from '@nrwl/nx-plugin/testing'; @@ -17,7 +18,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); projectName = uniq('test-library'); await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); - }, 30000); + }); let projectName: string; @@ -34,7 +35,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); done(); - }, 30000); + }); it('adds ng-packagr', async done => { await runNxCommandAsync( @@ -44,5 +45,16 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { const { devDependencies = {} } = readJson('package.json'); expect(devDependencies['ng-packagr']).toBeDefined(); done(); - }, 30000); + }); + + it('adds a build target when project is a library', async done => { + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); + + const act = () => runNxCommand(`build ${projectName}`); + + expect(act).not.toThrow(); + done(); + }); }); diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts index c3c455a..0561276 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -1,5 +1,6 @@ import { formatFiles, installPackagesTask, Tree } from '@nrwl/devkit'; +import { addLibraryBuildTarget } from './generators/add-library-build-target'; import { addNgPackagr } from './generators/add-ng-packagr'; import { generateBuildableLibraryConfigurations } from './generators/generate-buildable-library-configurations'; import { ConvertToBuildableGeneratorSchema } from './schema'; @@ -8,11 +9,12 @@ import { normalizeOptions } from './util'; export default async function ( host: Tree, schema: ConvertToBuildableGeneratorSchema -) { +): Promise<() => void> { const options = normalizeOptions(host, schema); await generateBuildableLibraryConfigurations(host, options); addNgPackagr(host); + addLibraryBuildTarget(host, options); if (!options.skipFormat) { await formatFiles(host); diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts new file mode 100644 index 0000000..f4c544c --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts @@ -0,0 +1,36 @@ +import { readProjectConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; +import * as path from 'path'; + +import { NormalizedSchema } from '../../util'; + +export function addLibraryBuildTarget( + host: Tree, + { projectName, projectRoot }: NormalizedSchema +): void { + const project = readProjectConfiguration(host, projectName); + + if (project.targets.build) { + console.warn( + `Project with name "${projectName} already has a "build" target. Overwriting..."` + ); + } + + updateProjectConfiguration(host, projectName, { + ...project, + targets: { + ...project.targets, + build: { + executor: '@nrwl/angular:ng-packagr-lite', + options: { + tsConfig: path.join(projectRoot, 'tsconfig.lib.json'), + project: path.join(projectRoot, 'ng-package.json'), + }, + configurations: { + production: { + tsConfig: path.join(projectRoot, 'tsconfig.lib.prod.json'), + }, + }, + }, + }, + }); +} diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/index.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/index.ts new file mode 100644 index 0000000..286291b --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/index.ts @@ -0,0 +1 @@ +export * from './add-library-build-target'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts index 278558a..c5bf0af 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.ts @@ -14,7 +14,7 @@ export async function generateBuildableLibraryConfigurations( projectRoot, sourceRoot, }: NormalizedSchema -) { +): Promise { const replacements: FileTemplateReplacements = { enableIvy, importPath: readImportPathOrThrow(host, { From 659f5fbf1078c832f371e2ecc72207b5a1744e8e Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 02:24:04 +0100 Subject: [PATCH 021/113] test(angular): cover addLibraryBuildTarget with unit test --- .../add-library-build-target.spec.ts | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts new file mode 100644 index 0000000..ff5868d --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts @@ -0,0 +1,86 @@ +import { + addProjectConfiguration, + ProjectConfiguration, + readProjectConfiguration, + TargetConfiguration, + Tree, +} from '@nrwl/devkit'; +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import * as path from 'path'; + +import { TsconfigBaseJson } from '../../file-types'; +import { NormalizedSchema, normalizeOptions } from '../../util'; +import { addLibraryBuildTarget } from './add-library-build-target'; + +describe(addLibraryBuildTarget.name, () => { + beforeEach(() => { + host = createTreeWithEmptyWorkspace(); + projectName = 'seatmap-feature-seat-listing'; + importPath = `@nrwl-airlines/seatmap/feature-seat-listing`; + project = { + projectType: 'library', + root: 'libs/seatmap/feature-seat-listing', + sourceRoot: 'libs/seatmap/feature-seat-listing/src', + targets: { + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + 'libs/seatmap/feature-seat-listing/src/**/*.ts', + 'libs/seatmap/feature-seat-listing/src/**/*.html', + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: ['coverage/libs/seatmap/feature-seat-listing'], + options: { + jestConfig: 'libs/seatmap/feature-seat-listing/jest.config.js', + passWithNoTests: true, + }, + }, + }, + }; + const tsconfigBase: TsconfigBaseJson = { + compilerOptions: { + paths: { + [importPath]: [`${project.sourceRoot}/index.ts`], + }, + }, + }; + + host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); + addProjectConfiguration(host, projectName, project); + options = normalizeOptions(host, { + project: projectName, + }); + }); + + let host: Tree; + let importPath: string; + let options: NormalizedSchema; + let project: ProjectConfiguration; + let projectName: string; + + it('adds a build target', () => { + const expectedBuildTarget: TargetConfiguration = { + executor: '@nrwl/angular:ng-packagr-lite', + options: { + tsConfig: path.join(options.projectRoot, 'tsconfig.lib.json'), + project: path.join(options.projectRoot, 'ng-package.json'), + }, + configurations: { + production: { + tsConfig: path.join(options.projectRoot, 'tsconfig.lib.prod.json'), + }, + }, + }; + + addLibraryBuildTarget(host, options); + + const { + targets: { build: actualBuildTarget }, + } = readProjectConfiguration(host, projectName); + expect(actualBuildTarget).toEqual(expectedBuildTarget); + }); +}); From 804da840e33139be439d01b8d0cff3f488d8a162 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 02:33:51 +0100 Subject: [PATCH 022/113] test(angular): cover adding build target in integration test --- .../convert-to-buildable/generator.spec.ts | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index d9a0831..5747177 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -1,4 +1,11 @@ -import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + ProjectConfiguration, + readJson, + readProjectConfiguration, + TargetConfiguration, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; @@ -80,4 +87,28 @@ describe('convert-to-buildable generator', () => { ); expect(devDependencies['ng-packagr']).toBeDefined(); }); + + it('adds a build target', async () => { + const expectedBuildTarget: TargetConfiguration = { + executor: '@nrwl/angular:ng-packagr-lite', + options: { + tsConfig: path.join(project.root, 'tsconfig.lib.json'), + project: path.join(project.root, 'ng-package.json'), + }, + configurations: { + production: { + tsConfig: path.join(project.root, 'tsconfig.lib.prod.json'), + }, + }, + }; + + await generator(host, { + project: projectName, + }); + + const { + targets: { build: actualBuildTarget }, + } = readProjectConfiguration(host, projectName); + expect(actualBuildTarget).toEqual(expectedBuildTarget); + }); }); From 9bca0705618f7bd3109d04e11978b127752ba3d5 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 14:04:28 +0100 Subject: [PATCH 023/113] docs(angular): add missing parenthesis in log message --- .../add-library-build-target/add-library-build-target.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts index f4c544c..af9c1f3 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts @@ -11,7 +11,7 @@ export function addLibraryBuildTarget( if (project.targets.build) { console.warn( - `Project with name "${projectName} already has a "build" target. Overwriting..."` + `Project with name "${projectName}" already has a "build" target. Overwriting..."` ); } From e335502729dfc3909f2c64469f4501dd1ecdb30f Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 14:27:50 +0100 Subject: [PATCH 024/113] feat(angular): add guard checks to addLibraryBuildTarget --- .../add-library-build-target.ts | 58 ++++++++++++++----- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts index af9c1f3..650fcb9 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts @@ -1,36 +1,64 @@ -import { readProjectConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; +import { readProjectConfiguration, TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; import * as path from 'path'; import { NormalizedSchema } from '../../util'; +const incrementalBuildExecutor = '@nrwl/angular:ng-packagr-lite'; + export function addLibraryBuildTarget( host: Tree, { projectName, projectRoot }: NormalizedSchema ): void { const project = readProjectConfiguration(host, projectName); + const { + projectType, + targets: { build: buildTarget }, + } = project; + + if (projectType !== 'library') { + console.error( + `Project with name "${projectName}" is not a library. Skipping..."` + ); + + return; + } + + let executor: string; + + if (buildTarget) { + executor = buildTarget.executor; + + if (executor === incrementalBuildExecutor) { + console.info( + `Application with name "${projectName}" is already set up for incremental build. Skipping...` + ); + + return; + } - if (project.targets.build) { console.warn( - `Project with name "${projectName}" already has a "build" target. Overwriting..."` + `Library with project name "${projectName}" already has a "build" target. Overwriting..."` ); } + const incrementalBuildTarget: TargetConfiguration = { + executor: incrementalBuildExecutor, + options: { + tsConfig: path.join(projectRoot, 'tsconfig.lib.json'), + project: path.join(projectRoot, 'ng-package.json'), + }, + configurations: { + production: { + tsConfig: path.join(projectRoot, 'tsconfig.lib.prod.json'), + }, + }, + }; + updateProjectConfiguration(host, projectName, { ...project, targets: { ...project.targets, - build: { - executor: '@nrwl/angular:ng-packagr-lite', - options: { - tsConfig: path.join(projectRoot, 'tsconfig.lib.json'), - project: path.join(projectRoot, 'ng-package.json'), - }, - configurations: { - production: { - tsConfig: path.join(projectRoot, 'tsconfig.lib.prod.json'), - }, - }, - }, + build: incrementalBuildTarget, }, }); } From 45d2ad8edd5ce09717dd714ab92f4380bda839e9 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 14:58:17 +0100 Subject: [PATCH 025/113] feat(angular): add updateApplicationBuildTarget, refactor normalized schema --- .../add-library-build-target.ts | 20 +++--- .../update-application-build-target/index.ts | 1 + .../update-application-build-target.ts | 66 +++++++++++++++++++ .../util/normalize-options.ts | 14 ++-- .../util/normalized-schema.ts | 19 +++++- 5 files changed, 103 insertions(+), 17 deletions(-) create mode 100644 packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/index.ts create mode 100644 packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts index 650fcb9..6f31216 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts @@ -1,4 +1,4 @@ -import { readProjectConfiguration, TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; +import { TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; import * as path from 'path'; import { NormalizedSchema } from '../../util'; @@ -7,13 +7,15 @@ const incrementalBuildExecutor = '@nrwl/angular:ng-packagr-lite'; export function addLibraryBuildTarget( host: Tree, - { projectName, projectRoot }: NormalizedSchema -): void { - const project = readProjectConfiguration(host, projectName); - const { + { + projectConfiguration, + projectName, + projectRoot, projectType, - targets: { build: buildTarget }, - } = project; + }: NormalizedSchema +): void { + const { targets: executionTargets } = projectConfiguration; + const { build: buildTarget } = executionTargets; if (projectType !== 'library') { console.error( @@ -55,9 +57,9 @@ export function addLibraryBuildTarget( }; updateProjectConfiguration(host, projectName, { - ...project, + ...projectConfiguration, targets: { - ...project.targets, + ...executionTargets, build: incrementalBuildTarget, }, }); diff --git a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/index.ts b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/index.ts new file mode 100644 index 0000000..adfe1ab --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/index.ts @@ -0,0 +1 @@ +export * from './update-application-build-target'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts new file mode 100644 index 0000000..cda86c3 --- /dev/null +++ b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts @@ -0,0 +1,66 @@ +import { TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; + +import { NormalizedSchema } from '../../util'; + +const defaultAngularBuildExecutor = '@angular-devkit/build-angular:browser'; +const incrementalBuildExecutor = '@nrwl/angular:webpack-browser'; + +export function updateApplicationBuildTarget( + host: Tree, + { projectConfiguration, projectName, projectType }: NormalizedSchema +): void { + if (projectType !== 'application') { + console.error( + `Project with name "${projectName}" is not an application. Skipping..."` + ); + + return; + } + + const { targets: executionTargets } = projectConfiguration; + const { build: buildTarget } = executionTargets; + + if (!buildTarget) { + console.warn( + `Application with project name "${projectName}" does not has an existing "build" target. Skipping..."` + ); + + return; + } + + const { executor } = buildTarget; + + if (executor === incrementalBuildExecutor) { + console.info( + `Application with name "${projectName}" is already set up for incremental build. Skipping...` + ); + + return; + } + + if (executor !== defaultAngularBuildExecutor) { + console.error( + `Unexpected builder/executor "${executor}" for "build" target of project with name "${projectName}". Skipping..."` + ); + + return; + } + + const incrementalBuildTarget: TargetConfiguration = { + ...buildTarget, + executor: incrementalBuildExecutor, + options: { + ...buildTarget.options, + parallel: true, + withDeps: true, + }, + }; + + updateProjectConfiguration(host, projectName, { + ...projectConfiguration, + targets: { + ...executionTargets, + build: incrementalBuildTarget, + }, + }); +} diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts index 5fb988b..657c581 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts @@ -12,19 +12,19 @@ export function normalizeOptions( skipFormat = false, }: ConvertToBuildableGeneratorSchema ): NormalizedSchema { + const projectConfiguration = readProjectConfiguration(host, projectName); const { + projectType, root: projectRoot, - sourceRoot: maybeSourceRoot, - } = readProjectConfiguration(host, projectName); + sourceRoot = `${projectRoot}/src`, + } = projectConfiguration; - if (!maybeSourceRoot) { + if (projectType !== 'application' && projectType !== 'library') { throw new Error( - `No "sourceRoot" option for project with name "${projectName}"` + `No project type configured for project with name "${projectName}".` ); } - const sourceRoot = maybeSourceRoot; - return { enableIvy, importPath: readImportPathOrThrow(host, { @@ -32,8 +32,10 @@ export function normalizeOptions( sourceRoot, }), offsetFromRoot: offsetFromRoot(projectRoot), + projectConfiguration, projectName, projectRoot, + projectType, skipFormat, sourceRoot, }; diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts index 29a1c1a..c55e3e7 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts @@ -1,4 +1,11 @@ +import { ProjectConfiguration, TargetConfiguration } from '@nrwl/devkit'; + import { ConvertToBuildableGeneratorSchema } from '../schema'; +import { DeepReadonly } from './deep-readonly'; + +export interface TargetConfigurations { + readonly [targetName: string]: DeepReadonly; +} export interface NormalizedSchema extends Omit { @@ -15,6 +22,10 @@ export interface NormalizedSchema * `'../../'`. */ readonly offsetFromRoot: string; + /** + * The full configuration of the project. + */ + readonly projectConfiguration: ProjectConfiguration; /** * The name of the project. */ @@ -24,11 +35,15 @@ export interface NormalizedSchema */ readonly projectRoot: string; /** - * Project source directory, for example `libs/shared/util-formatting/src`. + * The type of the project. */ - readonly sourceRoot: string; + readonly projectType: 'application' | 'library'; /** * Skip formatting files? */ readonly skipFormat: boolean; + /** + * Project source directory, for example `libs/shared/util-formatting/src`. + */ + readonly sourceRoot: string; } From 06a5c06e8c7a8c5bd3963acf27cbaad181ab2c41 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 14:59:14 +0100 Subject: [PATCH 026/113] feat(angular): remove unused types --- .../convert-to-buildable/util/normalized-schema.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts index c55e3e7..358920f 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts @@ -1,11 +1,6 @@ -import { ProjectConfiguration, TargetConfiguration } from '@nrwl/devkit'; +import { ProjectConfiguration } from '@nrwl/devkit'; import { ConvertToBuildableGeneratorSchema } from '../schema'; -import { DeepReadonly } from './deep-readonly'; - -export interface TargetConfigurations { - readonly [targetName: string]: DeepReadonly; -} export interface NormalizedSchema extends Omit { From 2e50afd632f30797a9e2bd807fa20c6df7804886 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 15:00:15 +0100 Subject: [PATCH 027/113] docs(angular): improve internal documentation --- .../generators/convert-to-buildable/util/normalized-schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts index 358920f..1d7c3b9 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts @@ -26,7 +26,7 @@ export interface NormalizedSchema */ readonly projectName: string; /** - * Project root directory. + * Project root directory, for example `libs/shared/util-formatting`. */ readonly projectRoot: string; /** From 63a0e9e4e68ac75ba5301b2e82761ad770e20913 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 15:03:13 +0100 Subject: [PATCH 028/113] feat(angular): support application project in convert-to-buildable generator --- .../src/generators/convert-to-buildable/generator.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts index 0561276..d867e63 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -3,6 +3,7 @@ import { formatFiles, installPackagesTask, Tree } from '@nrwl/devkit'; import { addLibraryBuildTarget } from './generators/add-library-build-target'; import { addNgPackagr } from './generators/add-ng-packagr'; import { generateBuildableLibraryConfigurations } from './generators/generate-buildable-library-configurations'; +import { updateApplicationBuildTarget } from './generators/update-application-build-target'; import { ConvertToBuildableGeneratorSchema } from './schema'; import { normalizeOptions } from './util'; @@ -12,9 +13,13 @@ export default async function ( ): Promise<() => void> { const options = normalizeOptions(host, schema); - await generateBuildableLibraryConfigurations(host, options); - addNgPackagr(host); - addLibraryBuildTarget(host, options); + if (options.projectType === 'application') { + updateApplicationBuildTarget(host, options); + } else { + await generateBuildableLibraryConfigurations(host, options); + addNgPackagr(host); + addLibraryBuildTarget(host, options); + } if (!options.skipFormat) { await formatFiles(host); From 2890e417fea263548c623f5bcb7bedec41d9bc92 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 10 Jan 2021 15:13:30 +0100 Subject: [PATCH 029/113] test(angular): try to fix pnpm install in e2e tests --- .../tests/convert-to-buildable.spec.ts | 4 +- package.json | 1 + yarn.lock | 288 +++++++++++++++++- 3 files changed, 276 insertions(+), 17 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index f261d78..02d816a 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -5,13 +5,15 @@ import { readJson, runNxCommand, runNxCommandAsync, + runPackageManagerInstall, uniq, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { - copyNodeModules(['@nrwl/angular']); + copyNodeModules(['@nrwl/angular', 'ng-packagr']); + runPackageManagerInstall(); }); beforeEach(async () => { diff --git a/package.json b/package.json index d3278f4..6340f12 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "jest-preset-angular": "8.3.1", "json": "^10.0.0", "lint-staged": "^10.5.3", + "ng-packagr": "^11.0.3", "prettier": "2.1.2", "ts-jest": "26.4.0", "ts-node": "~9.1.1", diff --git a/yarn.lock b/yarn.lock index ceadc53..dcdbc87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1993,6 +1993,47 @@ yargs "15.4.1" yargs-parser "20.0.0" +"@rollup/plugin-commonjs@^15.0.0": + version "15.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-15.1.0.tgz#1e7d076c4f1b2abf7e65248570e555defc37c238" + integrity sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ== + dependencies: + "@rollup/pluginutils" "^3.1.0" + commondir "^1.0.1" + estree-walker "^2.0.1" + glob "^7.1.6" + is-reference "^1.2.1" + magic-string "^0.25.7" + resolve "^1.17.0" + +"@rollup/plugin-json@^4.0.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3" + integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== + dependencies: + "@rollup/pluginutils" "^3.0.8" + +"@rollup/plugin-node-resolve@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-10.0.0.tgz#44064a2b98df7530e66acf8941ff262fc9b4ead8" + integrity sha512-sNijGta8fqzwA1VwUEtTvWCx2E7qC70NMsDh4ZG13byAXYigBNZMxALhKUSycBks5gupJdq0lFrKumFrRZ8H3A== + dependencies: + "@rollup/pluginutils" "^3.1.0" + "@types/resolve" "1.17.1" + builtin-modules "^3.1.0" + deepmerge "^4.2.2" + is-module "^1.0.0" + resolve "^1.17.0" + +"@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.0.9", "@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.1" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" @@ -2070,6 +2111,16 @@ dependencies: "@babel/types" "^7.3.0" +"@types/estree@*": + version "0.0.45" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" + integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== + +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + "@types/glob@^7.1.1": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" @@ -2183,6 +2234,13 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== +"@types/resolve@1.17.1": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" + integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== + dependencies: + "@types/node" "*" + "@types/sinonjs__fake-timers@^6.0.1": version "6.0.2" resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz#3a84cf5ec3249439015e14049bd3161419bf9eae" @@ -3060,7 +3118,7 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.8.6: +autoprefixer@9.8.6, autoprefixer@^9.6.5: version "9.8.6" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f" integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg== @@ -3198,7 +3256,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2: +base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -3250,6 +3308,15 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" +bl@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489" + integrity sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + blob-util@2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" @@ -3410,7 +3477,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.9.1: +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.7.0, browserslist@^4.9.1: version "4.16.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.1.tgz#bf757a2da376b3447b800a16f0f1c96358138766" integrity sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA== @@ -3464,6 +3531,19 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +builtin-modules@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" + integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -3682,7 +3762,7 @@ check-more-types@^2.24.0: resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= -"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.3.0, chokidar@^3.4.1: +"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.1, chokidar@^3.3.0, chokidar@^3.4.1: version "3.5.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.0.tgz#458a4816a415e9d3b3caa4faec2b96a6935a9e65" integrity sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q== @@ -3792,7 +3872,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.4.0: +cli-spinners@^2.4.0, cli-spinners@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047" integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== @@ -3973,7 +4053,7 @@ commander@^5.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== -commander@^6.2.0: +commander@^6.0.0, commander@^6.2.0: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== @@ -4142,6 +4222,13 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +copy-anything@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.1.tgz#2afbce6da684bdfcbec93752fa762819cb480d9a" + integrity sha512-lA57e7viQHOdPQcrytv5jFeudZZOXuyk47lZym279FiDQ8jeZomXiGuVf6ffMKkJ+3TIai3J1J3yi6M+/4U35g== + dependencies: + is-what "^3.7.1" + copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" @@ -4506,6 +4593,11 @@ cssstyle@^2.2.0: dependencies: cssom "~0.3.6" +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= + cyclist@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" @@ -5337,6 +5429,16 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + +estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -5722,6 +5824,11 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-parent-dir@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" + integrity sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ= + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -6438,7 +6545,7 @@ icss-utils@^4.0.0, icss-utils@^4.1.1: dependencies: postcss "^7.0.14" -ieee754@^1.1.4: +ieee754@^1.1.13, ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -6565,6 +6672,13 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +injection-js@^2.2.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/injection-js/-/injection-js-2.4.0.tgz#ebe8871b1a349f23294eaa751bbd8209a636e754" + integrity sha512-6jiJt0tCAo9zjHbcwLiPL+IuNe9SQ6a9g0PEzafThW3fOQi0mrmiJGBJvDD6tmhPh8cQHIQtCOrJuBfQME4kPA== + dependencies: + tslib "^2.0.0" + inquirer@7.3.3, inquirer@^7.0.4: version "7.3.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" @@ -6830,6 +6944,11 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= + is-negative-zero@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" @@ -6910,6 +7029,13 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== +is-reference@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + dependencies: + "@types/estree" "*" + is-regex@^1.0.4, is-regex@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" @@ -6968,6 +7094,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-what@^3.7.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.12.0.tgz#f4405ce4bd6dd420d3ced51a026fb90e03705e55" + integrity sha512-2ilQz5/f/o9V7WRWJQmpFYNmQFZ9iM+OXRonZKcYgTkCzjb949Vi4h282PD1UfmgHk666rcWonbRJ++KI41VGw== + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -7719,6 +7850,22 @@ less@3.12.2: native-request "^1.0.5" source-map "~0.6.0" +less@^3.10.3: + version "3.13.1" + resolved "https://registry.yarnpkg.com/less/-/less-3.13.1.tgz#0ebc91d2a0e9c0c6735b83d496b0ab0583077909" + integrity sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw== + dependencies: + copy-anything "^2.0.1" + tslib "^1.10.0" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + make-dir "^2.1.0" + mime "^1.4.1" + native-request "^1.0.5" + source-map "~0.6.0" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -8024,7 +8171,7 @@ luxon@^1.25.0: resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.25.0.tgz#d86219e90bc0102c0eb299d65b2f5e95efe1fe72" integrity sha512-hEgLurSH8kQRjY6i4YLey+mcKVAWXbDNlZRmM6AgWDJ1cY3atl8Ztf5wEY7VBReFbmGnwQPz7KYJblL8B2k0jQ== -magic-string@0.25.7, magic-string@^0.25.0: +magic-string@0.25.7, magic-string@^0.25.0, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -8248,7 +8395,7 @@ mime@1.6.0, mime@^1.4.1: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.4.4: +mime@^2.3.1, mime@^2.4.4: version "2.4.7" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== @@ -8502,6 +8649,38 @@ next-tick@~1.0.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= +ng-packagr@^11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-11.0.3.tgz#7f76d5f424957c00146b12063bf6c010232c4265" + integrity sha512-wvXy4Xlr1atCdeuddUbLS79yv7k79ZU8R4Gcw2aywTihpt4ZaFr+I/ZoKWAPQenavYl0bykVuTLJ+hZZqNroNw== + dependencies: + "@rollup/plugin-commonjs" "^15.0.0" + "@rollup/plugin-json" "^4.0.0" + "@rollup/plugin-node-resolve" "^10.0.0" + ajv "^6.12.3" + ansi-colors "^4.1.1" + autoprefixer "^9.6.5" + browserslist "^4.7.0" + chokidar "^3.2.1" + commander "^6.0.0" + cssnano-preset-default "^4.0.7" + fs-extra "^9.0.0" + glob "^7.1.2" + injection-js "^2.2.1" + less "^3.10.3" + node-sass-tilde-importer "^1.0.0" + ora "^5.1.0" + postcss "^7.0.29" + postcss-url "^8.0.0" + read-pkg-up "^5.0.0" + rimraf "^3.0.0" + rollup "^2.8.0" + rollup-plugin-sourcemaps "^0.6.0" + rxjs "^6.5.0" + sass "^1.23.0" + stylus "^0.54.7" + terser "^5.0.0" + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -8587,6 +8766,13 @@ node-releases@^1.1.69: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.69.tgz#3149dbde53b781610cd8b486d62d86e26c3725f6" integrity sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA== +node-sass-tilde-importer@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz#1a15105c153f648323b4347693fdb0f331bad1ce" + integrity sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg== + dependencies: + find-parent-dir "^0.3.0" + normalize-package-data@^2.3.2, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -8939,6 +9125,20 @@ ora@5.1.0: strip-ansi "^6.0.0" wcwidth "^1.0.1" +ora@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.2.0.tgz#de10bfd2d15514384af45f3fa9d9b1aaf344fda1" + integrity sha512-+wG2v8TUU8EgzPHun1k/n45pXquQ9fHnbXVetl9rRgO6kjZszGGbraF3XPTIdgeA+s1lbRjSEftAnyT0w8ZMvQ== + dependencies: + bl "^4.0.3" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + log-symbols "^4.0.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + original@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" @@ -9285,7 +9485,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -9710,6 +9910,17 @@ postcss-unique-selectors@^4.0.1: postcss "^7.0.0" uniqs "^2.0.0" +postcss-url@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-8.0.0.tgz#7b10059bd12929cdbb1971c60f61a0e5af86b4ca" + integrity sha512-E2cbOQ5aii2zNHh8F6fk1cxls7QVFZjLPSrqvmiza8OuXLzIpErij8BDS5Y3STPfJgpIMNCPEr8JlKQWEoozUw== + dependencies: + mime "^2.3.1" + minimatch "^3.0.4" + mkdirp "^0.5.0" + postcss "^7.0.2" + xxhashjs "^0.2.1" + postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3: version "3.3.1" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" @@ -9738,7 +9949,7 @@ postcss@7.0.32: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.27, postcss@^7.0.29, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: version "7.0.35" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== @@ -10003,6 +10214,14 @@ read-pkg-up@^2.0.0: find-up "^2.0.0" read-pkg "^2.0.0" +read-pkg-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-5.0.0.tgz#b6a6741cb144ed3610554f40162aa07a6db621b8" + integrity sha512-XBQjqOBtTzyol2CpsQOw8LHV0XbDZVG7xMMjmXAJomlVY03WOBRmYgDJETlvcg0H63AJvPRwT7GFi5rvOzUOKg== + dependencies: + find-up "^3.0.0" + read-pkg "^5.0.0" + read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -10030,7 +10249,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -read-pkg@^5.2.0: +read-pkg@^5.0.0, read-pkg@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== @@ -10053,7 +10272,7 @@ read-pkg@^5.2.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.6, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -10430,6 +10649,14 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-sourcemaps@^0.6.0: + version "0.6.3" + resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed" + integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw== + dependencies: + "@rollup/pluginutils" "^3.0.9" + source-map-resolve "^0.6.0" + rollup@2.32.1: version "2.32.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.32.1.tgz#625a92c54f5b4d28ada12d618641491d4dbb548c" @@ -10437,6 +10664,13 @@ rollup@2.32.1: optionalDependencies: fsevents "~2.1.2" +rollup@^2.8.0: + version "2.36.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.36.1.tgz#2174f0c25c7b400d57b05628d0e732c7ae8d2178" + integrity sha512-eAfqho8dyzuVvrGqpR0ITgEdq0zG2QJeWYh+HeuTbpcaXk8vNFc48B7bJa1xYosTCKx0CuW+447oQOW8HgBIZQ== + optionalDependencies: + fsevents "~2.1.2" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -10466,7 +10700,7 @@ rxjs@6.5.5, rxjs@~6.5.5: dependencies: tslib "^1.9.0" -rxjs@6.6.3, rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@^6.6.3: +rxjs@6.6.3, rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.0, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@^6.6.3: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== @@ -10528,6 +10762,13 @@ sass@1.27.0: dependencies: chokidar ">=2.0.0 <4.0.0" +sass@^1.23.0: + version "1.32.2" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.2.tgz#66dc0250bc86c15d19ddee7135e93d0cf3d3257b" + integrity sha512-u1pUuzqwz3SAgvHSWp1k0mRhX82b2DdlVnP6UIetQPZtYbuJUDaPQhZE12jyjB7vYeOScfz9WPsZJB6Rpk7heA== + dependencies: + chokidar ">=2.0.0 <4.0.0" + sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -10912,6 +11153,14 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" +source-map-resolve@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2" + integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + source-map-support@0.5.16: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" @@ -11315,7 +11564,7 @@ stylus-loader@4.3.1: normalize-path "^3.0.0" schema-utils "^3.0.0" -stylus@0.54.8: +stylus@0.54.8, stylus@^0.54.7: version "0.54.8" resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.8.tgz#3da3e65966bc567a7b044bfe0eece653e099d147" integrity sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg== @@ -11510,7 +11759,7 @@ terser@^4.1.2: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.3.4: +terser@^5.0.0, terser@^5.3.4: version "5.5.1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== @@ -12542,6 +12791,13 @@ xtend@^4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +xxhashjs@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== + dependencies: + cuint "^0.2.2" + y18n@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" From e5fa525c78aaa99cc352046001f3d6e394c61913 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 11 Jan 2021 22:03:53 +0100 Subject: [PATCH 030/113] chore(angular): delete unused file --- .../src/generators/angular/add-ng-packagr.ts | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 packages/angular/src/generators/angular/add-ng-packagr.ts diff --git a/packages/angular/src/generators/angular/add-ng-packagr.ts b/packages/angular/src/generators/angular/add-ng-packagr.ts deleted file mode 100644 index 1fc31e5..0000000 --- a/packages/angular/src/generators/angular/add-ng-packagr.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { readJson, Tree } from '@nrwl/devkit'; - -export function addNgPackagr(host: Tree) { - const packageJsonPath = 'package.json'; - const currentPackageJson = readJson(host, packageJsonPath); - const isNgPackagrInstalled = - currentPackageJson.devDependencies?.['ng-packagr'] !== undefined; - - if (isNgPackagrInstalled) { - return; - } - - const modifiedPackageJson = { - ...currentPackageJson, - devDependencies: { - ...currentPackageJson.devDependencies, - 'ng-packagr': '^11.0.3', - }, - }; - - host.write(packageJsonPath, JSON.stringify(modifiedPackageJson, null, 2)); -} From ab871c2fb9e017705b005b0e4b9d356fbf9cd56b Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 11 Jan 2021 22:06:48 +0100 Subject: [PATCH 031/113] test(angular): use Yarn for end-to-end tests --- .../tests/convert-to-buildable.spec.ts | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 02d816a..a01a986 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,3 +1,4 @@ +import { WorkspaceConfiguration as NxWorkspaceConfiguration } from '@nrwl/devkit'; import { checkFilesExist, copyNodeModules, @@ -5,18 +6,36 @@ import { readJson, runNxCommand, runNxCommandAsync, - runPackageManagerInstall, uniq, + updateFile, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; +interface WorkspaceConfiguration extends NxWorkspaceConfiguration { + cli?: { + defaultCollection: string; + packageManager: 'npm' | 'pnpm' | 'yarn'; + }; +} + describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { - copyNodeModules(['@nrwl/angular', 'ng-packagr']); - runPackageManagerInstall(); + copyNodeModules(['ng-packagr']); }); beforeEach(async () => { + updateFile('workspace.json', raw => { + const workspaceJson: WorkspaceConfiguration = JSON.parse(raw); + const workspaceJsonUsingYarn: WorkspaceConfiguration = { + ...workspaceJson, + cli: { + ...(workspaceJson.cli ?? {}), + packageManager: 'yarn', + }, + }; + + return JSON.stringify(workspaceJsonUsingYarn, null, 2); + }); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); projectName = uniq('test-library'); await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); From b8ddee7464159181517463f9db13982e2806de8f Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 11 Jan 2021 22:07:41 +0100 Subject: [PATCH 032/113] style: format --- .../add-library-build-target.ts | 6 +++++- .../add-ng-packagr/add-ng-packagr.spec.ts | 7 ++++++- ...nerate-buildable-library-configurations.spec.ts | 14 ++++++++++++-- .../update-application-build-target.ts | 6 +++++- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts index 6f31216..af7c1e2 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.ts @@ -1,4 +1,8 @@ -import { TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; +import { + TargetConfiguration, + Tree, + updateProjectConfiguration, +} from '@nrwl/devkit'; import * as path from 'path'; import { NormalizedSchema } from '../../util'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 282a536..8703f4e 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -1,4 +1,9 @@ -import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + ProjectConfiguration, + readJson, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 791233a..703fd19 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -1,10 +1,20 @@ -import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + ProjectConfiguration, + readJson, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; import { TsconfigBaseJson } from '../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; -import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigLibProdJson } from './file-types'; +import { + AngularCompilerOptions, + BuildableLibraryPackageJson, + NgPackageJson, + TsconfigLibProdJson, +} from './file-types'; import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; describe(generateBuildableLibraryConfigurations.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts index cda86c3..5200deb 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts @@ -1,4 +1,8 @@ -import { TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; +import { + TargetConfiguration, + Tree, + updateProjectConfiguration, +} from '@nrwl/devkit'; import { NormalizedSchema } from '../../util'; From a89d9c4e2a9a6eeb1c95a29f83b0a1926e5511d3 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 11 Jan 2021 22:12:08 +0100 Subject: [PATCH 033/113] test(angular): fix default collection --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index a01a986..664787c 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -26,10 +26,12 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeEach(async () => { updateFile('workspace.json', raw => { const workspaceJson: WorkspaceConfiguration = JSON.parse(raw); + const defaultCollection = + workspaceJson?.cli?.defaultCollection ?? '@nrwl/angular'; const workspaceJsonUsingYarn: WorkspaceConfiguration = { ...workspaceJson, cli: { - ...(workspaceJson.cli ?? {}), + defaultCollection, packageManager: 'yarn', }, }; From 1c96f345b079b50c641317d1fea3ff372cfece4c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 11 Jan 2021 22:39:48 +0100 Subject: [PATCH 034/113] test(angular): fix e2e workspace --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 664787c..958ac5b 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -24,10 +24,11 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { }); beforeEach(async () => { + ensureNxProject('@nxworker/angular', 'dist/packages/angular'); updateFile('workspace.json', raw => { const workspaceJson: WorkspaceConfiguration = JSON.parse(raw); const defaultCollection = - workspaceJson?.cli?.defaultCollection ?? '@nrwl/angular'; + workspaceJson.cli?.defaultCollection ?? '@nrwl/angular'; const workspaceJsonUsingYarn: WorkspaceConfiguration = { ...workspaceJson, cli: { @@ -38,7 +39,6 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { return JSON.stringify(workspaceJsonUsingYarn, null, 2); }); - ensureNxProject('@nxworker/angular', 'dist/packages/angular'); projectName = uniq('test-library'); await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); }); From 6d9d678d58d567b8e4d7c01ce36bbcf49010ce21 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 11 Jan 2021 22:40:55 +0100 Subject: [PATCH 035/113] chore: skip Nx cache for e2e tests on CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e815396..9c2d64c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,4 +158,4 @@ jobs: ${{ runner.os }}-yarn- - run: yarn install --non-interactive --silent - - run: yarn e2e + - run: yarn e2e --skip-nx-cache From 999e57b3ebc586a81385abb73d66a9bed4ae0b72 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 11 Jan 2021 23:23:07 +0100 Subject: [PATCH 036/113] test(angular): remove unused e2e test --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 958ac5b..a85776f 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -4,7 +4,6 @@ import { copyNodeModules, ensureNxProject, readJson, - runNxCommand, runNxCommandAsync, uniq, updateFile, @@ -69,15 +68,4 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { expect(devDependencies['ng-packagr']).toBeDefined(); done(); }); - - it('adds a build target when project is a library', async done => { - await runNxCommandAsync( - `generate @nxworker/angular:convert-to-buildable ${projectName}` - ); - - const act = () => runNxCommand(`build ${projectName}`); - - expect(act).not.toThrow(); - done(); - }); }); From 4c20b606aed781d81a3fb49d33bbce25a2a3fd7d Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 01:33:42 +0100 Subject: [PATCH 037/113] feat: specify ng-packagr version --- .../generators/add-ng-packagr/add-ng-packagr.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts index ca55c5d..4be51df 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts @@ -8,8 +8,8 @@ export function addNgPackagr(host: Tree) { host, packageJsonPath ); - const isNgPackagrInstalled = - currentPackageJson.devDependencies?.['ng-packagr'] !== undefined; + const { devDependencies = {} } = currentPackageJson; + const isNgPackagrInstalled = devDependencies['ng-packagr'] !== undefined; if (isNgPackagrInstalled) { return; @@ -18,8 +18,8 @@ export function addNgPackagr(host: Tree) { const modifiedPackageJson: WorkspaceRootPackageJson = { ...currentPackageJson, devDependencies: { - ...currentPackageJson.devDependencies, - 'ng-packagr': '*', + ...devDependencies, + 'ng-packagr': '^11.0.3', }, }; From b187009444cdcc8c0643f75bdd61e85a3e473ca8 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 01:34:23 +0100 Subject: [PATCH 038/113] chore: increase e2e test timeout --- e2e/angular-e2e/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/angular-e2e/jest.config.js b/e2e/angular-e2e/jest.config.js index 4fbd4f9..8c2f630 100644 --- a/e2e/angular-e2e/jest.config.js +++ b/e2e/angular-e2e/jest.config.js @@ -6,7 +6,7 @@ module.exports = { tsConfig: '/tsconfig.spec.json', }, }, - testTimeout: 30000, + testTimeout: 60000, transform: { '^.+\\.[tj]s$': 'ts-jest', }, From 5e001de16221242e8f2a2042086a02cc487c2fbc Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 01:35:23 +0100 Subject: [PATCH 039/113] test(angular): use unique library name prefix --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index a85776f..7e340f3 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -38,7 +38,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { return JSON.stringify(workspaceJsonUsingYarn, null, 2); }); - projectName = uniq('test-library'); + projectName = uniq('convert-to-buildable'); await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); }); From 135e9add000c7cecb1a3c56d56d088f2ee9ac19f Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 01:37:33 +0100 Subject: [PATCH 040/113] test(angular): adjust unit test --- .../generators/add-ng-packagr/add-ng-packagr.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 8703f4e..9ff6c2c 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -62,7 +62,7 @@ describe(addNgPackagr.name, () => { host, 'package.json' ); - expect(devDependencies['ng-packagr']).toBe('*'); + expect(devDependencies['ng-packagr']).toMatch(/\^\d+\.\d+\.\d+/); }); it('leaves ng-packagr version intact when already installed', async () => { From 9cc9d95e224bfda3d307c035ff7e68542bf57e2e Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 21:58:42 +0100 Subject: [PATCH 041/113] chore: remove reference to missing configuration --- e2e/angular-e2e/tsconfig.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/e2e/angular-e2e/tsconfig.json b/e2e/angular-e2e/tsconfig.json index 879cca4..b9c9d95 100644 --- a/e2e/angular-e2e/tsconfig.json +++ b/e2e/angular-e2e/tsconfig.json @@ -3,9 +3,6 @@ "files": [], "include": [], "references": [ - { - "path": "./tsconfig.e2e.json" - }, { "path": "./tsconfig.spec.json" } From ef28a7e820090c9dc4b8dcb8330f1621d891a4dc Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 22:08:09 +0100 Subject: [PATCH 042/113] feat(internal): generate e2e-util library --- .eslintrc.json | 10 ++++++++- ISSUE_TEMPLATE.md | 1 + jest.config.js | 1 + nx.json | 3 +++ packages/internal/e2e-util/.eslintrc.json | 5 +++++ packages/internal/e2e-util/README.md | 7 +++++++ packages/internal/e2e-util/jest.config.js | 14 +++++++++++++ packages/internal/e2e-util/src/index.ts | 1 + .../src/lib/internal-e2e-util.spec.ts | 7 +++++++ .../e2e-util/src/lib/internal-e2e-util.ts | 3 +++ packages/internal/e2e-util/tsconfig.json | 13 ++++++++++++ packages/internal/e2e-util/tsconfig.lib.json | 13 ++++++++++++ packages/internal/e2e-util/tsconfig.spec.json | 15 +++++++++++++ tsconfig.base.json | 1 + workspace.json | 21 +++++++++++++++++++ 15 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 packages/internal/e2e-util/.eslintrc.json create mode 100644 packages/internal/e2e-util/README.md create mode 100644 packages/internal/e2e-util/jest.config.js create mode 100644 packages/internal/e2e-util/src/index.ts create mode 100644 packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts create mode 100644 packages/internal/e2e-util/src/lib/internal-e2e-util.ts create mode 100644 packages/internal/e2e-util/tsconfig.json create mode 100644 packages/internal/e2e-util/tsconfig.lib.json create mode 100644 packages/internal/e2e-util/tsconfig.spec.json diff --git a/.eslintrc.json b/.eslintrc.json index 4593ec6..f8b90b7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,9 +23,17 @@ "platform:node" ] }, + { + "sourceTag": "scope:internal", + "onlyDependOnLibsWithTags": ["scope:internal"] + }, { "sourceTag": "type:e2e", - "onlyDependOnLibsWithTags": ["type:package"] + "onlyDependOnLibsWithTags": ["type:package", "type:e2e-util"] + }, + { + "sourceTag": "type:e2e-util", + "onlyDependOnLibsWithTags": ["type:e2e-util"] }, { "sourceTag": "type:tool", diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 525604a..476b02d 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -7,6 +7,7 @@ ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. ## I'm submitting a... + ``` [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report diff --git a/jest.config.js b/jest.config.js index b7fca36..d99e950 100644 --- a/jest.config.js +++ b/jest.config.js @@ -17,6 +17,7 @@ module.exports = { '/packages/examples/angular/nrwl-airlines/shared/root/data-access', '/packages/examples/angular/nrwl-airlines/shared/ui-buttons', '/packages/examples/angular/nrwl-airlines/shared/util-formatting', + '/packages/internal/e2e-util', '/tools', ], }; diff --git a/nx.json b/nx.json index 1ab37f5..801242d 100644 --- a/nx.json +++ b/nx.json @@ -117,6 +117,9 @@ "examples-angular-nrwl-airlines-shared-util-formatting": { "tags": ["domain:shared", "platform:web", "scope:shared", "type:util"] }, + "internal-e2e-util": { + "tags": ["platform:node", "scope:internal", "type:e2e-util"] + }, "workspace-tools": { "tags": ["platform:node", "type:tool"] } diff --git a/packages/internal/e2e-util/.eslintrc.json b/packages/internal/e2e-util/.eslintrc.json new file mode 100644 index 0000000..0c9b27c --- /dev/null +++ b/packages/internal/e2e-util/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../.eslintrc.json", + "ignorePatterns": ["!**/*"], + "rules": {} +} diff --git a/packages/internal/e2e-util/README.md b/packages/internal/e2e-util/README.md new file mode 100644 index 0000000..12e38d9 --- /dev/null +++ b/packages/internal/e2e-util/README.md @@ -0,0 +1,7 @@ +# internal-e2e-util + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test internal-e2e-util` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/packages/internal/e2e-util/jest.config.js b/packages/internal/e2e-util/jest.config.js new file mode 100644 index 0000000..66f9e30 --- /dev/null +++ b/packages/internal/e2e-util/jest.config.js @@ -0,0 +1,14 @@ +module.exports = { + displayName: 'internal-e2e-util', + preset: '../../../jest.preset.js', + globals: { + 'ts-jest': { + tsConfig: '/tsconfig.spec.json', + }, + }, + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../../coverage/packages/internal/e2e-util', +}; diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts new file mode 100644 index 0000000..81aedfd --- /dev/null +++ b/packages/internal/e2e-util/src/index.ts @@ -0,0 +1 @@ +export * from './lib/internal-e2e-util'; diff --git a/packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts b/packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts new file mode 100644 index 0000000..3866de7 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts @@ -0,0 +1,7 @@ +import { internalE2eUtil } from './internal-e2e-util'; + +describe('internalE2eUtil', () => { + it('should work', () => { + expect(internalE2eUtil()).toEqual('internal-e2e-util'); + }); +}); diff --git a/packages/internal/e2e-util/src/lib/internal-e2e-util.ts b/packages/internal/e2e-util/src/lib/internal-e2e-util.ts new file mode 100644 index 0000000..03238a4 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/internal-e2e-util.ts @@ -0,0 +1,3 @@ +export function internalE2eUtil(): string { + return 'internal-e2e-util'; +} diff --git a/packages/internal/e2e-util/tsconfig.json b/packages/internal/e2e-util/tsconfig.json new file mode 100644 index 0000000..667a346 --- /dev/null +++ b/packages/internal/e2e-util/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/packages/internal/e2e-util/tsconfig.lib.json b/packages/internal/e2e-util/tsconfig.lib.json new file mode 100644 index 0000000..7088d98 --- /dev/null +++ b/packages/internal/e2e-util/tsconfig.lib.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "exclude": ["**/*.spec.ts"], + "include": ["**/*.ts"] +} diff --git a/packages/internal/e2e-util/tsconfig.spec.json b/packages/internal/e2e-util/tsconfig.spec.json new file mode 100644 index 0000000..1798b37 --- /dev/null +++ b/packages/internal/e2e-util/tsconfig.spec.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.spec.js", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 37fd669..6b8db7c 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -19,6 +19,7 @@ "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "paths": { + "@internal/e2e-util": ["packages/internal/e2e-util/src/index.ts"], "@nxworker/angular": ["packages/angular/src/index.ts"], "@nrwl-airlines/booking/data-access": [ "packages/examples/angular/nrwl-airlines/booking/data-access/src/index.ts" diff --git a/workspace.json b/workspace.json index d0d3aa7..00e1cc9 100644 --- a/workspace.json +++ b/workspace.json @@ -759,6 +759,27 @@ } } }, + "internal-e2e-util": { + "root": "packages/internal/e2e-util", + "sourceRoot": "packages/internal/e2e-util/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/internal/e2e-util/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/packages/internal/e2e-util"], + "options": { + "jestConfig": "packages/internal/e2e-util/jest.config.js", + "passWithNoTests": true + } + } + } + }, "workspace-tools": { "projectType": "tool", "root": "tools", From cf3ec0aca57667f429ab42332caa6c7f959ae768 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 22:56:39 +0100 Subject: [PATCH 043/113] refactor: convert .d.ts files to .ts --- .../convert-to-buildable/file-types/{index.d.ts => index.ts} | 0 .../file-types/{package-json.d.ts => package-json.ts} | 0 .../file-types/{tsconfig-base-json.d.ts => tsconfig-base-json.ts} | 0 ...e-template-replacements.d.ts => file-template-replacements.ts} | 0 .../file-types/{index.d.ts => index.ts} | 0 .../file-types/{ng-package-json.d.ts => ng-package-json.ts} | 0 .../file-types/{package-json.d.ts => package-json.ts} | 0 .../{tsconfig-lib-prod-json.d.ts => tsconfig-lib-prod-json.ts} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename packages/angular/src/generators/convert-to-buildable/file-types/{index.d.ts => index.ts} (100%) rename packages/angular/src/generators/convert-to-buildable/file-types/{package-json.d.ts => package-json.ts} (100%) rename packages/angular/src/generators/convert-to-buildable/file-types/{tsconfig-base-json.d.ts => tsconfig-base-json.ts} (100%) rename packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/{file-template-replacements.d.ts => file-template-replacements.ts} (100%) rename packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/{index.d.ts => index.ts} (100%) rename packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/{ng-package-json.d.ts => ng-package-json.ts} (100%) rename packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/{package-json.d.ts => package-json.ts} (100%) rename packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/{tsconfig-lib-prod-json.d.ts => tsconfig-lib-prod-json.ts} (100%) diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/index.d.ts b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/file-types/index.d.ts rename to packages/angular/src/generators/convert-to-buildable/file-types/index.ts diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/file-types/package-json.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/file-types/package-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/file-types/package-json.ts diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts b/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/file-template-replacements.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/file-template-replacements.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/file-template-replacements.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/index.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/index.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/index.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/index.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/ng-package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/ng-package-json.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/ng-package-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/ng-package-json.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/package-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/package-json.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/package-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/package-json.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.d.ts rename to packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/file-types/tsconfig-lib-prod-json.ts From a75e8bf80fe23cd8384c14a7a75baa871c8c1754 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 22:58:47 +0100 Subject: [PATCH 044/113] test: extract e2e-util library --- .../tests/convert-to-buildable.spec.ts | 25 ++----------------- packages/internal/e2e-util/src/index.ts | 4 ++- .../src/lib/configure-package-manager.ts | 18 +++++++++++++ .../src/lib/internal-e2e-util.spec.ts | 7 ------ .../e2e-util/src/lib/internal-e2e-util.ts | 3 --- .../internal/e2e-util/src/lib/types/index.ts | 2 ++ .../e2e-util/src/lib/types/package-manager.ts | 1 + .../src/lib/types/workspace-configuration.ts | 10 ++++++++ .../e2e-util/src/lib/update-json-file.ts | 12 +++++++++ 9 files changed, 48 insertions(+), 34 deletions(-) create mode 100644 packages/internal/e2e-util/src/lib/configure-package-manager.ts delete mode 100644 packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts delete mode 100644 packages/internal/e2e-util/src/lib/internal-e2e-util.ts create mode 100644 packages/internal/e2e-util/src/lib/types/index.ts create mode 100644 packages/internal/e2e-util/src/lib/types/package-manager.ts create mode 100644 packages/internal/e2e-util/src/lib/types/workspace-configuration.ts create mode 100644 packages/internal/e2e-util/src/lib/update-json-file.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 7e340f3..71df396 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { WorkspaceConfiguration as NxWorkspaceConfiguration } from '@nrwl/devkit'; +import { configurePackageManager } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -6,17 +6,9 @@ import { readJson, runNxCommandAsync, uniq, - updateFile, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; -interface WorkspaceConfiguration extends NxWorkspaceConfiguration { - cli?: { - defaultCollection: string; - packageManager: 'npm' | 'pnpm' | 'yarn'; - }; -} - describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['ng-packagr']); @@ -24,20 +16,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeEach(async () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - updateFile('workspace.json', raw => { - const workspaceJson: WorkspaceConfiguration = JSON.parse(raw); - const defaultCollection = - workspaceJson.cli?.defaultCollection ?? '@nrwl/angular'; - const workspaceJsonUsingYarn: WorkspaceConfiguration = { - ...workspaceJson, - cli: { - defaultCollection, - packageManager: 'yarn', - }, - }; - - return JSON.stringify(workspaceJsonUsingYarn, null, 2); - }); + configurePackageManager('yarn'); projectName = uniq('convert-to-buildable'); await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); }); diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index 81aedfd..7de7276 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1 +1,3 @@ -export * from './lib/internal-e2e-util'; +export * from './lib/configure-package-manager'; +export * from './lib/types/package-manager'; +export * from './lib/update-json-file'; diff --git a/packages/internal/e2e-util/src/lib/configure-package-manager.ts b/packages/internal/e2e-util/src/lib/configure-package-manager.ts new file mode 100644 index 0000000..ac62bc5 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/configure-package-manager.ts @@ -0,0 +1,18 @@ +import { PackageManager, WorkspaceConfiguration } from './types'; +import { updateJsonFile } from './update-json-file'; + +/** + * Configure the package manager for the e2e workspace. + * + * NOTE! This must be called **after** `ensureNxProject`. + */ +export function configurePackageManager(packageManager: PackageManager) { + updateJsonFile('workspace.json', (workspaceJson: WorkspaceConfiguration) => ({ + ...workspaceJson, + cli: { + defaultCollection: + workspaceJson.cli?.defaultCollection ?? '@nrwl/angular', + packageManager, + }, + })); +} diff --git a/packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts b/packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts deleted file mode 100644 index 3866de7..0000000 --- a/packages/internal/e2e-util/src/lib/internal-e2e-util.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { internalE2eUtil } from './internal-e2e-util'; - -describe('internalE2eUtil', () => { - it('should work', () => { - expect(internalE2eUtil()).toEqual('internal-e2e-util'); - }); -}); diff --git a/packages/internal/e2e-util/src/lib/internal-e2e-util.ts b/packages/internal/e2e-util/src/lib/internal-e2e-util.ts deleted file mode 100644 index 03238a4..0000000 --- a/packages/internal/e2e-util/src/lib/internal-e2e-util.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function internalE2eUtil(): string { - return 'internal-e2e-util'; -} diff --git a/packages/internal/e2e-util/src/lib/types/index.ts b/packages/internal/e2e-util/src/lib/types/index.ts new file mode 100644 index 0000000..8852073 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/types/index.ts @@ -0,0 +1,2 @@ +export * from './package-manager'; +export * from './workspace-configuration'; diff --git a/packages/internal/e2e-util/src/lib/types/package-manager.ts b/packages/internal/e2e-util/src/lib/types/package-manager.ts new file mode 100644 index 0000000..5f8ed2d --- /dev/null +++ b/packages/internal/e2e-util/src/lib/types/package-manager.ts @@ -0,0 +1 @@ +export type PackageManager = 'npm' | 'pnpm' | 'yarn'; diff --git a/packages/internal/e2e-util/src/lib/types/workspace-configuration.ts b/packages/internal/e2e-util/src/lib/types/workspace-configuration.ts new file mode 100644 index 0000000..4b60111 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/types/workspace-configuration.ts @@ -0,0 +1,10 @@ +import { WorkspaceConfiguration as NxWorkspaceConfiguration } from '@nrwl/devkit'; + +import { PackageManager } from './package-manager'; + +export interface WorkspaceConfiguration extends NxWorkspaceConfiguration { + cli?: { + defaultCollection: string; + packageManager: PackageManager; + }; +} diff --git a/packages/internal/e2e-util/src/lib/update-json-file.ts b/packages/internal/e2e-util/src/lib/update-json-file.ts new file mode 100644 index 0000000..d775b47 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/update-json-file.ts @@ -0,0 +1,12 @@ +import { updateFile } from '@nrwl/nx-plugin/testing'; + +export function updateJsonFile( + file: string, + mapper: (json: TJson) => TJson +): void { + updateFile(file, content => { + const json: TJson = JSON.parse(content); + + return JSON.stringify(mapper(json), null, 2); + }); +} From c7d7684e616f72e04e4633e929aa7c1e475ff03d Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 23:23:51 +0100 Subject: [PATCH 045/113] test(angular): cover library build target --- .../tests/convert-to-buildable.spec.ts | 57 ++++++++++++------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 71df396..aeff20c 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -14,37 +14,52 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { copyNodeModules(['ng-packagr']); }); - beforeEach(async () => { + beforeEach(() => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); configurePackageManager('yarn'); projectName = uniq('convert-to-buildable'); - await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); }); let projectName: string; - it('generates buildable library configurations', async done => { - const configurationFileNames = [ - 'ng-package.json', - 'package.json', - 'tsconfig.lib.prod.json', - ].map(fileName => path.join('libs', projectName, fileName)); + describe('Libraries', () => { + beforeEach(async () => { + await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); + }); - await runNxCommandAsync( - `generate @nxworker/angular:convert-to-buildable ${projectName}` - ); + it('generates buildable library configurations', async done => { + const configurationFileNames = [ + 'ng-package.json', + 'package.json', + 'tsconfig.lib.prod.json', + ].map(fileName => path.join('libs', projectName, fileName)); - expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); - done(); - }); + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); + + expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); + done(); + }); + + it('adds ng-packagr', async done => { + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); + + const { devDependencies = {} } = readJson('package.json'); + expect(devDependencies['ng-packagr']).toBeDefined(); + done(); + }); - it('adds ng-packagr', async done => { - await runNxCommandAsync( - `generate @nxworker/angular:convert-to-buildable ${projectName}` - ); + it('adds a "build" execution target', async done => { + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); - const { devDependencies = {} } = readJson('package.json'); - expect(devDependencies['ng-packagr']).toBeDefined(); - done(); + const result = await runNxCommandAsync(`build ${projectName}`); + expect(result.stdout).toContain('Built Angular Package'); + done(); + }); }); }); From 16adb021d49741f78bf75bd117251874772b54a1 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Tue, 12 Jan 2021 23:30:37 +0100 Subject: [PATCH 046/113] test(angular): simplify e2e tests --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index aeff20c..893d620 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -27,7 +27,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); }); - it('generates buildable library configurations', async done => { + it('generates buildable library configurations', async () => { const configurationFileNames = [ 'ng-package.json', 'package.json', @@ -39,27 +39,24 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { ); expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); - done(); }); - it('adds ng-packagr', async done => { + it('adds ng-packagr', async () => { await runNxCommandAsync( `generate @nxworker/angular:convert-to-buildable ${projectName}` ); const { devDependencies = {} } = readJson('package.json'); expect(devDependencies['ng-packagr']).toBeDefined(); - done(); }); - it('adds a "build" execution target', async done => { + it('adds a "build" execution target', async () => { await runNxCommandAsync( `generate @nxworker/angular:convert-to-buildable ${projectName}` ); const result = await runNxCommandAsync(`build ${projectName}`); expect(result.stdout).toContain('Built Angular Package'); - done(); }); }); }); From f768700d7457b97f275f8403e52ca49f39c4dc0c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 13 Jan 2021 00:40:47 +0100 Subject: [PATCH 047/113] feat(angular): make importPath optional --- .../convert-to-buildable/util/normalize-options.ts | 11 +++++++---- .../convert-to-buildable/util/normalized-schema.ts | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts index 657c581..4c5e148 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts @@ -27,10 +27,13 @@ export function normalizeOptions( return { enableIvy, - importPath: readImportPathOrThrow(host, { - projectName, - sourceRoot, - }), + importPath: + projectType === 'application' + ? undefined + : readImportPathOrThrow(host, { + projectName, + sourceRoot, + }), offsetFromRoot: offsetFromRoot(projectRoot), projectConfiguration, projectName, diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts index 1d7c3b9..3ddf3d0 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts @@ -11,7 +11,7 @@ export interface NormalizedSchema /** * Library import path, for example `@nrwl-airlines/booking/data-access`. */ - readonly importPath: string; + readonly importPath?: string; /** * Project directory offset from root workspace directory, for example * `'../../'`. From aadf608d64a1a6aee32e61a57964f2aa640128a6 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 13 Jan 2021 00:41:22 +0100 Subject: [PATCH 048/113] test(angular): increase test timeout... again --- e2e/angular-e2e/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/angular-e2e/jest.config.js b/e2e/angular-e2e/jest.config.js index 8c2f630..0b033c2 100644 --- a/e2e/angular-e2e/jest.config.js +++ b/e2e/angular-e2e/jest.config.js @@ -6,7 +6,7 @@ module.exports = { tsConfig: '/tsconfig.spec.json', }, }, - testTimeout: 60000, + testTimeout: 120_000, transform: { '^.+\\.[tj]s$': 'ts-jest', }, From e4d5ddd015a14347373702c076b5e18d211f7937 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 13 Jan 2021 00:41:42 +0100 Subject: [PATCH 049/113] feat(angular): make it run --- .../update-application-build-target.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts index 5200deb..f06c9f3 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts @@ -54,9 +54,9 @@ export function updateApplicationBuildTarget( ...buildTarget, executor: incrementalBuildExecutor, options: { - ...buildTarget.options, - parallel: true, - withDeps: true, + ...(buildTarget.options ?? {}), + // parallel: true, + // withDeps: true, }, }; From 0e90a5104bec0dd21fd52d8f59994b015f1dda86 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 13 Jan 2021 00:51:45 +0100 Subject: [PATCH 050/113] test(angular): cover application project e2e --- .../tests/convert-to-buildable.spec.ts | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 893d620..b5f524a 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,22 +1,32 @@ -import { configurePackageManager } from '@internal/e2e-util'; +import { configurePackageManager, updateJsonFile } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, ensureNxProject, readJson, runNxCommandAsync, + runPackageManagerInstall, uniq, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; describe('@nxworker/angular:convert-to-buildable generator e2e', () => { - beforeAll(() => { - copyNodeModules(['ng-packagr']); - }); + beforeAll(async () => { + copyNodeModules(['@nrwl/angular', 'ng-packagr']); + }, 120_000); - beforeEach(() => { + beforeEach(async () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); configurePackageManager('yarn'); + updateJsonFile('package.json', packageJson => ({ + ...packageJson, + devDependencies: { + ...packageJson.devDependencies, + ['@nrwl/angular']: '11.1.1', + }, + })); + runPackageManagerInstall(); + await runNxCommandAsync('generate @nrwl/angular:init'); projectName = uniq('convert-to-buildable'); }); @@ -59,4 +69,23 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { expect(result.stdout).toContain('Built Angular Package'); }); }); + + describe('Applications', () => { + beforeEach(async () => { + await runNxCommandAsync( + `generate @nrwl/angular:application ${projectName}` + ); + }); + + it('updates the "build" execution target', async () => { + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); + + const result = await runNxCommandAsync( + `build ${projectName} --with-deps` + ); + expect(result.stdout).toContain('Running target "build" succeeded'); + }); + }); }); From 431a8842f3913f848266460c9c3c83ad821cee62 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 13 Jan 2021 23:41:50 +0100 Subject: [PATCH 051/113] test(angular): extract e2e utility, simplify setup --- .../tests/convert-to-buildable.spec.ts | 17 +++++--------- packages/internal/e2e-util/src/index.ts | 1 + .../internal/e2e-util/src/lib/add-packages.ts | 21 +++++++++++++++++ .../internal/e2e-util/src/lib/types/index.ts | 1 + .../e2e-util/src/lib/types/package-json.ts | 23 +++++++++++++++++++ 5 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 packages/internal/e2e-util/src/lib/add-packages.ts create mode 100644 packages/internal/e2e-util/src/lib/types/package-json.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index b5f524a..4c677ee 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,32 +1,27 @@ -import { configurePackageManager, updateJsonFile } from '@internal/e2e-util'; +import { addPackages, configurePackageManager } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, ensureNxProject, readJson, runNxCommandAsync, - runPackageManagerInstall, uniq, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; describe('@nxworker/angular:convert-to-buildable generator e2e', () => { - beforeAll(async () => { + beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); - }, 120_000); + }); beforeEach(async () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); configurePackageManager('yarn'); - updateJsonFile('package.json', packageJson => ({ - ...packageJson, + addPackages({ devDependencies: { - ...packageJson.devDependencies, - ['@nrwl/angular']: '11.1.1', + ['@nrwl/angular']: '*', }, - })); - runPackageManagerInstall(); - await runNxCommandAsync('generate @nrwl/angular:init'); + }); projectName = uniq('convert-to-buildable'); }); diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index 7de7276..b1f5ec7 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,3 +1,4 @@ +export * from './lib/add-packages'; export * from './lib/configure-package-manager'; export * from './lib/types/package-manager'; export * from './lib/update-json-file'; diff --git a/packages/internal/e2e-util/src/lib/add-packages.ts b/packages/internal/e2e-util/src/lib/add-packages.ts new file mode 100644 index 0000000..c4c0c1b --- /dev/null +++ b/packages/internal/e2e-util/src/lib/add-packages.ts @@ -0,0 +1,21 @@ +import { WorkspaceRootPackageJson } from './types'; +import { updateJsonFile } from './update-json-file'; + +export type Packages = Pick< + WorkspaceRootPackageJson, + 'dependencies' | 'devDependencies' +>; + +export function addPackages(packages: Packages): void { + updateJsonFile('package.json', (packageJson: WorkspaceRootPackageJson) => ({ + ...packageJson, + dependencies: { + ...(packageJson.dependencies ?? {}), + ...(packages.dependencies ?? {}), + }, + devDependencies: { + ...(packageJson.devDependencies ?? {}), + ...(packages.devDependencies ?? {}), + }, + })); +} diff --git a/packages/internal/e2e-util/src/lib/types/index.ts b/packages/internal/e2e-util/src/lib/types/index.ts index 8852073..1b36c44 100644 --- a/packages/internal/e2e-util/src/lib/types/index.ts +++ b/packages/internal/e2e-util/src/lib/types/index.ts @@ -1,2 +1,3 @@ +export * from './package-json'; export * from './package-manager'; export * from './workspace-configuration'; diff --git a/packages/internal/e2e-util/src/lib/types/package-json.ts b/packages/internal/e2e-util/src/lib/types/package-json.ts new file mode 100644 index 0000000..cf0a57e --- /dev/null +++ b/packages/internal/e2e-util/src/lib/types/package-json.ts @@ -0,0 +1,23 @@ +/** + * package.json configuration file in workspace root directory. + */ +export interface WorkspaceRootPackageJson { + /** + * Package dependencies used at runtime. + */ + readonly dependencies?: { + /** + * Package name mapped to version range. + */ + readonly [packageName: string]: string; + }; + /** + * Package dependencies not used during runtime. + */ + readonly devDependencies?: { + /** + * Package name mapped to version range. + */ + readonly [packageName: string]: string; + }; +} From 2e09f9cac7404b36624d0da4be7c3a372447523c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Wed, 13 Jan 2021 23:47:19 +0100 Subject: [PATCH 052/113] test(angular): rename usePackageManager --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 4 ++-- packages/internal/e2e-util/src/index.ts | 2 +- .../{configure-package-manager.ts => use-package-manager.ts} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename packages/internal/e2e-util/src/lib/{configure-package-manager.ts => use-package-manager.ts} (86%) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 4c677ee..286ab85 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages, configurePackageManager } from '@internal/e2e-util'; +import { addPackages, usePackageManager } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -16,7 +16,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeEach(async () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - configurePackageManager('yarn'); + usePackageManager('yarn'); addPackages({ devDependencies: { ['@nrwl/angular']: '*', diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index b1f5ec7..f1880e9 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,4 +1,4 @@ export * from './lib/add-packages'; -export * from './lib/configure-package-manager'; export * from './lib/types/package-manager'; export * from './lib/update-json-file'; +export * from './lib/use-package-manager'; diff --git a/packages/internal/e2e-util/src/lib/configure-package-manager.ts b/packages/internal/e2e-util/src/lib/use-package-manager.ts similarity index 86% rename from packages/internal/e2e-util/src/lib/configure-package-manager.ts rename to packages/internal/e2e-util/src/lib/use-package-manager.ts index ac62bc5..88e9660 100644 --- a/packages/internal/e2e-util/src/lib/configure-package-manager.ts +++ b/packages/internal/e2e-util/src/lib/use-package-manager.ts @@ -6,7 +6,7 @@ import { updateJsonFile } from './update-json-file'; * * NOTE! This must be called **after** `ensureNxProject`. */ -export function configurePackageManager(packageManager: PackageManager) { +export function usePackageManager(packageManager: PackageManager) { updateJsonFile('workspace.json', (workspaceJson: WorkspaceConfiguration) => ({ ...workspaceJson, cli: { From 51c5254b060e9ca4fed6fc3292917845a10d96ff Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 00:11:24 +0100 Subject: [PATCH 053/113] test(angular): lift setup --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 286ab85..c2f0b72 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -12,9 +12,6 @@ import * as path from 'path'; describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); - }); - - beforeEach(async () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); usePackageManager('yarn'); addPackages({ @@ -22,6 +19,9 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { ['@nrwl/angular']: '*', }, }); + }); + + beforeEach(() => { projectName = uniq('convert-to-buildable'); }); From 9584d6e3fb25571e419ba7ecc85d0b485cf5ef03 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 00:22:08 +0100 Subject: [PATCH 054/113] test(angular): remove usePackageManager usage --- .../tests/convert-to-buildable.spec.ts | 3 +-- packages/internal/e2e-util/src/index.ts | 1 - .../e2e-util/src/lib/use-package-manager.ts | 18 ------------------ 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 packages/internal/e2e-util/src/lib/use-package-manager.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index c2f0b72..18a8c29 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages, usePackageManager } from '@internal/e2e-util'; +import { addPackages } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -13,7 +13,6 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - usePackageManager('yarn'); addPackages({ devDependencies: { ['@nrwl/angular']: '*', diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index f1880e9..b17156c 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,4 +1,3 @@ export * from './lib/add-packages'; export * from './lib/types/package-manager'; export * from './lib/update-json-file'; -export * from './lib/use-package-manager'; diff --git a/packages/internal/e2e-util/src/lib/use-package-manager.ts b/packages/internal/e2e-util/src/lib/use-package-manager.ts deleted file mode 100644 index 88e9660..0000000 --- a/packages/internal/e2e-util/src/lib/use-package-manager.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { PackageManager, WorkspaceConfiguration } from './types'; -import { updateJsonFile } from './update-json-file'; - -/** - * Configure the package manager for the e2e workspace. - * - * NOTE! This must be called **after** `ensureNxProject`. - */ -export function usePackageManager(packageManager: PackageManager) { - updateJsonFile('workspace.json', (workspaceJson: WorkspaceConfiguration) => ({ - ...workspaceJson, - cli: { - defaultCollection: - workspaceJson.cli?.defaultCollection ?? '@nrwl/angular', - packageManager, - }, - })); -} From 1beaaf9db9c477a386f52b7f8956efd2369e8a76 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 00:25:54 +0100 Subject: [PATCH 055/113] chore: remove explicit package manager setting This is auto-detected. --- workspace.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workspace.json b/workspace.json index 00e1cc9..672645a 100644 --- a/workspace.json +++ b/workspace.json @@ -1,8 +1,7 @@ { "version": 2, "cli": { - "defaultCollection": "@nrwl/angular", - "packageManager": "yarn" + "defaultCollection": "@nrwl/angular" }, "generators": { "@nrwl/angular:application": { From 7d90026a4b69306fbf62837db34060f666a3bb17 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 00:36:55 +0100 Subject: [PATCH 056/113] test: remove incorrect types --- packages/internal/e2e-util/src/lib/types/index.ts | 2 -- .../internal/e2e-util/src/lib/types/package-manager.ts | 1 - .../e2e-util/src/lib/types/workspace-configuration.ts | 10 ---------- 3 files changed, 13 deletions(-) delete mode 100644 packages/internal/e2e-util/src/lib/types/package-manager.ts delete mode 100644 packages/internal/e2e-util/src/lib/types/workspace-configuration.ts diff --git a/packages/internal/e2e-util/src/lib/types/index.ts b/packages/internal/e2e-util/src/lib/types/index.ts index 1b36c44..f383d7e 100644 --- a/packages/internal/e2e-util/src/lib/types/index.ts +++ b/packages/internal/e2e-util/src/lib/types/index.ts @@ -1,3 +1 @@ export * from './package-json'; -export * from './package-manager'; -export * from './workspace-configuration'; diff --git a/packages/internal/e2e-util/src/lib/types/package-manager.ts b/packages/internal/e2e-util/src/lib/types/package-manager.ts deleted file mode 100644 index 5f8ed2d..0000000 --- a/packages/internal/e2e-util/src/lib/types/package-manager.ts +++ /dev/null @@ -1 +0,0 @@ -export type PackageManager = 'npm' | 'pnpm' | 'yarn'; diff --git a/packages/internal/e2e-util/src/lib/types/workspace-configuration.ts b/packages/internal/e2e-util/src/lib/types/workspace-configuration.ts deleted file mode 100644 index 4b60111..0000000 --- a/packages/internal/e2e-util/src/lib/types/workspace-configuration.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { WorkspaceConfiguration as NxWorkspaceConfiguration } from '@nrwl/devkit'; - -import { PackageManager } from './package-manager'; - -export interface WorkspaceConfiguration extends NxWorkspaceConfiguration { - cli?: { - defaultCollection: string; - packageManager: PackageManager; - }; -} From dae6e7d1fedbfc2a0605fdce1be00134a0b4152f Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 00:39:42 +0100 Subject: [PATCH 057/113] test(angular): remove reference to deleted file --- packages/internal/e2e-util/src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index b17156c..faffeb5 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,3 +1,2 @@ export * from './lib/add-packages'; -export * from './lib/types/package-manager'; export * from './lib/update-json-file'; From 4f7c94bf0c5799e728f4fd11f5f63eb9338ccb43 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 00:51:14 +0100 Subject: [PATCH 058/113] test(angular): fix e2e tests in CI pipeline --- .../tests/convert-to-buildable.spec.ts | 3 ++- packages/internal/e2e-util/src/index.ts | 1 + .../src/lib/fix-pnpm-install-in-ci-pipeline.ts | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 18a8c29..d01851f 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages } from '@internal/e2e-util'; +import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -13,6 +13,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); + fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { ['@nrwl/angular']: '*', diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index faffeb5..14c1bf6 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/add-packages'; +export * from './lib/fix-pnpm-install-in-ci-pipeline'; export * from './lib/update-json-file'; diff --git a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts new file mode 100644 index 0000000..8ac48a6 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts @@ -0,0 +1,15 @@ +import { updateFile } from '@nrwl/nx-plugin/testing'; + +function appendLine(extraLine: string, content: string): string { + return [content, extraLine].filter(line => line !== '').join('\n'); +} + +/** + * Fixes a `pnpm install` issue in CI pipelines because the `--frozen-lockfile` + * parameter is enabled when the environment has `CI=true`. + */ +export function fixPnpmInstallInCiPipeline() { + updateFile('.npmrc', content => + appendLine('prefer-frozen-lockfile=false', content) + ); +} From 83df8bfad0dc504fadf01eb92b9904b76ded903c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:08:12 +0100 Subject: [PATCH 059/113] chore: expose Node API in e2e-util --- packages/internal/e2e-util/tsconfig.lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/internal/e2e-util/tsconfig.lib.json b/packages/internal/e2e-util/tsconfig.lib.json index 7088d98..f65e757 100644 --- a/packages/internal/e2e-util/tsconfig.lib.json +++ b/packages/internal/e2e-util/tsconfig.lib.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../../dist/out-tsc", - "types": [], + "types": ["node"], "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitReturns": true, From dcdf183e04268c66b86a4c8841fc64e2e6e8c603 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:08:56 +0100 Subject: [PATCH 060/113] test(angular): fix pnpm install issue in CI --- .../src/lib/fix-pnpm-install-in-ci-pipeline.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts index 8ac48a6..1a69ee3 100644 --- a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts +++ b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts @@ -1,15 +1,9 @@ -import { updateFile } from '@nrwl/nx-plugin/testing'; - -function appendLine(extraLine: string, content: string): string { - return [content, extraLine].filter(line => line !== '').join('\n'); -} +import { runCommand } from '@nrwl/nx-plugin/testing'; /** * Fixes a `pnpm install` issue in CI pipelines because the `--frozen-lockfile` * parameter is enabled when the environment has `CI=true`. */ export function fixPnpmInstallInCiPipeline() { - updateFile('.npmrc', content => - appendLine('prefer-frozen-lockfile=false', content) - ); + runCommand('"prefer-frozen-lockfile=false" >> .npmrc'); } From 3ee522160aab5242f0a320c5a0ed225f7b90f255 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:13:01 +0100 Subject: [PATCH 061/113] test(angular): another e2e fix attempt --- .npmrc | 2 ++ e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 3 +-- packages/internal/e2e-util/src/index.ts | 1 - .../e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts | 9 --------- 4 files changed, 3 insertions(+), 12 deletions(-) create mode 100644 .npmrc delete mode 100644 packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..fba2314 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +# fix pnpm install issue in e2e tests in CI pipeline +prefer-frozen-lockfile=false diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index d01851f..18a8c29 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; +import { addPackages } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -13,7 +13,6 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { ['@nrwl/angular']: '*', diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index 14c1bf6..faffeb5 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,3 +1,2 @@ export * from './lib/add-packages'; -export * from './lib/fix-pnpm-install-in-ci-pipeline'; export * from './lib/update-json-file'; diff --git a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts deleted file mode 100644 index 1a69ee3..0000000 --- a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { runCommand } from '@nrwl/nx-plugin/testing'; - -/** - * Fixes a `pnpm install` issue in CI pipelines because the `--frozen-lockfile` - * parameter is enabled when the environment has `CI=true`. - */ -export function fixPnpmInstallInCiPipeline() { - runCommand('"prefer-frozen-lockfile=false" >> .npmrc'); -} From c21a7da7070be568dcd756335d7ddd1310ac5e52 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:16:28 +0100 Subject: [PATCH 062/113] test(angular): fix PNPM in e2e --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 18a8c29..3d9e4e4 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -6,6 +6,7 @@ import { readJson, runNxCommandAsync, uniq, + updateFile, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; @@ -20,6 +21,10 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { }); }); + beforeEach(() => { + updateFile('.npmrc', 'prefer-frozen-lockfile=false'); + }); + beforeEach(() => { projectName = uniq('convert-to-buildable'); }); From 86e6259289c2ebf28ff7e40ae41675819dd06f3b Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:22:34 +0100 Subject: [PATCH 063/113] test(angular): fix PNPM in e2e --- .../tests/convert-to-buildable.spec.ts | 5 ++--- packages/internal/e2e-util/src/index.ts | 1 + .../src/lib/fix-pnpm-install-in-ci-pipeline.ts | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 3d9e4e4..bfe16ba 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages } from '@internal/e2e-util'; +import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -6,7 +6,6 @@ import { readJson, runNxCommandAsync, uniq, - updateFile, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; @@ -22,7 +21,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { }); beforeEach(() => { - updateFile('.npmrc', 'prefer-frozen-lockfile=false'); + fixPnpmInstallInCiPipeline(); }); beforeEach(() => { diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index faffeb5..14c1bf6 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/add-packages'; +export * from './lib/fix-pnpm-install-in-ci-pipeline'; export * from './lib/update-json-file'; diff --git a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts new file mode 100644 index 0000000..be41f59 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts @@ -0,0 +1,17 @@ +import { updateFile } from '@nrwl/nx-plugin/testing'; + +function appendLine(extraLine: string, content: string): string { + return [content, extraLine].filter(line => line !== '').join('\n'); +} + +/** + * Fixes a `pnpm install` issue in CI pipelines because the `--frozen-lockfile` + * parameter is enabled when the environment has `CI=true`. + * + * NOTE! Must be called in a `beforeEach` hook. + */ +export function fixPnpmInstallInCiPipeline() { + updateFile('.npmrc', content => + appendLine('prefer-frozen-lockfile=false', content) + ); +} From ace54ccd25ea150a37467c54de6f7942759e640d Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:25:59 +0100 Subject: [PATCH 064/113] Revert "test(angular): fix PNPM in e2e" This reverts commit 86e6259289c2ebf28ff7e40ae41675819dd06f3b. --- .../tests/convert-to-buildable.spec.ts | 5 +++-- packages/internal/e2e-util/src/index.ts | 1 - .../src/lib/fix-pnpm-install-in-ci-pipeline.ts | 17 ----------------- 3 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index bfe16ba..3d9e4e4 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; +import { addPackages } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -6,6 +6,7 @@ import { readJson, runNxCommandAsync, uniq, + updateFile, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; @@ -21,7 +22,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { }); beforeEach(() => { - fixPnpmInstallInCiPipeline(); + updateFile('.npmrc', 'prefer-frozen-lockfile=false'); }); beforeEach(() => { diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index 14c1bf6..faffeb5 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,3 +1,2 @@ export * from './lib/add-packages'; -export * from './lib/fix-pnpm-install-in-ci-pipeline'; export * from './lib/update-json-file'; diff --git a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts deleted file mode 100644 index be41f59..0000000 --- a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { updateFile } from '@nrwl/nx-plugin/testing'; - -function appendLine(extraLine: string, content: string): string { - return [content, extraLine].filter(line => line !== '').join('\n'); -} - -/** - * Fixes a `pnpm install` issue in CI pipelines because the `--frozen-lockfile` - * parameter is enabled when the environment has `CI=true`. - * - * NOTE! Must be called in a `beforeEach` hook. - */ -export function fixPnpmInstallInCiPipeline() { - updateFile('.npmrc', content => - appendLine('prefer-frozen-lockfile=false', content) - ); -} From 7de77dec1c86cafb6030c82ee5b53a20b123ea22 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:30:13 +0100 Subject: [PATCH 065/113] test(angular): extract PNPM install fix --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 5 ++--- packages/internal/e2e-util/src/index.ts | 1 + .../src/lib/fix-pnpm-install-in-ci-pipeline.ts | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 3d9e4e4..bfe16ba 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages } from '@internal/e2e-util'; +import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -6,7 +6,6 @@ import { readJson, runNxCommandAsync, uniq, - updateFile, } from '@nrwl/nx-plugin/testing'; import * as path from 'path'; @@ -22,7 +21,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { }); beforeEach(() => { - updateFile('.npmrc', 'prefer-frozen-lockfile=false'); + fixPnpmInstallInCiPipeline(); }); beforeEach(() => { diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index faffeb5..14c1bf6 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/add-packages'; +export * from './lib/fix-pnpm-install-in-ci-pipeline'; export * from './lib/update-json-file'; diff --git a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts new file mode 100644 index 0000000..7efc300 --- /dev/null +++ b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts @@ -0,0 +1,11 @@ +import { updateFile } from '@nrwl/nx-plugin/testing'; + +/** + * Fixes a `pnpm install` issue in CI pipelines because the `--frozen-lockfile` + * parameter is enabled when the environment has `CI=true`. + * + * NOTE! Must be called in a `beforeEach` hook. + */ +export function fixPnpmInstallInCiPipeline() { + updateFile('.npmrc', 'prefer-frozen-lockfile=false'); +} From c09e14706dce598600da4ef7e6502ff83ed097a7 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:32:07 +0100 Subject: [PATCH 066/113] test(angular): lift e2e setup --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index bfe16ba..d01851f 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -13,6 +13,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); + fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { ['@nrwl/angular']: '*', @@ -20,10 +21,6 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { }); }); - beforeEach(() => { - fixPnpmInstallInCiPipeline(); - }); - beforeEach(() => { projectName = uniq('convert-to-buildable'); }); From 5bca4122655e4a530ff364c611dbda195ebbdf8f Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 01:36:49 +0100 Subject: [PATCH 067/113] chore: remove unnecessary NPM configuration --- .npmrc | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index fba2314..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -# fix pnpm install issue in e2e tests in CI pipeline -prefer-frozen-lockfile=false From 7c9e29911ccb5c41795c1b031f6eeecc039f6cb6 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 21:16:00 +0100 Subject: [PATCH 068/113] test: configure lib types --- packages/internal/e2e-util/tsconfig.lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/internal/e2e-util/tsconfig.lib.json b/packages/internal/e2e-util/tsconfig.lib.json index f65e757..d1adde4 100644 --- a/packages/internal/e2e-util/tsconfig.lib.json +++ b/packages/internal/e2e-util/tsconfig.lib.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../../dist/out-tsc", - "types": ["node"], + "types": ["jest", "node"], "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitReturns": true, From e18e476f7d87c4a8719dfffb1e1338763108c5fd Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 21:16:27 +0100 Subject: [PATCH 069/113] test(angular): group library test cases --- .../convert-to-buildable/generator.spec.ts | 88 ++++++++++--------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 5747177..05c71f3 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -58,57 +58,59 @@ describe('convert-to-buildable generator', () => { let projectName: string; let host: Tree; - it('generates buildable library configurations when none of them exist', async () => { - const configurationFileNames = [ - 'ng-package.json', - 'package.json', - 'tsconfig.lib.prod.json', - ]; + describe('Libraries', () => { + it('generates buildable library configurations when none of them exist', async () => { + const configurationFileNames = [ + 'ng-package.json', + 'package.json', + 'tsconfig.lib.prod.json', + ]; - await generator(host, { - project: projectName, + await generator(host, { + project: projectName, + }); + + configurationFileNames.forEach(configurationFileName => + expect( + host.exists(path.join(project.root, configurationFileName)) + ).toBe(true) + ); }); - configurationFileNames.forEach(configurationFileName => - expect(host.exists(path.join(project.root, configurationFileName))).toBe( - true - ) - ); - }); + it('adds ng-packagr as a development dependency when not installed', async () => { + await generator(host, { + project: projectName, + }); - it('adds ng-packagr as a development dependency when not installed', async () => { - await generator(host, { - project: projectName, + const { devDependencies = {} } = readJson( + host, + 'package.json' + ); + expect(devDependencies['ng-packagr']).toBeDefined(); }); - const { devDependencies = {} } = readJson( - host, - 'package.json' - ); - expect(devDependencies['ng-packagr']).toBeDefined(); - }); - - it('adds a build target', async () => { - const expectedBuildTarget: TargetConfiguration = { - executor: '@nrwl/angular:ng-packagr-lite', - options: { - tsConfig: path.join(project.root, 'tsconfig.lib.json'), - project: path.join(project.root, 'ng-package.json'), - }, - configurations: { - production: { - tsConfig: path.join(project.root, 'tsconfig.lib.prod.json'), + it('adds a build target', async () => { + const expectedBuildTarget: TargetConfiguration = { + executor: '@nrwl/angular:ng-packagr-lite', + options: { + tsConfig: path.join(project.root, 'tsconfig.lib.json'), + project: path.join(project.root, 'ng-package.json'), }, - }, - }; + configurations: { + production: { + tsConfig: path.join(project.root, 'tsconfig.lib.prod.json'), + }, + }, + }; - await generator(host, { - project: projectName, - }); + await generator(host, { + project: projectName, + }); - const { - targets: { build: actualBuildTarget }, - } = readProjectConfiguration(host, projectName); - expect(actualBuildTarget).toEqual(expectedBuildTarget); + const { + targets: { build: actualBuildTarget }, + } = readProjectConfiguration(host, projectName); + expect(actualBuildTarget).toEqual(expectedBuildTarget); + }); }); }); From fa5d726f4e1a62fc4d9d678332bbb43a5e9dc0f9 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 21:22:14 +0100 Subject: [PATCH 070/113] feat: generate internal test util library --- jest.config.js | 1 + nx.json | 3 + packages/internal/test-util/.eslintrc.json | 5 ++ packages/internal/test-util/README.md | 7 +++ packages/internal/test-util/jest.config.js | 14 +++++ packages/internal/test-util/src/index.ts | 1 + .../src/lib/internal-test-util.spec.ts | 7 +++ .../test-util/src/lib/internal-test-util.ts | 3 + packages/internal/test-util/tsconfig.json | 13 ++++ packages/internal/test-util/tsconfig.lib.json | 14 +++++ .../internal/test-util/tsconfig.spec.json | 15 +++++ pnpm-lock.yaml | 61 ++++++++++++------- tsconfig.base.json | 1 + workspace.json | 21 +++++++ 14 files changed, 145 insertions(+), 21 deletions(-) create mode 100644 packages/internal/test-util/.eslintrc.json create mode 100644 packages/internal/test-util/README.md create mode 100644 packages/internal/test-util/jest.config.js create mode 100644 packages/internal/test-util/src/index.ts create mode 100644 packages/internal/test-util/src/lib/internal-test-util.spec.ts create mode 100644 packages/internal/test-util/src/lib/internal-test-util.ts create mode 100644 packages/internal/test-util/tsconfig.json create mode 100644 packages/internal/test-util/tsconfig.lib.json create mode 100644 packages/internal/test-util/tsconfig.spec.json diff --git a/jest.config.js b/jest.config.js index d99e950..4168b4b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -18,6 +18,7 @@ module.exports = { '/packages/examples/angular/nrwl-airlines/shared/ui-buttons', '/packages/examples/angular/nrwl-airlines/shared/util-formatting', '/packages/internal/e2e-util', + '/packages/internal/test-util', '/tools', ], }; diff --git a/nx.json b/nx.json index 801242d..71d82cb 100644 --- a/nx.json +++ b/nx.json @@ -122,6 +122,9 @@ }, "workspace-tools": { "tags": ["platform:node", "type:tool"] + }, + "internal-test-util": { + "tags": ["platform:node", "scope:internal", "type:test-util"] } } } diff --git a/packages/internal/test-util/.eslintrc.json b/packages/internal/test-util/.eslintrc.json new file mode 100644 index 0000000..0c9b27c --- /dev/null +++ b/packages/internal/test-util/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../.eslintrc.json", + "ignorePatterns": ["!**/*"], + "rules": {} +} diff --git a/packages/internal/test-util/README.md b/packages/internal/test-util/README.md new file mode 100644 index 0000000..7551bdc --- /dev/null +++ b/packages/internal/test-util/README.md @@ -0,0 +1,7 @@ +# internal-test-util + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test internal-test-util` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/packages/internal/test-util/jest.config.js b/packages/internal/test-util/jest.config.js new file mode 100644 index 0000000..e1fc9cb --- /dev/null +++ b/packages/internal/test-util/jest.config.js @@ -0,0 +1,14 @@ +module.exports = { + displayName: 'internal-test-util', + preset: '../../../jest.preset.js', + globals: { + 'ts-jest': { + tsConfig: '/tsconfig.spec.json', + }, + }, + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../../coverage/packages/internal/test-util', +}; diff --git a/packages/internal/test-util/src/index.ts b/packages/internal/test-util/src/index.ts new file mode 100644 index 0000000..d39602b --- /dev/null +++ b/packages/internal/test-util/src/index.ts @@ -0,0 +1 @@ +export * from './lib/internal-test-util'; diff --git a/packages/internal/test-util/src/lib/internal-test-util.spec.ts b/packages/internal/test-util/src/lib/internal-test-util.spec.ts new file mode 100644 index 0000000..efb7dff --- /dev/null +++ b/packages/internal/test-util/src/lib/internal-test-util.spec.ts @@ -0,0 +1,7 @@ +import { internalTestUtil } from './internal-test-util'; + +describe('internalTestUtil', () => { + it('should work', () => { + expect(internalTestUtil()).toEqual('internal-test-util'); + }); +}); diff --git a/packages/internal/test-util/src/lib/internal-test-util.ts b/packages/internal/test-util/src/lib/internal-test-util.ts new file mode 100644 index 0000000..277711b --- /dev/null +++ b/packages/internal/test-util/src/lib/internal-test-util.ts @@ -0,0 +1,3 @@ +export function internalTestUtil(): string { + return 'internal-test-util'; +} diff --git a/packages/internal/test-util/tsconfig.json b/packages/internal/test-util/tsconfig.json new file mode 100644 index 0000000..667a346 --- /dev/null +++ b/packages/internal/test-util/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/packages/internal/test-util/tsconfig.lib.json b/packages/internal/test-util/tsconfig.lib.json new file mode 100644 index 0000000..89f9865 --- /dev/null +++ b/packages/internal/test-util/tsconfig.lib.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../../dist/out-tsc", + "types": ["jest", "node"], + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "exclude": ["**/*.spec.ts"], + "include": ["**/*.ts"] +} diff --git a/packages/internal/test-util/tsconfig.spec.json b/packages/internal/test-util/tsconfig.spec.json new file mode 100644 index 0000000..1798b37 --- /dev/null +++ b/packages/internal/test-util/tsconfig.spec.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.spec.js", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c561721..b71eae6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,8 +275,8 @@ packages: yarn: '>= 1.13.0' resolution: integrity: sha512-hCyu/SSSiC6dKl/NxdWctknIrBqKR6pRe7DMArWowrZX6P9oi36LpKEFnKutE8+tXjsOqQj8XMBq9L64sXZWqg== - /@angular-eslint/eslint-plugin-template/1.0.0_0361543f832fb11a9481f3c18ac13408: - dependencies: + ? /@angular-eslint/eslint-plugin-template/1.0.0_0361543f832fb11a9481f3c18ac13408 + : dependencies: '@angular-eslint/template-parser': 1.0.0_1477e8f1042969ed998938df42d96062 '@typescript-eslint/experimental-utils': 4.3.0_eslint@7.10.0+typescript@4.0.5 aria-query: 4.2.2 @@ -866,8 +866,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw== - /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.10: - dependencies: + ? /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.10 + : dependencies: '@babel/core': 7.12.10 '@babel/helper-plugin-utils': 7.10.4 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.12.10 @@ -876,8 +876,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== - /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.3: - dependencies: + ? /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.3 + : dependencies: '@babel/core': 7.12.3 '@babel/helper-plugin-utils': 7.10.4 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.12.3 @@ -886,8 +886,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== - /@babel/plugin-proposal-nullish-coalescing-operator/7.12.1_@babel+core@7.12.10: - dependencies: + ? /@babel/plugin-proposal-nullish-coalescing-operator/7.12.1_@babel+core@7.12.10 + : dependencies: '@babel/core': 7.12.10 '@babel/helper-plugin-utils': 7.10.4 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.12.10 @@ -1516,8 +1516,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ== - /@babel/plugin-transform-member-expression-literals/7.12.1_@babel+core@7.12.10: - dependencies: + ? /@babel/plugin-transform-member-expression-literals/7.12.1_@babel+core@7.12.10 + : dependencies: '@babel/core': 7.12.10 '@babel/helper-plugin-utils': 7.10.4 optional: true @@ -1626,8 +1626,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q== - /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.10: - dependencies: + ? /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.10 + : dependencies: '@babel/core': 7.12.10 '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.10 optional: true @@ -1635,8 +1635,8 @@ packages: '@babel/core': ^7.0.0 resolution: integrity: sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q== - /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.3: - dependencies: + ? /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.3 + : dependencies: '@babel/core': 7.12.3 '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.3 dev: true @@ -4714,7 +4714,9 @@ packages: path-is-absolute: 1.0.1 readdirp: 2.2.1 upath: 1.2.0 - deprecated: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. + deprecated: + Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less + dependencies. dev: true optionalDependencies: fsevents: 1.2.13 @@ -5658,13 +5660,21 @@ packages: /debug/4.1.1: dependencies: ms: 2.1.3 - deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) + deprecated: + Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos + regression when used in a Node.js environment. It is recommended you + upgrade to 3.2.7 or 4.3.1. + (https://github.com/visionmedia/debug/issues/797) resolution: integrity: sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== /debug/4.2.0: dependencies: ms: 2.1.2 - deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) + deprecated: + Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos + regression when used in a Node.js environment. It is recommended you + upgrade to 3.2.7 or 4.3.1. + (https://github.com/visionmedia/debug/issues/797) dev: true engines: node: '>=6.0' @@ -7052,7 +7062,9 @@ packages: dependencies: bindings: 1.5.0 nan: 2.14.2 - deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. + deprecated: + fsevents 1 will break on node v14+ and could be using insecure binaries. + Upgrade to fsevents 2. dev: true engines: node: '>= 4.0' @@ -11598,7 +11610,10 @@ packages: request-promise-core: 1.1.4_request@2.88.2 stealthy-require: 1.1.1 tough-cookie: 2.5.0 - deprecated: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 + deprecated: + request-promise-native has been deprecated because it extends the now + deprecated request package, see + https://github.com/request/request/issues/3142 dev: true engines: node: '>=0.12.0' @@ -11628,7 +11643,9 @@ packages: tough-cookie: 2.5.0 tunnel-agent: 0.6.0 uuid: 3.4.0 - deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 + deprecated: + request has been deprecated, see + https://github.com/request/request/issues/3142 dev: true engines: node: '>= 6' @@ -13274,7 +13291,9 @@ packages: engines: node: '>= 6' peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + typescript: + '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev + || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' resolution: integrity: sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw== /tty-browserify/0.0.0: diff --git a/tsconfig.base.json b/tsconfig.base.json index 6b8db7c..b0fdcf3 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -20,6 +20,7 @@ "noFallthroughCasesInSwitch": true, "paths": { "@internal/e2e-util": ["packages/internal/e2e-util/src/index.ts"], + "@internal/test-util": ["packages/internal/test-util/src/index.ts"], "@nxworker/angular": ["packages/angular/src/index.ts"], "@nrwl-airlines/booking/data-access": [ "packages/examples/angular/nrwl-airlines/booking/data-access/src/index.ts" diff --git a/workspace.json b/workspace.json index 672645a..6201624 100644 --- a/workspace.json +++ b/workspace.json @@ -799,6 +799,27 @@ } } } + }, + "internal-test-util": { + "root": "packages/internal/test-util", + "sourceRoot": "packages/internal/test-util/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/internal/test-util/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/packages/internal/test-util"], + "options": { + "jestConfig": "packages/internal/test-util/jest.config.js", + "passWithNoTests": true + } + } + } } }, "defaultProject": "angular" From 650fa96cac34ec41eee7fe0b22253e71eccf325d Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 21:46:09 +0100 Subject: [PATCH 071/113] feat(internal): add Angular library generator --- packages/internal/test-util/src/index.ts | 2 +- .../test-util/src/lib/add-angular-library.ts | 55 +++++++++++++++++++ .../src/lib/internal-test-util.spec.ts | 7 --- .../test-util/src/lib/internal-test-util.ts | 3 - 4 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 packages/internal/test-util/src/lib/add-angular-library.ts delete mode 100644 packages/internal/test-util/src/lib/internal-test-util.spec.ts delete mode 100644 packages/internal/test-util/src/lib/internal-test-util.ts diff --git a/packages/internal/test-util/src/index.ts b/packages/internal/test-util/src/index.ts index d39602b..d23a315 100644 --- a/packages/internal/test-util/src/index.ts +++ b/packages/internal/test-util/src/index.ts @@ -1 +1 @@ -export * from './lib/internal-test-util'; +export * from './lib/add-angular-library'; diff --git a/packages/internal/test-util/src/lib/add-angular-library.ts b/packages/internal/test-util/src/lib/add-angular-library.ts new file mode 100644 index 0000000..b6f9f20 --- /dev/null +++ b/packages/internal/test-util/src/lib/add-angular-library.ts @@ -0,0 +1,55 @@ +import { getWorkspaceLayout, ProjectConfiguration, Tree } from '@nrwl/devkit'; +import * as path from 'path'; + +export enum LibraryType { + BuildableLibrary, + PublishableLibrary, + WorkspaceLibrary, +} + +export interface AddAngularLibraryOptions { + readonly directory?: string; + readonly name: string; + readonly type: LibraryType; +} + +export function addAngularLibrary( + host: Tree, + { directory = '', name }: AddAngularLibraryOptions +): void { + const { libsDir } = getWorkspaceLayout(host); + const root = path.join(libsDir, directory, name); + const sourceRoot = path.join(libsDir, directory, name, 'src'); + const project: ProjectConfiguration = { + projectType: 'library', + root, + sourceRoot, + targets: { + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + path.join(sourceRoot, '**/*.ts'), + path.join(sourceRoot, '**/*.html'), + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: [path.join('coverage', root)], + options: { + jestConfig: path.join(root, 'jest.config.js'), + passWithNoTests: true, + }, + }, + }, + }; + + const tsconfigBase: TsconfigBaseJson = { + compilerOptions: { + paths: { + [importPath]: [`${project.sourceRoot}/index.ts`], + }, + }, + }; +} diff --git a/packages/internal/test-util/src/lib/internal-test-util.spec.ts b/packages/internal/test-util/src/lib/internal-test-util.spec.ts deleted file mode 100644 index efb7dff..0000000 --- a/packages/internal/test-util/src/lib/internal-test-util.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { internalTestUtil } from './internal-test-util'; - -describe('internalTestUtil', () => { - it('should work', () => { - expect(internalTestUtil()).toEqual('internal-test-util'); - }); -}); diff --git a/packages/internal/test-util/src/lib/internal-test-util.ts b/packages/internal/test-util/src/lib/internal-test-util.ts deleted file mode 100644 index 277711b..0000000 --- a/packages/internal/test-util/src/lib/internal-test-util.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function internalTestUtil(): string { - return 'internal-test-util'; -} From fa87662027f7eaeba31a0cd24f9fab853b081f3c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 21:46:31 +0100 Subject: [PATCH 072/113] feat: generate @nxworker/shared package --- jest.config.js | 1 + nx.json | 3 +++ packages/shared/.eslintrc.json | 1 + packages/shared/README.md | 7 ++++++ packages/shared/jest.config.js | 14 +++++++++++ packages/shared/package.json | 4 ++++ packages/shared/src/index.ts | 1 + packages/shared/src/lib/shared.spec.ts | 7 ++++++ packages/shared/src/lib/shared.ts | 3 +++ packages/shared/tsconfig.json | 13 +++++++++++ packages/shared/tsconfig.lib.json | 11 +++++++++ packages/shared/tsconfig.spec.json | 15 ++++++++++++ tsconfig.base.json | 3 ++- workspace.json | 32 ++++++++++++++++++++++++++ 14 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 packages/shared/.eslintrc.json create mode 100644 packages/shared/README.md create mode 100644 packages/shared/jest.config.js create mode 100644 packages/shared/package.json create mode 100644 packages/shared/src/index.ts create mode 100644 packages/shared/src/lib/shared.spec.ts create mode 100644 packages/shared/src/lib/shared.ts create mode 100644 packages/shared/tsconfig.json create mode 100644 packages/shared/tsconfig.lib.json create mode 100644 packages/shared/tsconfig.spec.json diff --git a/jest.config.js b/jest.config.js index 4168b4b..8a8d8b0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -20,5 +20,6 @@ module.exports = { '/packages/internal/e2e-util', '/packages/internal/test-util', '/tools', + '/packages/shared', ], }; diff --git a/nx.json b/nx.json index 71d82cb..13ac10e 100644 --- a/nx.json +++ b/nx.json @@ -125,6 +125,9 @@ }, "internal-test-util": { "tags": ["platform:node", "scope:internal", "type:test-util"] + }, + "shared": { + "tags": ["platform:node", "scope:shared", "type:package"] } } } diff --git a/packages/shared/.eslintrc.json b/packages/shared/.eslintrc.json new file mode 100644 index 0000000..54ac395 --- /dev/null +++ b/packages/shared/.eslintrc.json @@ -0,0 +1 @@ +{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} } diff --git a/packages/shared/README.md b/packages/shared/README.md new file mode 100644 index 0000000..043b8fd --- /dev/null +++ b/packages/shared/README.md @@ -0,0 +1,7 @@ +# shared + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test shared` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/packages/shared/jest.config.js b/packages/shared/jest.config.js new file mode 100644 index 0000000..c230b7b --- /dev/null +++ b/packages/shared/jest.config.js @@ -0,0 +1,14 @@ +module.exports = { + displayName: 'shared', + preset: '../../jest.preset.js', + globals: { + 'ts-jest': { + tsConfig: '/tsconfig.spec.json', + }, + }, + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../coverage/packages/shared', +}; diff --git a/packages/shared/package.json b/packages/shared/package.json new file mode 100644 index 0000000..6a431b4 --- /dev/null +++ b/packages/shared/package.json @@ -0,0 +1,4 @@ +{ + "name": "@nxworker/shared", + "version": "0.0.1" +} diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts new file mode 100644 index 0000000..4dcc196 --- /dev/null +++ b/packages/shared/src/index.ts @@ -0,0 +1 @@ +export * from './lib/shared'; diff --git a/packages/shared/src/lib/shared.spec.ts b/packages/shared/src/lib/shared.spec.ts new file mode 100644 index 0000000..ae730cf --- /dev/null +++ b/packages/shared/src/lib/shared.spec.ts @@ -0,0 +1,7 @@ +import { shared } from './shared'; + +describe('shared', () => { + it('should work', () => { + expect(shared()).toEqual('shared'); + }); +}); diff --git a/packages/shared/src/lib/shared.ts b/packages/shared/src/lib/shared.ts new file mode 100644 index 0000000..d734544 --- /dev/null +++ b/packages/shared/src/lib/shared.ts @@ -0,0 +1,3 @@ +export function shared(): string { + return 'shared'; +} diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json new file mode 100644 index 0000000..62ebbd9 --- /dev/null +++ b/packages/shared/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/packages/shared/tsconfig.lib.json b/packages/shared/tsconfig.lib.json new file mode 100644 index 0000000..037d796 --- /dev/null +++ b/packages/shared/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "exclude": ["**/*.spec.ts"], + "include": ["**/*.ts"] +} diff --git a/packages/shared/tsconfig.spec.json b/packages/shared/tsconfig.spec.json new file mode 100644 index 0000000..559410b --- /dev/null +++ b/packages/shared/tsconfig.spec.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.spec.js", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index b0fdcf3..6e0242b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -54,7 +54,8 @@ ], "@nrwl-airlines/shared/util-formatting": [ "packages/examples/angular/nrwl-airlines/shared/util-formatting/src/index.ts" - ] + ], + "@nxworker/shared": ["packages/shared/src/index.ts"] } }, "exclude": ["node_modules", "tmp"] diff --git a/workspace.json b/workspace.json index 6201624..2976a28 100644 --- a/workspace.json +++ b/workspace.json @@ -820,6 +820,38 @@ } } } + }, + "shared": { + "root": "packages/shared", + "sourceRoot": "packages/shared/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "options": { + "lintFilePatterns": ["packages/shared/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/packages/shared"], + "options": { + "jestConfig": "packages/shared/jest.config.js", + "passWithNoTests": true + } + }, + "build": { + "executor": "@nrwl/node:package", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/packages/shared", + "tsConfig": "packages/shared/tsconfig.lib.json", + "packageJson": "packages/shared/package.json", + "main": "packages/shared/src/index.ts", + "assets": ["packages/shared/*.md"] + } + } + } } }, "defaultProject": "angular" From 504d364ad2dfe7a44a75060a2fa71f123434fb63 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 23:25:51 +0100 Subject: [PATCH 073/113] style: format --- .eslintrc.json | 2 +- nx.json | 6 +- packages/internal/test-util/src/index.ts | 3 +- .../test-util/src/lib/add-angular-library.ts | 55 --------------- .../src/lib/generators/add-angular-library.ts | 68 +++++++++++++++++++ .../src/lib/util/create-project-name.ts | 14 ++++ packages/shared/src/index.ts | 4 +- .../src/lib}/file-types/tsconfig-base-json.ts | 7 +- packages/shared/src/lib/shared.spec.ts | 7 -- packages/shared/src/lib/shared.ts | 3 - packages/shared/src/lib/util/join-path.ts | 7 ++ .../shared/src/lib/util/normalize-path.ts | 3 + tsconfig.base.json | 4 +- 13 files changed, 108 insertions(+), 75 deletions(-) delete mode 100644 packages/internal/test-util/src/lib/add-angular-library.ts create mode 100644 packages/internal/test-util/src/lib/generators/add-angular-library.ts create mode 100644 packages/internal/test-util/src/lib/util/create-project-name.ts rename packages/{angular/src/generators/convert-to-buildable => shared/src/lib}/file-types/tsconfig-base-json.ts (66%) delete mode 100644 packages/shared/src/lib/shared.spec.ts delete mode 100644 packages/shared/src/lib/shared.ts create mode 100644 packages/shared/src/lib/util/join-path.ts create mode 100644 packages/shared/src/lib/util/normalize-path.ts diff --git a/.eslintrc.json b/.eslintrc.json index f8b90b7..620f2a1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,7 +25,7 @@ }, { "sourceTag": "scope:internal", - "onlyDependOnLibsWithTags": ["scope:internal"] + "onlyDependOnLibsWithTags": ["scope:internal", "scope:shared"] }, { "sourceTag": "type:e2e", diff --git a/nx.json b/nx.json index 13ac10e..58c7d37 100644 --- a/nx.json +++ b/nx.json @@ -120,14 +120,14 @@ "internal-e2e-util": { "tags": ["platform:node", "scope:internal", "type:e2e-util"] }, - "workspace-tools": { - "tags": ["platform:node", "type:tool"] - }, "internal-test-util": { "tags": ["platform:node", "scope:internal", "type:test-util"] }, "shared": { "tags": ["platform:node", "scope:shared", "type:package"] + }, + "workspace-tools": { + "tags": ["platform:node", "type:tool"] } } } diff --git a/packages/internal/test-util/src/index.ts b/packages/internal/test-util/src/index.ts index d23a315..604b8d5 100644 --- a/packages/internal/test-util/src/index.ts +++ b/packages/internal/test-util/src/index.ts @@ -1 +1,2 @@ -export * from './lib/add-angular-library'; +export * from './lib/generators/add-angular-library'; +export * from './lib/util/create-project-name'; diff --git a/packages/internal/test-util/src/lib/add-angular-library.ts b/packages/internal/test-util/src/lib/add-angular-library.ts deleted file mode 100644 index b6f9f20..0000000 --- a/packages/internal/test-util/src/lib/add-angular-library.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { getWorkspaceLayout, ProjectConfiguration, Tree } from '@nrwl/devkit'; -import * as path from 'path'; - -export enum LibraryType { - BuildableLibrary, - PublishableLibrary, - WorkspaceLibrary, -} - -export interface AddAngularLibraryOptions { - readonly directory?: string; - readonly name: string; - readonly type: LibraryType; -} - -export function addAngularLibrary( - host: Tree, - { directory = '', name }: AddAngularLibraryOptions -): void { - const { libsDir } = getWorkspaceLayout(host); - const root = path.join(libsDir, directory, name); - const sourceRoot = path.join(libsDir, directory, name, 'src'); - const project: ProjectConfiguration = { - projectType: 'library', - root, - sourceRoot, - targets: { - lint: { - executor: '@nrwl/linter:eslint', - options: { - lintFilePatterns: [ - path.join(sourceRoot, '**/*.ts'), - path.join(sourceRoot, '**/*.html'), - ], - }, - }, - test: { - executor: '@nrwl/jest:jest', - outputs: [path.join('coverage', root)], - options: { - jestConfig: path.join(root, 'jest.config.js'), - passWithNoTests: true, - }, - }, - }, - }; - - const tsconfigBase: TsconfigBaseJson = { - compilerOptions: { - paths: { - [importPath]: [`${project.sourceRoot}/index.ts`], - }, - }, - }; -} diff --git a/packages/internal/test-util/src/lib/generators/add-angular-library.ts b/packages/internal/test-util/src/lib/generators/add-angular-library.ts new file mode 100644 index 0000000..a317567 --- /dev/null +++ b/packages/internal/test-util/src/lib/generators/add-angular-library.ts @@ -0,0 +1,68 @@ +import { + addProjectConfiguration, + getWorkspaceLayout, + ProjectConfiguration, + Tree, +} from '@nrwl/devkit'; +import { joinPath, TsconfigBaseJson } from '@nxworker/shared'; + +import { createProjectName } from '../util/create-project-name'; + +export enum LibraryType { + BuildableLibrary, + PublishableLibrary, + WorkspaceLibrary, +} + +export interface AddAngularLibraryOptions { + readonly directory?: string; + readonly name: string; + readonly npmScope?: string; + readonly type: LibraryType; +} + +export function addAngularLibrary( + host: Tree, + { directory = '', name, npmScope }: AddAngularLibraryOptions +): void { + const { libsDir, npmScope: defaultNpmScope } = getWorkspaceLayout(host); + npmScope ??= defaultNpmScope; + const importPath = `@${npmScope}/${directory}/${name}`; + const root = joinPath(libsDir, directory, name); + const sourceRoot = joinPath(libsDir, directory, name, 'src'); + const project: ProjectConfiguration = { + projectType: 'library', + root, + sourceRoot, + targets: { + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + joinPath(sourceRoot, '**', '*.ts'), + joinPath(sourceRoot, '**', '*.html'), + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: [joinPath('coverage', root)], + options: { + jestConfig: joinPath(root, 'jest.config.js'), + passWithNoTests: true, + }, + }, + }, + }; + const tsconfigBase: TsconfigBaseJson = { + compilerOptions: { + paths: { + [importPath]: [joinPath(sourceRoot, 'index.ts')], + }, + }, + }; + const projectName = createProjectName({ directory, name }); + + host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); + addProjectConfiguration(host, projectName, project); +} diff --git a/packages/internal/test-util/src/lib/util/create-project-name.ts b/packages/internal/test-util/src/lib/util/create-project-name.ts new file mode 100644 index 0000000..c3b256c --- /dev/null +++ b/packages/internal/test-util/src/lib/util/create-project-name.ts @@ -0,0 +1,14 @@ +export interface CreateProjectNameOptions { + readonly directory?: string; + readonly name: string; +} + +export function createProjectName({ + directory = '', + name, +}: CreateProjectNameOptions): string { + const separator = '-'; + const directoryParts = directory.split(/\/\\/g); + + return [...directoryParts, name].join(separator); +} diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 4dcc196..006789e 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -1 +1,3 @@ -export * from './lib/shared'; +export * from './lib/file-types/tsconfig-base-json'; +export * from './lib/util/join-path'; +export * from './lib/util/normalize-path'; diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts b/packages/shared/src/lib/file-types/tsconfig-base-json.ts similarity index 66% rename from packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts rename to packages/shared/src/lib/file-types/tsconfig-base-json.ts index 7de97b2..747da08 100644 --- a/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts +++ b/packages/shared/src/lib/file-types/tsconfig-base-json.ts @@ -1,4 +1,7 @@ -export interface PathMap { +/** + * Path map in TypeScript configuration. Mostly used in tsconfig.base.json. + */ +export interface TsconfigPathMap { readonly [importPath: string]: readonly string[]; } @@ -13,6 +16,6 @@ export interface TsconfigBaseJson { /** * Import paths also known as TypeScript path mappings. */ - readonly paths?: PathMap; + readonly paths?: TsconfigPathMap; }; } diff --git a/packages/shared/src/lib/shared.spec.ts b/packages/shared/src/lib/shared.spec.ts deleted file mode 100644 index ae730cf..0000000 --- a/packages/shared/src/lib/shared.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { shared } from './shared'; - -describe('shared', () => { - it('should work', () => { - expect(shared()).toEqual('shared'); - }); -}); diff --git a/packages/shared/src/lib/shared.ts b/packages/shared/src/lib/shared.ts deleted file mode 100644 index d734544..0000000 --- a/packages/shared/src/lib/shared.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function shared(): string { - return 'shared'; -} diff --git a/packages/shared/src/lib/util/join-path.ts b/packages/shared/src/lib/util/join-path.ts new file mode 100644 index 0000000..136e7ee --- /dev/null +++ b/packages/shared/src/lib/util/join-path.ts @@ -0,0 +1,7 @@ +import { join } from 'path'; + +import { normalizePath } from './normalize-path'; + +export function joinPath(...paths: string[]): string { + return normalizePath(join(...paths)); +} diff --git a/packages/shared/src/lib/util/normalize-path.ts b/packages/shared/src/lib/util/normalize-path.ts new file mode 100644 index 0000000..7024955 --- /dev/null +++ b/packages/shared/src/lib/util/normalize-path.ts @@ -0,0 +1,3 @@ +export function normalizePath(path: string): string { + return path.replace('\\', '/'); +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 6e0242b..e8f2140 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -22,6 +22,7 @@ "@internal/e2e-util": ["packages/internal/e2e-util/src/index.ts"], "@internal/test-util": ["packages/internal/test-util/src/index.ts"], "@nxworker/angular": ["packages/angular/src/index.ts"], + "@nxworker/shared": ["packages/shared/src/index.ts"], "@nrwl-airlines/booking/data-access": [ "packages/examples/angular/nrwl-airlines/booking/data-access/src/index.ts" ], @@ -54,8 +55,7 @@ ], "@nrwl-airlines/shared/util-formatting": [ "packages/examples/angular/nrwl-airlines/shared/util-formatting/src/index.ts" - ], - "@nxworker/shared": ["packages/shared/src/index.ts"] + ] } }, "exclude": ["node_modules", "tmp"] From bccba868a722b86f57fc0e290195bf448e6e6239 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 23:32:50 +0100 Subject: [PATCH 074/113] chore: ignore PNPM lockfile when formatting --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9071845..947ad09 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "affected:dep-graph": "nx affected:dep-graph", "affected": "nx affected", "contributors:add": "all-contributors add", - "format": "nx format:write && pnpx prettier --config .prettierrc --write \"**/*.*\" \"!dist/**\" \"!pnmpm-lock.yaml\"", + "format": "nx format:write && pnpx prettier --config .prettierrc --write \"**/*.*\" \"!dist/**\" \"!pnpm-lock.yaml\"", "format:write": "nx format:write", "format:check": "nx format:check", "update": "nx migrate @nrwl/worskpace && nx migrate latest", From 0c815c78c09a84f8986d889f18fda058a44f4558 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 23:35:33 +0100 Subject: [PATCH 075/113] chore: lock dependencies --- pnpm-lock.yaml | 76 +++++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 54 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b71eae6..63d9833 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,8 +275,8 @@ packages: yarn: '>= 1.13.0' resolution: integrity: sha512-hCyu/SSSiC6dKl/NxdWctknIrBqKR6pRe7DMArWowrZX6P9oi36LpKEFnKutE8+tXjsOqQj8XMBq9L64sXZWqg== - ? /@angular-eslint/eslint-plugin-template/1.0.0_0361543f832fb11a9481f3c18ac13408 - : dependencies: + /@angular-eslint/eslint-plugin-template/1.0.0_0361543f832fb11a9481f3c18ac13408: + dependencies: '@angular-eslint/template-parser': 1.0.0_1477e8f1042969ed998938df42d96062 '@typescript-eslint/experimental-utils': 4.3.0_eslint@7.10.0+typescript@4.0.5 aria-query: 4.2.2 @@ -866,8 +866,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw== - ? /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.10 - : dependencies: + /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.10: + dependencies: '@babel/core': 7.12.10 '@babel/helper-plugin-utils': 7.10.4 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.12.10 @@ -876,8 +876,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== - ? /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.3 - : dependencies: + /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.3: + dependencies: '@babel/core': 7.12.3 '@babel/helper-plugin-utils': 7.10.4 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.12.3 @@ -886,8 +886,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== - ? /@babel/plugin-proposal-nullish-coalescing-operator/7.12.1_@babel+core@7.12.10 - : dependencies: + /@babel/plugin-proposal-nullish-coalescing-operator/7.12.1_@babel+core@7.12.10: + dependencies: '@babel/core': 7.12.10 '@babel/helper-plugin-utils': 7.10.4 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.12.10 @@ -1516,8 +1516,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ== - ? /@babel/plugin-transform-member-expression-literals/7.12.1_@babel+core@7.12.10 - : dependencies: + /@babel/plugin-transform-member-expression-literals/7.12.1_@babel+core@7.12.10: + dependencies: '@babel/core': 7.12.10 '@babel/helper-plugin-utils': 7.10.4 optional: true @@ -1626,8 +1626,8 @@ packages: '@babel/core': ^7.0.0-0 resolution: integrity: sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q== - ? /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.10 - : dependencies: + /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.10: + dependencies: '@babel/core': 7.12.10 '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.10 optional: true @@ -1635,8 +1635,8 @@ packages: '@babel/core': ^7.0.0 resolution: integrity: sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q== - ? /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.3 - : dependencies: + /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.3: + dependencies: '@babel/core': 7.12.3 '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.3 dev: true @@ -4714,9 +4714,7 @@ packages: path-is-absolute: 1.0.1 readdirp: 2.2.1 upath: 1.2.0 - deprecated: - Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less - dependencies. + deprecated: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. dev: true optionalDependencies: fsevents: 1.2.13 @@ -5660,21 +5658,13 @@ packages: /debug/4.1.1: dependencies: ms: 2.1.3 - deprecated: - Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos - regression when used in a Node.js environment. It is recommended you - upgrade to 3.2.7 or 4.3.1. - (https://github.com/visionmedia/debug/issues/797) + deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) resolution: integrity: sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== /debug/4.2.0: dependencies: ms: 2.1.2 - deprecated: - Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos - regression when used in a Node.js environment. It is recommended you - upgrade to 3.2.7 or 4.3.1. - (https://github.com/visionmedia/debug/issues/797) + deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dev: true engines: node: '>=6.0' @@ -6931,19 +6921,6 @@ packages: optional: true resolution: integrity: sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== - /follow-redirects/1.13.1_debug@4.3.1: - dependencies: - debug: 4.3.1_supports-color@6.1.0 - dev: true - engines: - node: '>=4.0' - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - resolution: - integrity: sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== /for-in/1.0.2: engines: node: '>=0.10.0' @@ -7062,9 +7039,7 @@ packages: dependencies: bindings: 1.5.0 nan: 2.14.2 - deprecated: - fsevents 1 will break on node v14+ and could be using insecure binaries. - Upgrade to fsevents 2. + deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. dev: true engines: node: '>= 4.0' @@ -7526,7 +7501,7 @@ packages: /http-proxy/1.18.1_debug@4.3.1: dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.13.1_debug@4.3.1 + follow-redirects: 1.13.1 requires-port: 1.0.0 dev: true engines: @@ -11610,10 +11585,7 @@ packages: request-promise-core: 1.1.4_request@2.88.2 stealthy-require: 1.1.1 tough-cookie: 2.5.0 - deprecated: - request-promise-native has been deprecated because it extends the now - deprecated request package, see - https://github.com/request/request/issues/3142 + deprecated: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 dev: true engines: node: '>=0.12.0' @@ -11643,9 +11615,7 @@ packages: tough-cookie: 2.5.0 tunnel-agent: 0.6.0 uuid: 3.4.0 - deprecated: - request has been deprecated, see - https://github.com/request/request/issues/3142 + deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 dev: true engines: node: '>= 6' @@ -13291,9 +13261,7 @@ packages: engines: node: '>= 6' peerDependencies: - typescript: - '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev - || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' resolution: integrity: sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw== /tty-browserify/0.0.0: From a35a63338e47248106fa0a4e3fc3f1590757d1f2 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 23:38:46 +0100 Subject: [PATCH 076/113] refactor: correct imports --- .../generators/convert-to-buildable/generator.spec.ts | 3 ++- .../add-library-build-target.spec.ts | 2 +- .../generators/add-ng-packagr/add-ng-packagr.spec.ts | 10 +++------- .../generate-buildable-library-configurations.spec.ts | 2 +- .../util/read-import-path-or-throw.spec.ts | 2 +- .../util/read-import-path-or-throw.ts | 7 +++---- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 05c71f3..32c3330 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -7,9 +7,10 @@ import { Tree, } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { TsconfigBaseJson } from '@nxworker/shared'; import * as path from 'path'; -import { TsconfigBaseJson, WorkspaceRootPackageJson } from './file-types'; +import { WorkspaceRootPackageJson } from './file-types'; import generator from './generator'; describe('convert-to-buildable generator', () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts index ff5868d..c94852a 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts @@ -6,9 +6,9 @@ import { Tree, } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { TsconfigBaseJson } from '@nxworker/shared'; import * as path from 'path'; -import { TsconfigBaseJson } from '../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; import { addLibraryBuildTarget } from './add-library-build-target'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 9ff6c2c..f773a37 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -1,12 +1,8 @@ -import { - addProjectConfiguration, - ProjectConfiguration, - readJson, - Tree, -} from '@nrwl/devkit'; +import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { TsconfigBaseJson } from '@nxworker/shared'; -import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; +import { WorkspaceRootPackageJson } from '../../file-types'; import { addNgPackagr } from './add-ng-packagr'; describe(addNgPackagr.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 703fd19..754c384 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -5,9 +5,9 @@ import { Tree, } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { TsconfigBaseJson } from '@nxworker/shared'; import * as path from 'path'; -import { TsconfigBaseJson } from '../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; import { AngularCompilerOptions, diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts index bacfaaf..a371879 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts @@ -1,7 +1,7 @@ import { Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { TsconfigBaseJson } from '@nxworker/shared'; -import { TsconfigBaseJson } from '../file-types'; import { readImportPathOrThrow } from './read-import-path-or-throw'; describe(readImportPathOrThrow.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts index 840061f..fa0cf7e 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts @@ -1,8 +1,7 @@ import { readJson, Tree } from '@nrwl/devkit'; +import { TsconfigBaseJson, TsconfigPathMap } from '@nxworker/shared'; import * as path from 'path'; -import { PathMap, TsconfigBaseJson } from '../file-types'; - export interface ReadImportPathProjectOptions { readonly projectName: string; readonly sourceRoot: string; @@ -17,7 +16,7 @@ export interface ReadImportPathProjectOptions { */ function findPathEntryOrThrow( { projectName, sourceRoot }: ReadImportPathProjectOptions, - pathMap: PathMap + pathMap: TsconfigPathMap ): string { const maybePathEntry = Object.entries(pathMap).find(([, publicApis]) => publicApis.some(publicApi => publicApi.startsWith(sourceRoot)) @@ -38,7 +37,7 @@ function findPathEntryOrThrow( * Normalize the source paths of the specified path map according to operating * system. */ -function normalizePathMap(pathMap: PathMap): PathMap { +function normalizePathMap(pathMap: TsconfigPathMap): TsconfigPathMap { return Object.entries(pathMap) .map(([importPath, sourcePaths]): [string, readonly string[]] => [ importPath, From f3d9248cf9290c4f07f316c010e8b01c65a2a6f0 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 23:48:24 +0100 Subject: [PATCH 077/113] chore: trigger pipeline run --- .../generators/add-ng-packagr/add-ng-packagr.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index f773a37..095e5b2 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -5,6 +5,8 @@ import { TsconfigBaseJson } from '@nxworker/shared'; import { WorkspaceRootPackageJson } from '../../file-types'; import { addNgPackagr } from './add-ng-packagr'; +// Trigger pipeline run + describe(addNgPackagr.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); From ff6bb77b2d305e25dad0a39fccecbfe566427378 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 23:49:34 +0100 Subject: [PATCH 078/113] chore: delete debug comment --- .../generators/add-ng-packagr/add-ng-packagr.spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 095e5b2..f773a37 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -5,8 +5,6 @@ import { TsconfigBaseJson } from '@nxworker/shared'; import { WorkspaceRootPackageJson } from '../../file-types'; import { addNgPackagr } from './add-ng-packagr'; -// Trigger pipeline run - describe(addNgPackagr.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); From 8537d23d049ebf321c9c237fb6b997544a70f9b5 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Thu, 14 Jan 2021 23:53:46 +0100 Subject: [PATCH 079/113] refactor: remove moved file reference --- .../src/generators/convert-to-buildable/file-types/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts index 44252ec..f383d7e 100644 --- a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts +++ b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts @@ -1,2 +1 @@ export * from './package-json'; -export * from './tsconfig-base-json'; From 1b9ac0ebbfd3ce32d2c5958ca7d0c0582959fac1 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 00:02:59 +0100 Subject: [PATCH 080/113] test(angular): fix e2e tests --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index d01851f..adf853e 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -12,6 +12,7 @@ import * as path from 'path'; describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); + ensureNxProject('@nxworker/shared', 'dist/packages/shared'); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); fixPnpmInstallInCiPipeline(); addPackages({ From 2e62a4953ef7104e75d78082ee23531040a62740 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 00:11:40 +0100 Subject: [PATCH 081/113] test(angular): fix e2e test in CI --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index adf853e..97a3ca5 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -3,6 +3,7 @@ import { checkFilesExist, copyNodeModules, ensureNxProject, + patchPackageJsonForPlugin, readJson, runNxCommandAsync, uniq, @@ -12,8 +13,8 @@ import * as path from 'path'; describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); - ensureNxProject('@nxworker/shared', 'dist/packages/shared'); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); + patchPackageJsonForPlugin('@nxworker/shared', 'dist/packages/shared'); fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { From 0e7b6509e93fce1d8dfc69bfb16ba426b9e08711 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 21:44:10 +0100 Subject: [PATCH 082/113] refactor: remove shared package usage from angular package --- .../convert-to-buildable/file-types/index.ts | 1 + .../file-types/tsconfig-base-json.ts | 0 .../convert-to-buildable/generator.spec.ts | 3 +-- .../add-library-build-target.spec.ts | 2 +- .../add-ng-packagr/add-ng-packagr.spec.ts | 3 +-- ...rate-buildable-library-configurations.spec.ts | 16 +++------------- .../util/read-import-path-or-throw.spec.ts | 2 +- .../util/read-import-path-or-throw.ts | 3 ++- packages/shared/src/index.ts | 1 - 9 files changed, 10 insertions(+), 21 deletions(-) rename packages/{shared/src/lib => angular/src/generators/convert-to-buildable}/file-types/tsconfig-base-json.ts (100%) diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts index f383d7e..44252ec 100644 --- a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts +++ b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts @@ -1 +1,2 @@ export * from './package-json'; +export * from './tsconfig-base-json'; diff --git a/packages/shared/src/lib/file-types/tsconfig-base-json.ts b/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts similarity index 100% rename from packages/shared/src/lib/file-types/tsconfig-base-json.ts rename to packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 32c3330..05c71f3 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -7,10 +7,9 @@ import { Tree, } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson } from '@nxworker/shared'; import * as path from 'path'; -import { WorkspaceRootPackageJson } from './file-types'; +import { TsconfigBaseJson, WorkspaceRootPackageJson } from './file-types'; import generator from './generator'; describe('convert-to-buildable generator', () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts index c94852a..ff5868d 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts @@ -6,9 +6,9 @@ import { Tree, } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson } from '@nxworker/shared'; import * as path from 'path'; +import { TsconfigBaseJson } from '../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; import { addLibraryBuildTarget } from './add-library-build-target'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index f773a37..1728bd8 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -1,8 +1,7 @@ import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson } from '@nxworker/shared'; -import { WorkspaceRootPackageJson } from '../../file-types'; +import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; import { addNgPackagr } from './add-ng-packagr'; describe(addNgPackagr.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 754c384..791233a 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -1,20 +1,10 @@ -import { - addProjectConfiguration, - ProjectConfiguration, - readJson, - Tree, -} from '@nrwl/devkit'; +import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson } from '@nxworker/shared'; import * as path from 'path'; +import { TsconfigBaseJson } from '../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; -import { - AngularCompilerOptions, - BuildableLibraryPackageJson, - NgPackageJson, - TsconfigLibProdJson, -} from './file-types'; +import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigLibProdJson } from './file-types'; import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; describe(generateBuildableLibraryConfigurations.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts index a371879..bacfaaf 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts @@ -1,7 +1,7 @@ import { Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson } from '@nxworker/shared'; +import { TsconfigBaseJson } from '../file-types'; import { readImportPathOrThrow } from './read-import-path-or-throw'; describe(readImportPathOrThrow.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts index fa0cf7e..5ae24ea 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts @@ -1,7 +1,8 @@ import { readJson, Tree } from '@nrwl/devkit'; -import { TsconfigBaseJson, TsconfigPathMap } from '@nxworker/shared'; import * as path from 'path'; +import { TsconfigBaseJson, TsconfigPathMap } from '../file-types'; + export interface ReadImportPathProjectOptions { readonly projectName: string; readonly sourceRoot: string; diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 006789e..e2a9f80 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -1,3 +1,2 @@ -export * from './lib/file-types/tsconfig-base-json'; export * from './lib/util/join-path'; export * from './lib/util/normalize-path'; From 317af109d87ee900dcb5b3f59a4e79eb56f897b9 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 21:48:24 +0100 Subject: [PATCH 083/113] refactor: copy file type test-util library --- .../test-util/src/lib/file-types/index.ts | 1 + .../src/lib/file-types/tsconfig-base-json.ts | 21 +++++++++++++++++++ .../src/lib/generators/add-angular-library.ts | 10 +++------ 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 packages/internal/test-util/src/lib/file-types/index.ts create mode 100644 packages/internal/test-util/src/lib/file-types/tsconfig-base-json.ts diff --git a/packages/internal/test-util/src/lib/file-types/index.ts b/packages/internal/test-util/src/lib/file-types/index.ts new file mode 100644 index 0000000..dd34348 --- /dev/null +++ b/packages/internal/test-util/src/lib/file-types/index.ts @@ -0,0 +1 @@ +export * from './tsconfig-base-json'; diff --git a/packages/internal/test-util/src/lib/file-types/tsconfig-base-json.ts b/packages/internal/test-util/src/lib/file-types/tsconfig-base-json.ts new file mode 100644 index 0000000..747da08 --- /dev/null +++ b/packages/internal/test-util/src/lib/file-types/tsconfig-base-json.ts @@ -0,0 +1,21 @@ +/** + * Path map in TypeScript configuration. Mostly used in tsconfig.base.json. + */ +export interface TsconfigPathMap { + readonly [importPath: string]: readonly string[]; +} + +/** + * tsconfig.base.json configuration file in workspace root. + */ +export interface TsconfigBaseJson { + /** + * TypeScript compiler options. + */ + readonly compilerOptions: { + /** + * Import paths also known as TypeScript path mappings. + */ + readonly paths?: TsconfigPathMap; + }; +} diff --git a/packages/internal/test-util/src/lib/generators/add-angular-library.ts b/packages/internal/test-util/src/lib/generators/add-angular-library.ts index a317567..1575678 100644 --- a/packages/internal/test-util/src/lib/generators/add-angular-library.ts +++ b/packages/internal/test-util/src/lib/generators/add-angular-library.ts @@ -1,11 +1,7 @@ -import { - addProjectConfiguration, - getWorkspaceLayout, - ProjectConfiguration, - Tree, -} from '@nrwl/devkit'; -import { joinPath, TsconfigBaseJson } from '@nxworker/shared'; +import { addProjectConfiguration, getWorkspaceLayout, ProjectConfiguration, Tree } from '@nrwl/devkit'; +import { joinPath } from '@nxworker/shared'; +import { TsconfigBaseJson } from '../file-types'; import { createProjectName } from '../util/create-project-name'; export enum LibraryType { From 3abdac4a960543fe53f5318b8354ae879e820f2b Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 21:52:29 +0100 Subject: [PATCH 084/113] refactor: remove shared package usage from test-util --- .../src/lib/generators/add-angular-library.ts | 18 +++++++++--------- .../internal/test-util/src/lib/util/index.ts | 2 ++ .../test-util/src/lib/util/normalize-path.ts | 3 +++ 3 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 packages/internal/test-util/src/lib/util/index.ts create mode 100644 packages/internal/test-util/src/lib/util/normalize-path.ts diff --git a/packages/internal/test-util/src/lib/generators/add-angular-library.ts b/packages/internal/test-util/src/lib/generators/add-angular-library.ts index 1575678..8cd44e3 100644 --- a/packages/internal/test-util/src/lib/generators/add-angular-library.ts +++ b/packages/internal/test-util/src/lib/generators/add-angular-library.ts @@ -1,8 +1,8 @@ import { addProjectConfiguration, getWorkspaceLayout, ProjectConfiguration, Tree } from '@nrwl/devkit'; -import { joinPath } from '@nxworker/shared'; +import * as path from 'path'; import { TsconfigBaseJson } from '../file-types'; -import { createProjectName } from '../util/create-project-name'; +import { createProjectName, normalizePath } from '../util'; export enum LibraryType { BuildableLibrary, @@ -24,8 +24,8 @@ export function addAngularLibrary( const { libsDir, npmScope: defaultNpmScope } = getWorkspaceLayout(host); npmScope ??= defaultNpmScope; const importPath = `@${npmScope}/${directory}/${name}`; - const root = joinPath(libsDir, directory, name); - const sourceRoot = joinPath(libsDir, directory, name, 'src'); + const root = normalizePath(path.join(libsDir, directory, name)); + const sourceRoot = normalizePath(path.join(libsDir, directory, name, 'src')); const project: ProjectConfiguration = { projectType: 'library', root, @@ -35,16 +35,16 @@ export function addAngularLibrary( executor: '@nrwl/linter:eslint', options: { lintFilePatterns: [ - joinPath(sourceRoot, '**', '*.ts'), - joinPath(sourceRoot, '**', '*.html'), + normalizePath(path.join(sourceRoot, '**', '*.ts')), + normalizePath(path.join(sourceRoot, '**', '*.html')), ], }, }, test: { executor: '@nrwl/jest:jest', - outputs: [joinPath('coverage', root)], + outputs: [normalizePath(path.join('coverage', root))], options: { - jestConfig: joinPath(root, 'jest.config.js'), + jestConfig: normalizePath(path.join(root, 'jest.config.js')), passWithNoTests: true, }, }, @@ -53,7 +53,7 @@ export function addAngularLibrary( const tsconfigBase: TsconfigBaseJson = { compilerOptions: { paths: { - [importPath]: [joinPath(sourceRoot, 'index.ts')], + [importPath]: [normalizePath(path.join(sourceRoot, 'index.ts'))], }, }, }; diff --git a/packages/internal/test-util/src/lib/util/index.ts b/packages/internal/test-util/src/lib/util/index.ts new file mode 100644 index 0000000..3f40949 --- /dev/null +++ b/packages/internal/test-util/src/lib/util/index.ts @@ -0,0 +1,2 @@ +export * from './create-project-name'; +export * from './normalize-path'; diff --git a/packages/internal/test-util/src/lib/util/normalize-path.ts b/packages/internal/test-util/src/lib/util/normalize-path.ts new file mode 100644 index 0000000..7024955 --- /dev/null +++ b/packages/internal/test-util/src/lib/util/normalize-path.ts @@ -0,0 +1,3 @@ +export function normalizePath(path: string): string { + return path.replace('\\', '/'); +} From 4a5edf437782c512b6486250fa064f91ba50eb25 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 21:54:02 +0100 Subject: [PATCH 085/113] refactor: remove shared package --- .../tests/convert-to-buildable.spec.ts | 2 - jest.config.js | 1 - nx.json | 3 - packages/shared/.eslintrc.json | 1 - packages/shared/README.md | 7 -- packages/shared/jest.config.js | 14 ---- packages/shared/package.json | 4 -- packages/shared/src/index.ts | 2 - packages/shared/src/lib/util/join-path.ts | 7 -- .../shared/src/lib/util/normalize-path.ts | 3 - packages/shared/tsconfig.json | 13 ---- packages/shared/tsconfig.lib.json | 11 --- packages/shared/tsconfig.spec.json | 15 ---- tsconfig.base.json | 1 - workspace.json | 70 ++++++++----------- 15 files changed, 28 insertions(+), 126 deletions(-) delete mode 100644 packages/shared/.eslintrc.json delete mode 100644 packages/shared/README.md delete mode 100644 packages/shared/jest.config.js delete mode 100644 packages/shared/package.json delete mode 100644 packages/shared/src/index.ts delete mode 100644 packages/shared/src/lib/util/join-path.ts delete mode 100644 packages/shared/src/lib/util/normalize-path.ts delete mode 100644 packages/shared/tsconfig.json delete mode 100644 packages/shared/tsconfig.lib.json delete mode 100644 packages/shared/tsconfig.spec.json diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 97a3ca5..d01851f 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -3,7 +3,6 @@ import { checkFilesExist, copyNodeModules, ensureNxProject, - patchPackageJsonForPlugin, readJson, runNxCommandAsync, uniq, @@ -14,7 +13,6 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - patchPackageJsonForPlugin('@nxworker/shared', 'dist/packages/shared'); fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { diff --git a/jest.config.js b/jest.config.js index 8a8d8b0..4168b4b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -20,6 +20,5 @@ module.exports = { '/packages/internal/e2e-util', '/packages/internal/test-util', '/tools', - '/packages/shared', ], }; diff --git a/nx.json b/nx.json index 58c7d37..919cd2d 100644 --- a/nx.json +++ b/nx.json @@ -123,9 +123,6 @@ "internal-test-util": { "tags": ["platform:node", "scope:internal", "type:test-util"] }, - "shared": { - "tags": ["platform:node", "scope:shared", "type:package"] - }, "workspace-tools": { "tags": ["platform:node", "type:tool"] } diff --git a/packages/shared/.eslintrc.json b/packages/shared/.eslintrc.json deleted file mode 100644 index 54ac395..0000000 --- a/packages/shared/.eslintrc.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} } diff --git a/packages/shared/README.md b/packages/shared/README.md deleted file mode 100644 index 043b8fd..0000000 --- a/packages/shared/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# shared - -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test shared` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/packages/shared/jest.config.js b/packages/shared/jest.config.js deleted file mode 100644 index c230b7b..0000000 --- a/packages/shared/jest.config.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - displayName: 'shared', - preset: '../../jest.preset.js', - globals: { - 'ts-jest': { - tsConfig: '/tsconfig.spec.json', - }, - }, - transform: { - '^.+\\.[tj]sx?$': 'ts-jest', - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/packages/shared', -}; diff --git a/packages/shared/package.json b/packages/shared/package.json deleted file mode 100644 index 6a431b4..0000000 --- a/packages/shared/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@nxworker/shared", - "version": "0.0.1" -} diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts deleted file mode 100644 index e2a9f80..0000000 --- a/packages/shared/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './lib/util/join-path'; -export * from './lib/util/normalize-path'; diff --git a/packages/shared/src/lib/util/join-path.ts b/packages/shared/src/lib/util/join-path.ts deleted file mode 100644 index 136e7ee..0000000 --- a/packages/shared/src/lib/util/join-path.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { join } from 'path'; - -import { normalizePath } from './normalize-path'; - -export function joinPath(...paths: string[]): string { - return normalizePath(join(...paths)); -} diff --git a/packages/shared/src/lib/util/normalize-path.ts b/packages/shared/src/lib/util/normalize-path.ts deleted file mode 100644 index 7024955..0000000 --- a/packages/shared/src/lib/util/normalize-path.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function normalizePath(path: string): string { - return path.replace('\\', '/'); -} diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json deleted file mode 100644 index 62ebbd9..0000000 --- a/packages/shared/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/packages/shared/tsconfig.lib.json b/packages/shared/tsconfig.lib.json deleted file mode 100644 index 037d796..0000000 --- a/packages/shared/tsconfig.lib.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "declaration": true, - "types": ["node"] - }, - "exclude": ["**/*.spec.ts"], - "include": ["**/*.ts"] -} diff --git a/packages/shared/tsconfig.spec.json b/packages/shared/tsconfig.spec.json deleted file mode 100644 index 559410b..0000000 --- a/packages/shared/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts" - ] -} diff --git a/tsconfig.base.json b/tsconfig.base.json index e8f2140..b0fdcf3 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -22,7 +22,6 @@ "@internal/e2e-util": ["packages/internal/e2e-util/src/index.ts"], "@internal/test-util": ["packages/internal/test-util/src/index.ts"], "@nxworker/angular": ["packages/angular/src/index.ts"], - "@nxworker/shared": ["packages/shared/src/index.ts"], "@nrwl-airlines/booking/data-access": [ "packages/examples/angular/nrwl-airlines/booking/data-access/src/index.ts" ], diff --git a/workspace.json b/workspace.json index 2976a28..c988c59 100644 --- a/workspace.json +++ b/workspace.json @@ -36,12 +36,16 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["packages/angular/**/*.ts"] + "lintFilePatterns": [ + "packages/angular/**/*.ts" + ] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": ["coverage/packages/angular"], + "outputs": [ + "coverage/packages/angular" + ], "options": { "jestConfig": "packages/angular/jest.config.js", "passWithNoTests": true @@ -49,7 +53,9 @@ }, "build": { "executor": "@nrwl/node:package", - "outputs": ["{options.outputPath}"], + "outputs": [ + "{options.outputPath}" + ], "options": { "outputPath": "dist/packages/angular", "tsConfig": "packages/angular/tsconfig.lib.json", @@ -766,12 +772,16 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["packages/internal/e2e-util/**/*.ts"] + "lintFilePatterns": [ + "packages/internal/e2e-util/**/*.ts" + ] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": ["coverage/packages/internal/e2e-util"], + "outputs": [ + "coverage/packages/internal/e2e-util" + ], "options": { "jestConfig": "packages/internal/e2e-util/jest.config.js", "passWithNoTests": true @@ -787,12 +797,16 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["tools/**/*.ts"] + "lintFilePatterns": [ + "tools/**/*.ts" + ] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": ["coverage/tools"], + "outputs": [ + "coverage/tools" + ], "options": { "jestConfig": "tools/jest.config.js", "passWithNoTests": true @@ -808,51 +822,23 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["packages/internal/test-util/**/*.ts"] + "lintFilePatterns": [ + "packages/internal/test-util/**/*.ts" + ] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": ["coverage/packages/internal/test-util"], + "outputs": [ + "coverage/packages/internal/test-util" + ], "options": { "jestConfig": "packages/internal/test-util/jest.config.js", "passWithNoTests": true } } } - }, - "shared": { - "root": "packages/shared", - "sourceRoot": "packages/shared/src", - "projectType": "library", - "targets": { - "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["packages/shared/**/*.ts"] - } - }, - "test": { - "executor": "@nrwl/jest:jest", - "outputs": ["coverage/packages/shared"], - "options": { - "jestConfig": "packages/shared/jest.config.js", - "passWithNoTests": true - } - }, - "build": { - "executor": "@nrwl/node:package", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/packages/shared", - "tsConfig": "packages/shared/tsconfig.lib.json", - "packageJson": "packages/shared/package.json", - "main": "packages/shared/src/index.ts", - "assets": ["packages/shared/*.md"] - } - } - } } }, "defaultProject": "angular" -} +} \ No newline at end of file From 29c8a179ee8119f2e4bcc5068d1db49823940c9f Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 23:02:20 +0100 Subject: [PATCH 086/113] refactor(angular): extract use-incremental-build generator --- packages/angular/generators.json | 6 +++++ .../convert-to-buildable/generator.ts | 11 +++----- .../util/normalize-options.ts | 17 +++++------- .../util/normalized-schema.ts | 2 +- .../use-incremental-build/generator.spec.ts | 20 ++++++++++++++ .../use-incremental-build/generator.ts | 18 +++++++++++++ .../update-application-build-target/index.ts | 0 .../update-application-build-target.ts | 16 ++---------- .../use-incremental-build/schema.d.ts | 10 +++++++ .../use-incremental-build/schema.json | 23 ++++++++++++++++ .../use-incremental-build/util/index.ts | 3 +++ .../util/normalize-options.ts | 26 +++++++++++++++++++ .../util/normalized-schema.ts | 19 ++++++++++++++ 13 files changed, 137 insertions(+), 34 deletions(-) create mode 100644 packages/angular/src/generators/use-incremental-build/generator.spec.ts create mode 100644 packages/angular/src/generators/use-incremental-build/generator.ts rename packages/angular/src/generators/{convert-to-buildable => use-incremental-build}/generators/update-application-build-target/index.ts (100%) rename packages/angular/src/generators/{convert-to-buildable => use-incremental-build}/generators/update-application-build-target/update-application-build-target.ts (81%) create mode 100644 packages/angular/src/generators/use-incremental-build/schema.d.ts create mode 100644 packages/angular/src/generators/use-incremental-build/schema.json create mode 100644 packages/angular/src/generators/use-incremental-build/util/index.ts create mode 100644 packages/angular/src/generators/use-incremental-build/util/normalize-options.ts create mode 100644 packages/angular/src/generators/use-incremental-build/util/normalized-schema.ts diff --git a/packages/angular/generators.json b/packages/angular/generators.json index 31fb281..f2794d1 100644 --- a/packages/angular/generators.json +++ b/packages/angular/generators.json @@ -8,6 +8,12 @@ "schema": "./src/generators/convert-to-buildable/schema.json", "aliases": ["buildable"], "description": "Convert to buildable but non-publishable project. Supports application and workspace library projects." + }, + "use-incremental-build": { + "factory": "./src/generators/use-incremental-build/generator", + "schema": "./src/generators/use-incremental-build/schema.json", + "description": "Use incremental build executor for Angular application project.", + "aliases": ["inc-build"] } } } diff --git a/packages/angular/src/generators/convert-to-buildable/generator.ts b/packages/angular/src/generators/convert-to-buildable/generator.ts index d867e63..0561276 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.ts @@ -3,7 +3,6 @@ import { formatFiles, installPackagesTask, Tree } from '@nrwl/devkit'; import { addLibraryBuildTarget } from './generators/add-library-build-target'; import { addNgPackagr } from './generators/add-ng-packagr'; import { generateBuildableLibraryConfigurations } from './generators/generate-buildable-library-configurations'; -import { updateApplicationBuildTarget } from './generators/update-application-build-target'; import { ConvertToBuildableGeneratorSchema } from './schema'; import { normalizeOptions } from './util'; @@ -13,13 +12,9 @@ export default async function ( ): Promise<() => void> { const options = normalizeOptions(host, schema); - if (options.projectType === 'application') { - updateApplicationBuildTarget(host, options); - } else { - await generateBuildableLibraryConfigurations(host, options); - addNgPackagr(host); - addLibraryBuildTarget(host, options); - } + await generateBuildableLibraryConfigurations(host, options); + addNgPackagr(host); + addLibraryBuildTarget(host, options); if (!options.skipFormat) { await formatFiles(host); diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts index 4c5e148..8e55c0a 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalize-options.ts @@ -19,21 +19,16 @@ export function normalizeOptions( sourceRoot = `${projectRoot}/src`, } = projectConfiguration; - if (projectType !== 'application' && projectType !== 'library') { - throw new Error( - `No project type configured for project with name "${projectName}".` - ); + if (projectType !== 'library') { + throw new Error(`Project with name "${projectName}" is not a library.`); } return { enableIvy, - importPath: - projectType === 'application' - ? undefined - : readImportPathOrThrow(host, { - projectName, - sourceRoot, - }), + importPath: readImportPathOrThrow(host, { + projectName, + sourceRoot, + }), offsetFromRoot: offsetFromRoot(projectRoot), projectConfiguration, projectName, diff --git a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts index 3ddf3d0..1d7c3b9 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/normalized-schema.ts @@ -11,7 +11,7 @@ export interface NormalizedSchema /** * Library import path, for example `@nrwl-airlines/booking/data-access`. */ - readonly importPath?: string; + readonly importPath: string; /** * Project directory offset from root workspace directory, for example * `'../../'`. diff --git a/packages/angular/src/generators/use-incremental-build/generator.spec.ts b/packages/angular/src/generators/use-incremental-build/generator.spec.ts new file mode 100644 index 0000000..30f3303 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generator.spec.ts @@ -0,0 +1,20 @@ +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { Tree, readProjectConfiguration } from '@nrwl/devkit'; + +import generator from './generator'; +import { UseIncrementalBuildGeneratorSchema } from './schema'; + +describe('use-incremental-build generator', () => { + let appTree: Tree; + const options: UseIncrementalBuildGeneratorSchema = { name: 'test' }; + + beforeEach(() => { + appTree = createTreeWithEmptyWorkspace(); + }); + + it('should run successfully', async () => { + await generator(appTree, options); + const config = readProjectConfiguration(appTree, 'test'); + expect(config).toBeDefined(); + }) +}); diff --git a/packages/angular/src/generators/use-incremental-build/generator.ts b/packages/angular/src/generators/use-incremental-build/generator.ts new file mode 100644 index 0000000..f4faec4 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generator.ts @@ -0,0 +1,18 @@ +import { formatFiles, Tree } from '@nrwl/devkit'; + +import { updateApplicationBuildTarget } from './generators/update-application-build-target'; +import { UseIncrementalBuildGeneratorSchema } from './schema'; +import { normalizeOptions } from './util'; + +export default async function ( + host: Tree, + schema: UseIncrementalBuildGeneratorSchema +): Promise { + const options = normalizeOptions(host, schema); + + updateApplicationBuildTarget(host, options); + + if (!options.skipFormat) { + await formatFiles(host); + } +} diff --git a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/index.ts b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/index.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/index.ts rename to packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/index.ts diff --git a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts similarity index 81% rename from packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts rename to packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts index f06c9f3..3ba405d 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/update-application-build-target/update-application-build-target.ts +++ b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts @@ -1,8 +1,4 @@ -import { - TargetConfiguration, - Tree, - updateProjectConfiguration, -} from '@nrwl/devkit'; +import { TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; import { NormalizedSchema } from '../../util'; @@ -11,16 +7,8 @@ const incrementalBuildExecutor = '@nrwl/angular:webpack-browser'; export function updateApplicationBuildTarget( host: Tree, - { projectConfiguration, projectName, projectType }: NormalizedSchema + { projectConfiguration, projectName }: NormalizedSchema ): void { - if (projectType !== 'application') { - console.error( - `Project with name "${projectName}" is not an application. Skipping..."` - ); - - return; - } - const { targets: executionTargets } = projectConfiguration; const { build: buildTarget } = executionTargets; diff --git a/packages/angular/src/generators/use-incremental-build/schema.d.ts b/packages/angular/src/generators/use-incremental-build/schema.d.ts new file mode 100644 index 0000000..840c6e3 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/schema.d.ts @@ -0,0 +1,10 @@ +export interface UseIncrementalBuildGeneratorSchema { + /** + * The name of the project. + */ + readonly project: string; + /** + * Skip formatting files? + */ + readonly skipFormat?: boolean; +} diff --git a/packages/angular/src/generators/use-incremental-build/schema.json b/packages/angular/src/generators/use-incremental-build/schema.json new file mode 100644 index 0000000..b854ae9 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "id": "UseIncrementalBuild", + "title": "", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project", + "$default": { + "$source": "argv", + "index": 0 + } + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files? (default: false)", + "default": false + } + }, + "required": ["project"] +} diff --git a/packages/angular/src/generators/use-incremental-build/util/index.ts b/packages/angular/src/generators/use-incremental-build/util/index.ts new file mode 100644 index 0000000..5c49195 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/util/index.ts @@ -0,0 +1,3 @@ +export * from './normalize-options'; +export * from './normalized-schema'; +export * from './read-import-path-or-throw'; diff --git a/packages/angular/src/generators/use-incremental-build/util/normalize-options.ts b/packages/angular/src/generators/use-incremental-build/util/normalize-options.ts new file mode 100644 index 0000000..2d4f4da --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/util/normalize-options.ts @@ -0,0 +1,26 @@ +import { readProjectConfiguration, Tree } from '@nrwl/devkit'; + +import { UseIncrementalBuildGeneratorSchema } from '../schema'; +import { NormalizedSchema } from './normalized-schema'; + +export function normalizeOptions( + host: Tree, + { + project: projectName, + skipFormat = false, + }: UseIncrementalBuildGeneratorSchema +): NormalizedSchema { + const projectConfiguration = readProjectConfiguration(host, projectName); + + if (projectConfiguration.projectType !== 'application') { + throw new Error( + `Project with name "${projectName}" is not an application.` + ); + } + + return { + projectConfiguration, + projectName, + skipFormat, + }; +} diff --git a/packages/angular/src/generators/use-incremental-build/util/normalized-schema.ts b/packages/angular/src/generators/use-incremental-build/util/normalized-schema.ts new file mode 100644 index 0000000..7b1562e --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/util/normalized-schema.ts @@ -0,0 +1,19 @@ +import { ProjectConfiguration } from '@nrwl/devkit'; + +import { UseIncrementalBuildGeneratorSchema } from '../schema'; + +export interface NormalizedSchema + extends Omit { + /** + * The full configuration of the project. + */ + readonly projectConfiguration: ProjectConfiguration; + /** + * The name of the project. + */ + readonly projectName: string; + /** + * Skip formatting files? + */ + readonly skipFormat: boolean; +} From 070f1ee4be3037bf49de15bf487c149742dab454 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 15 Jan 2021 23:30:04 +0100 Subject: [PATCH 087/113] test(angular): integration test use-incremental-build generator --- packages/angular/src/file-types/index.ts | 1 + .../file-types/tsconfig-base-json.ts | 0 .../convert-to-buildable/file-types/index.ts | 1 - .../convert-to-buildable/generator.spec.ts | 3 +- .../use-incremental-build/generator.spec.ts | 126 ++++++++++++++++-- .../use-incremental-build/util/index.ts | 1 - 6 files changed, 117 insertions(+), 15 deletions(-) create mode 100644 packages/angular/src/file-types/index.ts rename packages/angular/src/{generators/convert-to-buildable => }/file-types/tsconfig-base-json.ts (100%) diff --git a/packages/angular/src/file-types/index.ts b/packages/angular/src/file-types/index.ts new file mode 100644 index 0000000..dd34348 --- /dev/null +++ b/packages/angular/src/file-types/index.ts @@ -0,0 +1 @@ +export * from './tsconfig-base-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts b/packages/angular/src/file-types/tsconfig-base-json.ts similarity index 100% rename from packages/angular/src/generators/convert-to-buildable/file-types/tsconfig-base-json.ts rename to packages/angular/src/file-types/tsconfig-base-json.ts diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts index 44252ec..f383d7e 100644 --- a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts +++ b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts @@ -1,2 +1 @@ export * from './package-json'; -export * from './tsconfig-base-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 05c71f3..914baaf 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -9,7 +9,8 @@ import { import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { TsconfigBaseJson, WorkspaceRootPackageJson } from './file-types'; +import { TsconfigBaseJson } from '../../file-types'; +import { WorkspaceRootPackageJson } from './file-types'; import generator from './generator'; describe('convert-to-buildable generator', () => { diff --git a/packages/angular/src/generators/use-incremental-build/generator.spec.ts b/packages/angular/src/generators/use-incremental-build/generator.spec.ts index 30f3303..e8d9bf9 100644 --- a/packages/angular/src/generators/use-incremental-build/generator.spec.ts +++ b/packages/angular/src/generators/use-incremental-build/generator.spec.ts @@ -1,20 +1,122 @@ +import { addProjectConfiguration, ProjectConfiguration, readProjectConfiguration, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { Tree, readProjectConfiguration } from '@nrwl/devkit'; import generator from './generator'; -import { UseIncrementalBuildGeneratorSchema } from './schema'; - -describe('use-incremental-build generator', () => { - let appTree: Tree; - const options: UseIncrementalBuildGeneratorSchema = { name: 'test' }; +describe('convert-to-buildable generator', () => { beforeEach(() => { - appTree = createTreeWithEmptyWorkspace(); + host = createTreeWithEmptyWorkspace(); + projectName = 'booking-desktop-app'; + project = { + projectType: 'application', + root: 'apps/booking/desktop-app', + sourceRoot: 'apps/booking/desktop-app/src', + // prefix: 'booking', + targets: { + build: { + executor: '@angular-devkit/build-angular:browser', + options: { + outputPath: 'dist/apps/booking/desktop-app', + index: 'apps/booking/desktop-app/src/index.html', + main: 'apps/booking/desktop-app/src/main.ts', + polyfills: 'apps/booking/desktop-app/src/polyfills.ts', + tsConfig: 'apps/booking/desktop-app/tsconfig.app.json', + aot: true, + assets: [ + 'apps/booking/desktop-app/src/favicon.ico', + 'apps/booking/desktop-app/src/assets', + ], + styles: ['apps/booking/desktop-app/src/styles.scss'], + scripts: [], + }, + configurations: { + production: { + fileReplacements: [ + { + replace: + 'apps/booking/desktop-app/src/environments/environment.ts', + with: + 'apps/booking/desktop-app/src/environments/environment.prod.ts', + }, + ], + optimization: true, + outputHashing: 'all', + sourceMap: false, + namedChunks: false, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + budgets: [ + { + type: 'initial', + maximumWarning: '2mb', + maximumError: '5mb', + }, + { + type: 'anyComponentStyle', + maximumWarning: '6kb', + maximumError: '10kb', + }, + ], + }, + }, + }, + serve: { + executor: '@angular-devkit/build-angular:dev-server', + options: { + browserTarget: 'booking-desktop-app:build', + }, + configurations: { + production: { + browserTarget: 'booking-desktop-app:build:production', + }, + }, + }, + 'extract-i18n': { + executor: '@angular-devkit/build-angular:extract-i18n', + options: { + browserTarget: 'booking-desktop-app:build', + }, + }, + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + 'apps/booking/desktop-app/src/**/*.ts', + 'apps/booking/desktop-app/src/**/*.html', + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: ['coverage/apps/booking/desktop-app'], + options: { + jestConfig: 'apps/booking/desktop-app/jest.config.js', + passWithNoTests: true, + }, + }, + }, + }; + + addProjectConfiguration(host, projectName, project); }); - it('should run successfully', async () => { - await generator(appTree, options); - const config = readProjectConfiguration(appTree, 'test'); - expect(config).toBeDefined(); - }) + let project: ProjectConfiguration; + let projectName: string; + let host: Tree; + + it('uses the incremental build executor', async () => { + const expectedBuildExecutor = '@nrwl/angular:webpack-browser'; + + await generator(host, { + project: projectName, + }); + + const { + targets: { + build: { executor: actualBuildExecutor }, + }, + } = readProjectConfiguration(host, projectName); + expect(actualBuildExecutor).toEqual(expectedBuildExecutor); + }); }); diff --git a/packages/angular/src/generators/use-incremental-build/util/index.ts b/packages/angular/src/generators/use-incremental-build/util/index.ts index 5c49195..6b2c090 100644 --- a/packages/angular/src/generators/use-incremental-build/util/index.ts +++ b/packages/angular/src/generators/use-incremental-build/util/index.ts @@ -1,3 +1,2 @@ export * from './normalize-options'; export * from './normalized-schema'; -export * from './read-import-path-or-throw'; From da2ecb996b8a2acb02524d654d2625b6ab73ea29 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 01:10:58 +0100 Subject: [PATCH 088/113] test(angular): split e2e tests --- .../tests/convert-to-buildable.spec.ts | 74 +++++++------------ .../tests/use-incremental-build.spec.ts | 33 +++++++++ .../util/read-import-path-or-throw.spec.ts | 2 +- .../util/read-import-path-or-throw.ts | 2 +- 4 files changed, 60 insertions(+), 51 deletions(-) create mode 100644 e2e/angular-e2e/tests/use-incremental-build.spec.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index d01851f..abbf38e 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -21,66 +21,42 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { }); }); - beforeEach(() => { + beforeEach(async () => { projectName = uniq('convert-to-buildable'); + await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); }); let projectName: string; - describe('Libraries', () => { - beforeEach(async () => { - await runNxCommandAsync(`generate @nrwl/angular:library ${projectName}`); - }); - - it('generates buildable library configurations', async () => { - const configurationFileNames = [ - 'ng-package.json', - 'package.json', - 'tsconfig.lib.prod.json', - ].map(fileName => path.join('libs', projectName, fileName)); - - await runNxCommandAsync( - `generate @nxworker/angular:convert-to-buildable ${projectName}` - ); + it('generates buildable library configurations', async () => { + const configurationFileNames = [ + 'ng-package.json', + 'package.json', + 'tsconfig.lib.prod.json', + ].map(fileName => path.join('libs', projectName, fileName)); - expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); - }); - - it('adds ng-packagr', async () => { - await runNxCommandAsync( - `generate @nxworker/angular:convert-to-buildable ${projectName}` - ); + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); - const { devDependencies = {} } = readJson('package.json'); - expect(devDependencies['ng-packagr']).toBeDefined(); - }); + expect(() => checkFilesExist(...configurationFileNames)).not.toThrow(); + }); - it('adds a "build" execution target', async () => { - await runNxCommandAsync( - `generate @nxworker/angular:convert-to-buildable ${projectName}` - ); + it('adds ng-packagr', async () => { + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); - const result = await runNxCommandAsync(`build ${projectName}`); - expect(result.stdout).toContain('Built Angular Package'); - }); + const { devDependencies = {} } = readJson('package.json'); + expect(devDependencies['ng-packagr']).toBeDefined(); }); - describe('Applications', () => { - beforeEach(async () => { - await runNxCommandAsync( - `generate @nrwl/angular:application ${projectName}` - ); - }); + it('adds a "build" execution target', async () => { + await runNxCommandAsync( + `generate @nxworker/angular:convert-to-buildable ${projectName}` + ); - it('updates the "build" execution target', async () => { - await runNxCommandAsync( - `generate @nxworker/angular:convert-to-buildable ${projectName}` - ); - - const result = await runNxCommandAsync( - `build ${projectName} --with-deps` - ); - expect(result.stdout).toContain('Running target "build" succeeded'); - }); + const result = await runNxCommandAsync(`build ${projectName}`); + expect(result.stdout).toContain('Built Angular Package'); }); }); diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts new file mode 100644 index 0000000..66e7c54 --- /dev/null +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -0,0 +1,33 @@ +import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; +import { copyNodeModules, ensureNxProject, runNxCommandAsync, uniq } from '@nrwl/nx-plugin/testing'; + +describe.skip('@nxworker/angular:use-incremental-build generator e2e', () => { + beforeAll(() => { + copyNodeModules(['@nrwl/angular']); + ensureNxProject('@nxworker/angular', 'dist/packages/angular'); + fixPnpmInstallInCiPipeline(); + addPackages({ + devDependencies: { + ['@nrwl/angular']: '*', + }, + }); + }); + + beforeEach(async () => { + projectName = uniq('use-incremental-build'); + await runNxCommandAsync( + `generate @nrwl/angular:application ${projectName}` + ); + }); + + let projectName: string; + + it('updates the "build" execution target', async () => { + await runNxCommandAsync( + `generate @nxworker/angular:use-incremental-build ${projectName}` + ); + + const result = await runNxCommandAsync(`build ${projectName} --with-deps`); + expect(result.stdout).toContain('Running target "build" succeeded'); + }); +}); diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts index bacfaaf..9f9271f 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.spec.ts @@ -1,7 +1,7 @@ import { Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson } from '../file-types'; +import { TsconfigBaseJson } from '../../../file-types'; import { readImportPathOrThrow } from './read-import-path-or-throw'; describe(readImportPathOrThrow.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts index 5ae24ea..2b198b4 100644 --- a/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts +++ b/packages/angular/src/generators/convert-to-buildable/util/read-import-path-or-throw.ts @@ -1,7 +1,7 @@ import { readJson, Tree } from '@nrwl/devkit'; import * as path from 'path'; -import { TsconfigBaseJson, TsconfigPathMap } from '../file-types'; +import { TsconfigBaseJson, TsconfigPathMap } from '../../../file-types'; export interface ReadImportPathProjectOptions { readonly projectName: string; From 4f4fda8a27cd7d5953419f243f7d36cb9ca7029b Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 01:50:43 +0100 Subject: [PATCH 089/113] chore: run e2e tests in serial --- e2e/angular-e2e/jest.config.js | 1 + package.json | 1 + pnpm-lock.yaml | 768 ++++++++++++++++++++++++++++++++- 3 files changed, 768 insertions(+), 2 deletions(-) diff --git a/e2e/angular-e2e/jest.config.js b/e2e/angular-e2e/jest.config.js index 0b033c2..191b288 100644 --- a/e2e/angular-e2e/jest.config.js +++ b/e2e/angular-e2e/jest.config.js @@ -6,6 +6,7 @@ module.exports = { tsConfig: '/tsconfig.spec.json', }, }, + runner: 'jest-serial-runner', testTimeout: 120_000, transform: { '^.+\\.[tj]s$': 'ts-jest', diff --git a/package.json b/package.json index 8bb2faa..d372915 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "husky": "^4.3.7", "jest": "26.2.2", "jest-preset-angular": "8.3.1", + "jest-serial-runner": "^1.1.0", "json": "^10.0.0", "lint-staged": "^10.5.3", "ng-packagr": "^11.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 63d9833..8296f75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,6 +57,7 @@ devDependencies: husky: 4.3.7 jest: 26.2.2_ts-node@9.1.1 jest-preset-angular: 8.3.1_c29faa133a6a4b4ab5c55a1fa06c50f9 + jest-serial-runner: 1.1.0 json: 10.0.0 lint-staged: 10.5.3 ng-packagr: 11.0.3_91de3abf2c33a188d811d0c09a5700d2 @@ -686,7 +687,7 @@ packages: '@babel/helper-simple-access': 7.12.1 '@babel/helper-split-export-declaration': 7.12.11 '@babel/helper-validator-identifier': 7.12.11 - '@babel/template': 7.10.4 + '@babel/template': 7.12.7 '@babel/traverse': 7.12.12 '@babel/types': 7.12.12 lodash: 4.17.20 @@ -746,7 +747,7 @@ packages: integrity: sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow== /@babel/helpers/7.12.5: dependencies: - '@babel/template': 7.10.4 + '@babel/template': 7.12.7 '@babel/traverse': 7.12.12 '@babel/types': 7.12.12 resolution: @@ -2093,6 +2094,7 @@ packages: '@babel/code-frame': 7.12.11 '@babel/parser': 7.12.11 '@babel/types': 7.12.12 + dev: true resolution: integrity: sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== /@babel/template/7.12.7: @@ -2395,6 +2397,16 @@ packages: node: '>=8' resolution: integrity: sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== + /@jest/console/24.9.0: + dependencies: + '@jest/source-map': 24.9.0 + chalk: 2.4.2 + slash: 2.0.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== /@jest/console/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -2445,6 +2457,17 @@ packages: ts-node: '*' resolution: integrity: sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw== + /@jest/environment/24.9.0: + dependencies: + '@jest/fake-timers': 24.9.0 + '@jest/transform': 24.9.0 + '@jest/types': 24.9.0 + jest-mock: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ== /@jest/environment/26.6.2: dependencies: '@jest/fake-timers': 26.6.2 @@ -2456,6 +2479,16 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== + /@jest/fake-timers/24.9.0: + dependencies: + '@jest/types': 24.9.0 + jest-message-util: 24.9.0 + jest-mock: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A== /@jest/fake-timers/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -2512,6 +2545,16 @@ packages: node-notifier: 8.0.1 resolution: integrity: sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw== + /@jest/source-map/24.9.0: + dependencies: + callsites: 3.1.0 + graceful-fs: 4.2.4 + source-map: 0.6.1 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== /@jest/source-map/26.6.2: dependencies: callsites: 3.1.0 @@ -2522,6 +2565,16 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA== + /@jest/test-result/24.9.0: + dependencies: + '@jest/console': 24.9.0 + '@jest/types': 24.9.0 + '@types/istanbul-lib-coverage': 2.0.3 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA== /@jest/test-result/26.6.2: dependencies: '@jest/console': 26.6.2 @@ -2533,6 +2586,17 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ== + /@jest/test-sequencer/24.9.0: + dependencies: + '@jest/test-result': 24.9.0 + jest-haste-map: 24.9.0 + jest-runner: 24.9.0 + jest-runtime: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A== /@jest/test-sequencer/26.6.3_ts-node@9.1.1: dependencies: '@jest/test-result': 26.6.2 @@ -2547,6 +2611,29 @@ packages: ts-node: '*' resolution: integrity: sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw== + /@jest/transform/24.9.0: + dependencies: + '@babel/core': 7.12.10 + '@jest/types': 24.9.0 + babel-plugin-istanbul: 5.2.0 + chalk: 2.4.2 + convert-source-map: 1.7.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.4 + jest-haste-map: 24.9.0 + jest-regex-util: 24.9.0 + jest-util: 24.9.0 + micromatch: 3.1.10 + pirates: 4.0.1 + realpath-native: 1.1.0 + slash: 2.0.0 + source-map: 0.6.1 + write-file-atomic: 2.4.1 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ== /@jest/transform/26.6.2: dependencies: '@babel/core': 7.12.10 @@ -2569,6 +2656,16 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== + /@jest/types/24.9.0: + dependencies: + '@types/istanbul-lib-coverage': 2.0.3 + '@types/istanbul-reports': 1.1.2 + '@types/yargs': 13.0.11 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== /@jest/types/25.5.0: dependencies: '@types/istanbul-lib-coverage': 2.0.3 @@ -3200,6 +3297,10 @@ packages: dev: true resolution: integrity: sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA== + /@types/stack-utils/1.0.1: + dev: true + resolution: + integrity: sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== /@types/stack-utils/2.0.0: dev: true resolution: @@ -3215,6 +3316,12 @@ packages: /@types/yargs-parser/20.2.0: resolution: integrity: sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== + /@types/yargs/13.0.11: + dependencies: + '@types/yargs-parser': 20.2.0 + dev: true + resolution: + integrity: sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ== /@types/yargs/15.0.12: dependencies: '@types/yargs-parser': 20.2.0 @@ -3675,6 +3782,13 @@ packages: node: '>= 0.6' resolution: integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + /acorn-globals/4.3.4: + dependencies: + acorn: 6.4.2 + acorn-walk: 6.2.0 + dev: true + resolution: + integrity: sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== /acorn-globals/6.0.0: dependencies: acorn: 7.4.1 @@ -3690,12 +3804,25 @@ packages: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 resolution: integrity: sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== + /acorn-walk/6.2.0: + dev: true + engines: + node: '>=0.4.0' + resolution: + integrity: sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== /acorn-walk/7.2.0: dev: true engines: node: '>=0.4.0' resolution: integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + /acorn/5.7.4: + dev: true + engines: + node: '>=0.4.0' + hasBin: true + resolution: + integrity: sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== /acorn/6.4.2: dev: true engines: @@ -3935,6 +4062,10 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + /array-equal/1.0.0: + dev: true + resolution: + integrity: sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= /array-flatten/1.1.1: dev: true resolution: @@ -4120,6 +4251,23 @@ packages: js-tokens: 3.0.2 resolution: integrity: sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + /babel-jest/24.9.0_@babel+core@7.12.10: + dependencies: + '@babel/core': 7.12.10 + '@jest/transform': 24.9.0 + '@jest/types': 24.9.0 + '@types/babel__core': 7.1.12 + babel-plugin-istanbul: 5.2.0 + babel-preset-jest: 24.9.0_@babel+core@7.12.10 + chalk: 2.4.2 + slash: 2.0.0 + dev: true + engines: + node: '>= 6' + peerDependencies: + '@babel/core': ^7.0.0 + resolution: + integrity: sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw== /babel-jest/26.6.3_@babel+core@7.12.10: dependencies: '@babel/core': 7.12.10 @@ -4175,6 +4323,17 @@ packages: object.assign: 4.1.2 resolution: integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + /babel-plugin-istanbul/5.2.0: + dependencies: + '@babel/helper-plugin-utils': 7.10.4 + find-up: 3.0.0 + istanbul-lib-instrument: 3.3.0 + test-exclude: 5.2.3 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw== /babel-plugin-istanbul/6.0.0: dependencies: '@babel/helper-plugin-utils': 7.10.4 @@ -4187,6 +4346,14 @@ packages: node: '>=8' resolution: integrity: sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ== + /babel-plugin-jest-hoist/24.9.0: + dependencies: + '@types/babel__traverse': 7.11.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw== /babel-plugin-jest-hoist/26.6.2: dependencies: '@babel/template': 7.12.7 @@ -4218,6 +4385,18 @@ packages: '@babel/core': ^7.0.0 resolution: integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + /babel-preset-jest/24.9.0_@babel+core@7.12.10: + dependencies: + '@babel/core': 7.12.10 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.12.10 + babel-plugin-jest-hoist: 24.9.0 + dev: true + engines: + node: '>= 6' + peerDependencies: + '@babel/core': ^7.0.0 + resolution: + integrity: sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg== /babel-preset-jest/26.6.2_@babel+core@7.12.10: dependencies: '@babel/core': 7.12.10 @@ -4369,6 +4548,12 @@ packages: dev: true resolution: integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== + /browser-resolve/1.11.3: + dependencies: + resolve: 1.1.7 + dev: true + resolution: + integrity: sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== /browserify-aes/1.2.0: dependencies: buffer-xor: 1.0.3 @@ -5540,6 +5725,12 @@ packages: dev: true resolution: integrity: sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== + /cssstyle/1.4.0: + dependencies: + cssom: 0.3.8 + dev: true + resolution: + integrity: sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== /cssstyle/2.3.0: dependencies: cssom: 0.3.8 @@ -5624,6 +5815,14 @@ packages: node: '>=0.10' resolution: integrity: sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + /data-urls/1.1.0: + dependencies: + abab: 2.0.5 + whatwg-mimetype: 2.3.0 + whatwg-url: 7.1.0 + dev: true + resolution: + integrity: sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== /data-urls/2.0.0: dependencies: abab: 2.0.5 @@ -5850,6 +6049,12 @@ packages: dev: true resolution: integrity: sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + /detect-newline/2.1.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= /detect-newline/3.1.0: dev: true engines: @@ -5864,6 +6069,12 @@ packages: dev: true resolution: integrity: sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= + /diff-sequences/24.9.0: + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== /diff-sequences/25.2.6: dev: true engines: @@ -5954,6 +6165,12 @@ packages: dev: true resolution: integrity: sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== + /domexception/1.0.1: + dependencies: + webidl-conversions: 4.0.2 + dev: true + resolution: + integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== /domexception/2.0.1: dependencies: webidl-conversions: 5.0.0 @@ -6560,6 +6777,19 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + /expect/24.9.0: + dependencies: + '@jest/types': 24.9.0 + ansi-styles: 3.2.1 + jest-get-type: 24.9.0 + jest-matcher-utils: 24.9.0 + jest-message-util: 24.9.0 + jest-regex-util: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q== /expect/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -6921,6 +7151,12 @@ packages: optional: true resolution: integrity: sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== + /for-each/0.3.3: + dependencies: + is-callable: 1.2.2 + dev: true + resolution: + integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== /for-in/1.0.2: engines: node: '>=0.10.0' @@ -7413,6 +7649,12 @@ packages: dev: true resolution: integrity: sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== + /html-encoding-sniffer/1.0.2: + dependencies: + whatwg-encoding: 1.0.5 + dev: true + resolution: + integrity: sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== /html-encoding-sniffer/2.0.1: dependencies: whatwg-encoding: 1.0.5 @@ -7769,6 +8011,12 @@ packages: node: '>=6' resolution: integrity: sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== + /invariant/2.2.4: + dependencies: + loose-envify: 1.4.0 + dev: true + resolution: + integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== /ip-regex/2.1.0: dev: true engines: @@ -8197,12 +8445,32 @@ packages: dev: true resolution: integrity: sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + /istanbul-lib-coverage/2.0.5: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== /istanbul-lib-coverage/3.0.0: dev: true engines: node: '>=8' resolution: integrity: sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== + /istanbul-lib-instrument/3.3.0: + dependencies: + '@babel/generator': 7.12.11 + '@babel/parser': 7.12.11 + '@babel/template': 7.12.7 + '@babel/traverse': 7.12.12 + '@babel/types': 7.12.12 + istanbul-lib-coverage: 2.0.5 + semver: 6.3.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== /istanbul-lib-instrument/4.0.3: dependencies: '@babel/core': 7.12.3 @@ -8294,6 +8562,30 @@ packages: ts-node: '*' resolution: integrity: sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg== + /jest-config/24.9.0: + dependencies: + '@babel/core': 7.12.10 + '@jest/test-sequencer': 24.9.0 + '@jest/types': 24.9.0 + babel-jest: 24.9.0_@babel+core@7.12.10 + chalk: 2.4.2 + glob: 7.1.6 + jest-environment-jsdom: 24.9.0 + jest-environment-node: 24.9.0 + jest-get-type: 24.9.0 + jest-jasmine2: 24.9.0 + jest-regex-util: 24.9.0 + jest-resolve: 24.9.0 + jest-util: 24.9.0 + jest-validate: 24.9.0 + micromatch: 3.1.10 + pretty-format: 24.9.0 + realpath-native: 1.1.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ== /jest-config/26.6.3_ts-node@9.1.1: dependencies: '@babel/core': 7.12.10 @@ -8325,6 +8617,17 @@ packages: optional: true resolution: integrity: sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg== + /jest-diff/24.9.0: + dependencies: + chalk: 2.4.2 + diff-sequences: 24.9.0 + jest-get-type: 24.9.0 + pretty-format: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== /jest-diff/25.5.0: dependencies: chalk: 3.0.0 @@ -8347,6 +8650,14 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== + /jest-docblock/24.9.0: + dependencies: + detect-newline: 2.1.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA== /jest-docblock/26.0.0: dependencies: detect-newline: 3.1.0 @@ -8355,6 +8666,18 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w== + /jest-each/24.9.0: + dependencies: + '@jest/types': 24.9.0 + chalk: 2.4.2 + jest-get-type: 24.9.0 + jest-util: 24.9.0 + pretty-format: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog== /jest-each/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -8367,6 +8690,19 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A== + /jest-environment-jsdom/24.9.0: + dependencies: + '@jest/environment': 24.9.0 + '@jest/fake-timers': 24.9.0 + '@jest/types': 24.9.0 + jest-mock: 24.9.0 + jest-util: 24.9.0 + jsdom: 11.12.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA== /jest-environment-jsdom/26.6.2: dependencies: '@jest/environment': 26.6.2 @@ -8381,6 +8717,18 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q== + /jest-environment-node/24.9.0: + dependencies: + '@jest/environment': 24.9.0 + '@jest/fake-timers': 24.9.0 + '@jest/types': 24.9.0 + jest-mock: 24.9.0 + jest-util: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA== /jest-environment-node/26.6.2: dependencies: '@jest/environment': 26.6.2 @@ -8394,6 +8742,12 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== + /jest-get-type/24.9.0: + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== /jest-get-type/25.2.6: dev: true engines: @@ -8406,6 +8760,26 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== + /jest-haste-map/24.9.0: + dependencies: + '@jest/types': 24.9.0 + anymatch: 2.0.0 + fb-watchman: 2.0.1 + graceful-fs: 4.2.4 + invariant: 2.2.4 + jest-serializer: 24.9.0 + jest-util: 24.9.0 + jest-worker: 24.9.0 + micromatch: 3.1.10 + sane: 4.1.0 + walker: 1.0.7 + dev: true + engines: + node: '>= 6' + optionalDependencies: + fsevents: 1.2.13 + resolution: + integrity: sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ== /jest-haste-map/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -8428,6 +8802,29 @@ packages: fsevents: 2.3.1 resolution: integrity: sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== + /jest-jasmine2/24.9.0: + dependencies: + '@babel/traverse': 7.12.12 + '@jest/environment': 24.9.0 + '@jest/test-result': 24.9.0 + '@jest/types': 24.9.0 + chalk: 2.4.2 + co: 4.6.0 + expect: 24.9.0 + is-generator-fn: 2.1.0 + jest-each: 24.9.0 + jest-matcher-utils: 24.9.0 + jest-message-util: 24.9.0 + jest-runtime: 24.9.0 + jest-snapshot: 24.9.0 + jest-util: 24.9.0 + pretty-format: 24.9.0 + throat: 4.1.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw== /jest-jasmine2/26.6.3_ts-node@9.1.1: dependencies: '@babel/traverse': 7.12.12 @@ -8455,6 +8852,15 @@ packages: ts-node: '*' resolution: integrity: sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg== + /jest-leak-detector/24.9.0: + dependencies: + jest-get-type: 24.9.0 + pretty-format: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA== /jest-leak-detector/26.6.2: dependencies: jest-get-type: 26.3.0 @@ -8464,6 +8870,17 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg== + /jest-matcher-utils/24.9.0: + dependencies: + chalk: 2.4.2 + jest-diff: 24.9.0 + jest-get-type: 24.9.0 + pretty-format: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA== /jest-matcher-utils/26.6.2: dependencies: chalk: 4.1.0 @@ -8475,6 +8892,21 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== + /jest-message-util/24.9.0: + dependencies: + '@babel/code-frame': 7.12.11 + '@jest/test-result': 24.9.0 + '@jest/types': 24.9.0 + '@types/stack-utils': 1.0.1 + chalk: 2.4.2 + micromatch: 3.1.10 + slash: 2.0.0 + stack-utils: 1.0.4 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw== /jest-message-util/26.6.2: dependencies: '@babel/code-frame': 7.12.11 @@ -8491,6 +8923,14 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== + /jest-mock/24.9.0: + dependencies: + '@jest/types': 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w== /jest-mock/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -8500,6 +8940,19 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== + /jest-pnp-resolver/1.2.2_jest-resolve@24.9.0: + dependencies: + jest-resolve: 24.9.0 + dev: true + engines: + node: '>=6' + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + resolution: + integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== /jest-pnp-resolver/1.2.2_jest-resolve@26.6.2: dependencies: jest-resolve: 26.6.2 @@ -8529,6 +8982,12 @@ packages: typescript: '*' resolution: integrity: sha512-WhQm+0tXzikkvIF35XErV87DqYbieZI0R0MIGgn7VE/DDhdbXFDmYQxFZ7w4qcA0cGLLvSMTBbIsUtHeE/rFxQ== + /jest-regex-util/24.9.0: + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA== /jest-regex-util/26.0.0: dev: true engines: @@ -8545,6 +9004,18 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg== + /jest-resolve/24.9.0: + dependencies: + '@jest/types': 24.9.0 + browser-resolve: 1.11.3 + chalk: 2.4.2 + jest-pnp-resolver: 1.2.2_jest-resolve@24.9.0 + realpath-native: 1.1.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ== /jest-resolve/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -8559,6 +9030,32 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== + /jest-runner/24.9.0: + dependencies: + '@jest/console': 24.9.0 + '@jest/environment': 24.9.0 + '@jest/test-result': 24.9.0 + '@jest/types': 24.9.0 + chalk: 2.4.2 + exit: 0.1.2 + graceful-fs: 4.2.4 + jest-config: 24.9.0 + jest-docblock: 24.9.0 + jest-haste-map: 24.9.0 + jest-jasmine2: 24.9.0 + jest-leak-detector: 24.9.0 + jest-message-util: 24.9.0 + jest-resolve: 24.9.0 + jest-runtime: 24.9.0 + jest-util: 24.9.0 + jest-worker: 24.9.0 + source-map-support: 0.5.19 + throat: 4.1.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg== /jest-runner/26.6.3_ts-node@9.1.1: dependencies: '@jest/console': 26.6.2 @@ -8588,6 +9085,37 @@ packages: ts-node: '*' resolution: integrity: sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ== + /jest-runtime/24.9.0: + dependencies: + '@jest/console': 24.9.0 + '@jest/environment': 24.9.0 + '@jest/source-map': 24.9.0 + '@jest/transform': 24.9.0 + '@jest/types': 24.9.0 + '@types/yargs': 13.0.11 + chalk: 2.4.2 + exit: 0.1.2 + glob: 7.1.6 + graceful-fs: 4.2.4 + jest-config: 24.9.0 + jest-haste-map: 24.9.0 + jest-message-util: 24.9.0 + jest-mock: 24.9.0 + jest-regex-util: 24.9.0 + jest-resolve: 24.9.0 + jest-snapshot: 24.9.0 + jest-util: 24.9.0 + jest-validate: 24.9.0 + realpath-native: 1.1.0 + slash: 2.0.0 + strip-bom: 3.0.0 + yargs: 13.3.2 + dev: true + engines: + node: '>= 6' + hasBin: true + resolution: + integrity: sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw== /jest-runtime/26.6.3_ts-node@9.1.1: dependencies: '@jest/console': 26.6.2 @@ -8625,6 +9153,18 @@ packages: ts-node: '*' resolution: integrity: sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw== + /jest-serial-runner/1.1.0: + dependencies: + jest-runner: 24.9.0 + dev: true + resolution: + integrity: sha512-QSCMVZMYPAB8ALys43sxgVt4R6slizz7wj2rbCQPvczMh/AOImKeRil6T0dqaXQUTT9UXYzq00zb1bdK5uGEVQ== + /jest-serializer/24.9.0: + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== /jest-serializer/26.6.2: dependencies: '@types/node': 12.12.38 @@ -8634,6 +9174,26 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== + /jest-snapshot/24.9.0: + dependencies: + '@babel/types': 7.12.12 + '@jest/types': 24.9.0 + chalk: 2.4.2 + expect: 24.9.0 + jest-diff: 24.9.0 + jest-get-type: 24.9.0 + jest-matcher-utils: 24.9.0 + jest-message-util: 24.9.0 + jest-resolve: 24.9.0 + mkdirp: 0.5.5 + natural-compare: 1.4.0 + pretty-format: 24.9.0 + semver: 6.3.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew== /jest-snapshot/26.6.2: dependencies: '@babel/types': 7.12.12 @@ -8657,6 +9217,25 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og== + /jest-util/24.9.0: + dependencies: + '@jest/console': 24.9.0 + '@jest/fake-timers': 24.9.0 + '@jest/source-map': 24.9.0 + '@jest/test-result': 24.9.0 + '@jest/types': 24.9.0 + callsites: 3.1.0 + chalk: 2.4.2 + graceful-fs: 4.2.4 + is-ci: 2.0.0 + mkdirp: 0.5.5 + slash: 2.0.0 + source-map: 0.6.1 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg== /jest-util/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -8669,6 +9248,19 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== + /jest-validate/24.9.0: + dependencies: + '@jest/types': 24.9.0 + camelcase: 5.3.1 + chalk: 2.4.2 + jest-get-type: 24.9.0 + leven: 3.1.0 + pretty-format: 24.9.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ== /jest-validate/26.6.2: dependencies: '@jest/types': 26.6.2 @@ -8696,6 +9288,15 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== + /jest-worker/24.9.0: + dependencies: + merge-stream: 2.0.0 + supports-color: 6.1.0 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== /jest-worker/26.5.0: dependencies: '@types/node': 12.12.38 @@ -8754,6 +9355,37 @@ packages: hasBin: true resolution: integrity: sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw== + /jsdom/11.12.0: + dependencies: + abab: 2.0.5 + acorn: 5.7.4 + acorn-globals: 4.3.4 + array-equal: 1.0.0 + cssom: 0.3.8 + cssstyle: 1.4.0 + data-urls: 1.1.0 + domexception: 1.0.1 + escodegen: 1.14.3 + html-encoding-sniffer: 1.0.2 + left-pad: 1.3.0 + nwsapi: 2.2.0 + parse5: 4.0.0 + pn: 1.1.0 + request: 2.88.2 + request-promise-native: 1.0.9_request@2.88.2 + sax: 1.2.4 + symbol-tree: 3.2.4 + tough-cookie: 2.5.0 + w3c-hr-time: 1.0.2 + webidl-conversions: 4.0.2 + whatwg-encoding: 1.0.5 + whatwg-mimetype: 2.3.0 + whatwg-url: 6.5.0 + ws: 5.2.2 + xml-name-validator: 3.0.0 + dev: true + resolution: + integrity: sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== /jsdom/16.4.0: dependencies: abab: 2.0.5 @@ -8944,6 +9576,11 @@ packages: node: '> 0.8' resolution: integrity: sha1-eZllXoZGwX8In90YfRUNMyTVRRM= + /left-pad/1.3.0: + deprecated: use String.prototype.padStart() + dev: true + resolution: + integrity: sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== /less-loader/7.0.2_less@3.12.2+webpack@4.44.2: dependencies: klona: 2.0.4 @@ -9275,6 +9912,13 @@ packages: node: '>= 0.6.0' resolution: integrity: sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== + /loose-envify/1.4.0: + dependencies: + js-tokens: 4.0.0 + dev: true + hasBin: true + resolution: + integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== /lru-cache/5.1.1: dependencies: yallist: 3.1.1 @@ -10484,6 +11128,10 @@ packages: dev: true resolution: integrity: sha512-kXX+5S81lgESA0LsDuGjAlBybImAChYRMT+/uKCEXFBFOeEhS52qUCydGhU3qLRD8D9DVjaUo821WK7DM4iCeg== + /parse5/4.0.0: + dev: true + resolution: + integrity: sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== /parse5/5.1.1: dev: true resolution: @@ -10694,6 +11342,10 @@ packages: dev: true resolution: integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== + /pn/1.1.0: + dev: true + resolution: + integrity: sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== /pnp-webpack-plugin/1.6.4_typescript@4.0.5: dependencies: ts-pnp: 1.2.0_typescript@4.0.5 @@ -11140,6 +11792,17 @@ packages: node: '>=6' resolution: integrity: sha512-p+T744ZyjjiaFlMUZZv6YPC5JrkNj8maRmPaQCWFJFplUAzpIUTRaTcS+7wmZtUoFXHtESJb23ISliaWyz3SHA== + /pretty-format/24.9.0: + dependencies: + '@jest/types': 24.9.0 + ansi-regex: 4.1.0 + ansi-styles: 3.2.1 + react-is: 16.13.1 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== /pretty-format/25.5.0: dependencies: '@jest/types': 25.5.0 @@ -11377,6 +12040,15 @@ packages: node: '>=4' resolution: integrity: sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + /read-pkg-up/4.0.0: + dependencies: + find-up: 3.0.0 + read-pkg: 3.0.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== /read-pkg-up/5.0.0: dependencies: find-up: 3.0.0 @@ -11463,6 +12135,14 @@ packages: node: '>=8.10.0' resolution: integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + /realpath-native/1.1.0: + dependencies: + util.promisify: 1.1.1 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA== /redent/3.0.0: dependencies: indent-string: 4.0.0 @@ -11704,6 +12384,10 @@ packages: deprecated: https://github.com/lydell/resolve-url#deprecated resolution: integrity: sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + /resolve/1.1.7: + dev: true + resolution: + integrity: sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= /resolve/1.17.0: dependencies: path-parse: 1.0.6 @@ -12189,6 +12873,12 @@ packages: dev: true resolution: integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + /slash/2.0.0: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== /slash/3.0.0: engines: node: '>=8' @@ -12491,6 +13181,14 @@ packages: dev: true resolution: integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== + /stack-utils/1.0.4: + dependencies: + escape-string-regexp: 2.0.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-IPDJfugEGbfizBwBZRZ3xpccMdRyP5lqsBWXGQWimVjua/ccLCeMOAVjlc1R7LxFjo5sEDhyNIXd8mo/AiDS9w== /stack-utils/2.0.3: dependencies: escape-string-regexp: 2.0.0 @@ -12991,6 +13689,17 @@ packages: hasBin: true resolution: integrity: sha512-lJbKdfxWvjpV330U4PBZStCT9h3N9A4zZVA5Y4k9sCWXknrpdyxi1oMsRKLmQ/YDMDxSBKIh88v0SkdhdqX06w== + /test-exclude/5.2.3: + dependencies: + glob: 7.1.6 + minimatch: 3.0.4 + read-pkg-up: 4.0.0 + require-main-filename: 2.0.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== /test-exclude/6.0.0: dependencies: '@istanbuljs/schema': 0.1.2 @@ -13011,6 +13720,10 @@ packages: dev: true resolution: integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + /throat/4.1.0: + dev: true + resolution: + integrity: sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= /throat/5.0.0: dev: true resolution: @@ -13136,6 +13849,12 @@ packages: node: '>=6' resolution: integrity: sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== + /tr46/1.0.1: + dependencies: + punycode: 2.1.1 + dev: true + resolution: + integrity: sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= /tr46/2.0.2: dependencies: punycode: 2.1.1 @@ -13504,6 +14223,16 @@ packages: dev: true resolution: integrity: sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== + /util.promisify/1.1.1: + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.3 + for-each: 0.3.3 + has-symbols: 1.0.1 + object.getownpropertydescriptors: 2.1.1 + dev: true + resolution: + integrity: sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== /util/0.10.3: dependencies: inherits: 2.0.1 @@ -13636,6 +14365,10 @@ packages: defaults: 1.0.3 resolution: integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + /webidl-conversions/4.0.2: + dev: true + resolution: + integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== /webidl-conversions/5.0.0: dev: true engines: @@ -13951,6 +14684,22 @@ packages: dev: true resolution: integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + /whatwg-url/6.5.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + dev: true + resolution: + integrity: sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== + /whatwg-url/7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + dev: true + resolution: + integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== /whatwg-url/8.4.0: dependencies: lodash.sortby: 4.7.0 @@ -14057,6 +14806,14 @@ packages: /wrappy/1.0.2: resolution: integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + /write-file-atomic/2.4.1: + dependencies: + graceful-fs: 4.2.4 + imurmurhash: 0.1.4 + signal-exit: 3.0.3 + dev: true + resolution: + integrity: sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== /write-file-atomic/3.0.3: dependencies: imurmurhash: 0.1.4 @@ -14074,6 +14831,12 @@ packages: node: '>=4' resolution: integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + /ws/5.2.2: + dependencies: + async-limiter: 1.0.1 + dev: true + resolution: + integrity: sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== /ws/6.2.1: dependencies: async-limiter: 1.0.1 @@ -14289,6 +15052,7 @@ specifiers: husky: ^4.3.7 jest: 26.2.2 jest-preset-angular: 8.3.1 + jest-serial-runner: ^1.1.0 json: ^10.0.0 lint-staged: ^10.5.3 luxon: ^1.25.0 From 8ca49c2e49056f32fe61dc606f9e3996e9c58d84 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 01:51:03 +0100 Subject: [PATCH 090/113] test(angular): enable e2e test --- e2e/angular-e2e/tests/use-incremental-build.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index 66e7c54..c768cfe 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -1,7 +1,12 @@ import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; -import { copyNodeModules, ensureNxProject, runNxCommandAsync, uniq } from '@nrwl/nx-plugin/testing'; +import { + copyNodeModules, + ensureNxProject, + runNxCommandAsync, + uniq, +} from '@nrwl/nx-plugin/testing'; -describe.skip('@nxworker/angular:use-incremental-build generator e2e', () => { +describe('@nxworker/angular:use-incremental-build generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); From 9104e768c9951affba6add45c16c5b39ced6e9b2 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 01:52:29 +0100 Subject: [PATCH 091/113] style: format --- .../add-ng-packagr/add-ng-packagr.spec.ts | 7 ++- ...e-buildable-library-configurations.spec.ts | 14 ++++- .../use-incremental-build/generator.spec.ts | 7 ++- .../update-application-build-target.ts | 6 +- .../src/lib/generators/add-angular-library.ts | 7 ++- workspace.json | 58 +++++++------------ 6 files changed, 55 insertions(+), 44 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 1728bd8..9ff6c2c 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -1,4 +1,9 @@ -import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + ProjectConfiguration, + readJson, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 791233a..703fd19 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -1,10 +1,20 @@ -import { addProjectConfiguration, ProjectConfiguration, readJson, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + ProjectConfiguration, + readJson, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; import { TsconfigBaseJson } from '../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; -import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigLibProdJson } from './file-types'; +import { + AngularCompilerOptions, + BuildableLibraryPackageJson, + NgPackageJson, + TsconfigLibProdJson, +} from './file-types'; import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; describe(generateBuildableLibraryConfigurations.name, () => { diff --git a/packages/angular/src/generators/use-incremental-build/generator.spec.ts b/packages/angular/src/generators/use-incremental-build/generator.spec.ts index e8d9bf9..d27e60b 100644 --- a/packages/angular/src/generators/use-incremental-build/generator.spec.ts +++ b/packages/angular/src/generators/use-incremental-build/generator.spec.ts @@ -1,4 +1,9 @@ -import { addProjectConfiguration, ProjectConfiguration, readProjectConfiguration, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + ProjectConfiguration, + readProjectConfiguration, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import generator from './generator'; diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts index 3ba405d..3b7036e 100644 --- a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts +++ b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts @@ -1,4 +1,8 @@ -import { TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; +import { + TargetConfiguration, + Tree, + updateProjectConfiguration, +} from '@nrwl/devkit'; import { NormalizedSchema } from '../../util'; diff --git a/packages/internal/test-util/src/lib/generators/add-angular-library.ts b/packages/internal/test-util/src/lib/generators/add-angular-library.ts index 8cd44e3..9bdc09f 100644 --- a/packages/internal/test-util/src/lib/generators/add-angular-library.ts +++ b/packages/internal/test-util/src/lib/generators/add-angular-library.ts @@ -1,4 +1,9 @@ -import { addProjectConfiguration, getWorkspaceLayout, ProjectConfiguration, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + getWorkspaceLayout, + ProjectConfiguration, + Tree, +} from '@nrwl/devkit'; import * as path from 'path'; import { TsconfigBaseJson } from '../file-types'; diff --git a/workspace.json b/workspace.json index c988c59..f1eb127 100644 --- a/workspace.json +++ b/workspace.json @@ -36,16 +36,12 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": [ - "packages/angular/**/*.ts" - ] + "lintFilePatterns": ["packages/angular/**/*.ts"] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": [ - "coverage/packages/angular" - ], + "outputs": ["coverage/packages/angular"], "options": { "jestConfig": "packages/angular/jest.config.js", "passWithNoTests": true @@ -53,9 +49,7 @@ }, "build": { "executor": "@nrwl/node:package", - "outputs": [ - "{options.outputPath}" - ], + "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/packages/angular", "tsConfig": "packages/angular/tsconfig.lib.json", @@ -772,16 +766,12 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": [ - "packages/internal/e2e-util/**/*.ts" - ] + "lintFilePatterns": ["packages/internal/e2e-util/**/*.ts"] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": [ - "coverage/packages/internal/e2e-util" - ], + "outputs": ["coverage/packages/internal/e2e-util"], "options": { "jestConfig": "packages/internal/e2e-util/jest.config.js", "passWithNoTests": true @@ -789,51 +779,43 @@ } } }, - "workspace-tools": { - "projectType": "tool", - "root": "tools", - "sourceRoot": "tools", + "internal-test-util": { + "root": "packages/internal/test-util", + "sourceRoot": "packages/internal/test-util/src", + "projectType": "library", "targets": { "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": [ - "tools/**/*.ts" - ] + "lintFilePatterns": ["packages/internal/test-util/**/*.ts"] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": [ - "coverage/tools" - ], + "outputs": ["coverage/packages/internal/test-util"], "options": { - "jestConfig": "tools/jest.config.js", + "jestConfig": "packages/internal/test-util/jest.config.js", "passWithNoTests": true } } } }, - "internal-test-util": { - "root": "packages/internal/test-util", - "sourceRoot": "packages/internal/test-util/src", - "projectType": "library", + "workspace-tools": { + "projectType": "tool", + "root": "tools", + "sourceRoot": "tools", "targets": { "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": [ - "packages/internal/test-util/**/*.ts" - ] + "lintFilePatterns": ["tools/**/*.ts"] } }, "test": { "executor": "@nrwl/jest:jest", - "outputs": [ - "coverage/packages/internal/test-util" - ], + "outputs": ["coverage/tools"], "options": { - "jestConfig": "packages/internal/test-util/jest.config.js", + "jestConfig": "tools/jest.config.js", "passWithNoTests": true } } @@ -841,4 +823,4 @@ } }, "defaultProject": "angular" -} \ No newline at end of file +} From defbcef1e1da2238e1b9edc37b494aacbe2437bb Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 02:02:25 +0100 Subject: [PATCH 092/113] test(angular): fix imports --- .../add-library-build-target/add-library-build-target.spec.ts | 2 +- .../generators/add-ng-packagr/add-ng-packagr.spec.ts | 3 ++- .../generate-buildable-library-configurations.spec.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts index ff5868d..d1f0372 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts @@ -8,7 +8,7 @@ import { import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { TsconfigBaseJson } from '../../file-types'; +import { TsconfigBaseJson } from '../../../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; import { addLibraryBuildTarget } from './add-library-build-target'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 9ff6c2c..83e1bfe 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -6,7 +6,8 @@ import { } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; +import { TsconfigBaseJson } from '../../../../file-types'; +import { WorkspaceRootPackageJson } from '../../file-types'; import { addNgPackagr } from './add-ng-packagr'; describe(addNgPackagr.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 703fd19..d351e24 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -7,7 +7,7 @@ import { import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { TsconfigBaseJson } from '../../file-types'; +import { TsconfigBaseJson } from '../../../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; import { AngularCompilerOptions, From f7438867918658310248b21a0433285a619ce3d3 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 03:19:16 +0100 Subject: [PATCH 093/113] feat(angular): update build scripts --- .../tests/use-incremental-build.spec.ts | 37 ++++++++++++++++++- packages/angular/src/file-types/index.ts | 1 + .../file-types/package-json.ts | 9 +++++ .../convert-to-buildable/file-types/index.ts | 1 - .../convert-to-buildable/generator.spec.ts | 3 +- .../add-ng-packagr/add-ng-packagr.spec.ts | 6 ++- .../add-ng-packagr/add-ng-packagr.ts | 2 +- .../use-incremental-build/generator.ts | 2 + .../generators/update-build-scripts/index.ts | 1 + .../update-build-scripts.ts | 26 +++++++++++++ .../update-build-scripts/util/write-json.ts | 10 +++++ 11 files changed, 90 insertions(+), 8 deletions(-) rename packages/angular/src/{generators/convert-to-buildable => }/file-types/package-json.ts (65%) delete mode 100644 packages/angular/src/generators/convert-to-buildable/file-types/index.ts create mode 100644 packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/index.ts create mode 100644 packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts create mode 100644 packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index c768cfe..37f88b0 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -1,7 +1,13 @@ -import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; +import { + addPackages, + fixPnpmInstallInCiPipeline, + updateJsonFile, +} from '@internal/e2e-util'; +import { NxJsonConfiguration } from '@nrwl/devkit'; import { copyNodeModules, ensureNxProject, + runCommandAsync, runNxCommandAsync, uniq, } from '@nrwl/nx-plugin/testing'; @@ -16,6 +22,13 @@ describe('@nxworker/angular:use-incremental-build generator e2e', () => { ['@nrwl/angular']: '*', }, }); + updateJsonFile('nx.json', nxJson => ({ + ...nxJson, + affected: { + ...nxJson.affected, + defaultBase: 'main', + }, + })); }); beforeEach(async () => { @@ -32,7 +45,27 @@ describe('@nxworker/angular:use-incremental-build generator e2e', () => { `generate @nxworker/angular:use-incremental-build ${projectName}` ); - const result = await runNxCommandAsync(`build ${projectName} --with-deps`); + const result = await runNxCommandAsync( + `build ${projectName} --parallel --with-deps` + ); + expect(result.stdout).toContain('Running target "build" succeeded'); + }); + + it('updates the "build" script', async () => { + await runNxCommandAsync( + `generate @nxworker/angular:use-incremental-build ${projectName}` + ); + + const result = await runCommandAsync(`npm run build -- ${projectName}`); + expect(result.stdout).toContain('Running target "build" succeeded'); + }); + + it('updates the "affected:build" script', async () => { + await runNxCommandAsync( + `generate @nxworker/angular:use-incremental-build ${projectName}` + ); + + const result = await runCommandAsync(`npm run affected:build`); expect(result.stdout).toContain('Running target "build" succeeded'); }); }); diff --git a/packages/angular/src/file-types/index.ts b/packages/angular/src/file-types/index.ts index dd34348..44252ec 100644 --- a/packages/angular/src/file-types/index.ts +++ b/packages/angular/src/file-types/index.ts @@ -1 +1,2 @@ +export * from './package-json'; export * from './tsconfig-base-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/package-json.ts b/packages/angular/src/file-types/package-json.ts similarity index 65% rename from packages/angular/src/generators/convert-to-buildable/file-types/package-json.ts rename to packages/angular/src/file-types/package-json.ts index 78d71c7..5376751 100644 --- a/packages/angular/src/generators/convert-to-buildable/file-types/package-json.ts +++ b/packages/angular/src/file-types/package-json.ts @@ -2,6 +2,15 @@ * package.json configuration file in workspace root directory. */ export interface WorkspaceRootPackageJson { + /** + * Workspace scripts. + */ + readonly scripts: { + /** + * Script name mapped to local command. + */ + readonly [scriptName: string]: string; + }; /** * Package dependencies not used during runtime. */ diff --git a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts b/packages/angular/src/generators/convert-to-buildable/file-types/index.ts deleted file mode 100644 index f383d7e..0000000 --- a/packages/angular/src/generators/convert-to-buildable/file-types/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './package-json'; diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 914baaf..7a16162 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -9,8 +9,7 @@ import { import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { TsconfigBaseJson } from '../../file-types'; -import { WorkspaceRootPackageJson } from './file-types'; +import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; import generator from './generator'; describe('convert-to-buildable generator', () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 83e1bfe..51e080f 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -6,8 +6,10 @@ import { } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { TsconfigBaseJson } from '../../../../file-types'; -import { WorkspaceRootPackageJson } from '../../file-types'; +import { + TsconfigBaseJson, + WorkspaceRootPackageJson, +} from '../../../../file-types'; import { addNgPackagr } from './add-ng-packagr'; describe(addNgPackagr.name, () => { diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts index 4be51df..0ad76d2 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.ts @@ -1,6 +1,6 @@ import { readJson, Tree } from '@nrwl/devkit'; -import { WorkspaceRootPackageJson } from '../../file-types'; +import { WorkspaceRootPackageJson } from '../../../../file-types'; export function addNgPackagr(host: Tree) { const packageJsonPath = 'package.json'; diff --git a/packages/angular/src/generators/use-incremental-build/generator.ts b/packages/angular/src/generators/use-incremental-build/generator.ts index f4faec4..668dfa9 100644 --- a/packages/angular/src/generators/use-incremental-build/generator.ts +++ b/packages/angular/src/generators/use-incremental-build/generator.ts @@ -1,6 +1,7 @@ import { formatFiles, Tree } from '@nrwl/devkit'; import { updateApplicationBuildTarget } from './generators/update-application-build-target'; +import { updateBuildScripts } from './generators/update-build-scripts'; import { UseIncrementalBuildGeneratorSchema } from './schema'; import { normalizeOptions } from './util'; @@ -11,6 +12,7 @@ export default async function ( const options = normalizeOptions(host, schema); updateApplicationBuildTarget(host, options); + updateBuildScripts(host); if (!options.skipFormat) { await formatFiles(host); diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/index.ts b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/index.ts new file mode 100644 index 0000000..ea3a515 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/index.ts @@ -0,0 +1 @@ +export * from './update-build-scripts'; diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts new file mode 100644 index 0000000..11d9aab --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts @@ -0,0 +1,26 @@ +import { Tree } from '@nrwl/devkit'; + +import { WorkspaceRootPackageJson } from '../../../../file-types'; +import { writeJson } from './util/write-json'; + +export function updateBuildScripts(host: Tree): void { + const incrementalBuildCommand = 'nx build --with-deps --parallel'; + const affectedIncrementalBuildCommand = + 'nx affected:build --with-deps --parallel'; + writeJson(host, 'package.json', packageJson => ({ + ...packageJson, + scripts: { + ...packageJson.scripts, + 'affected:build': + packageJson.scripts['affected:build']?.replace( + 'nx affected:build', + affectedIncrementalBuildCommand + ) ?? affectedIncrementalBuildCommand, + build: + packageJson.scripts.build?.replace( + 'nx build', + incrementalBuildCommand + ) ?? incrementalBuildCommand, + }, + })); +} diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts new file mode 100644 index 0000000..3afc472 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts @@ -0,0 +1,10 @@ +import { readJson, Tree } from '@nrwl/devkit'; + +export function writeJson( + host: Tree, + file: string, + mapper: (json: TJson) => TJson +): void { + const json = readJson(host, file); + host.write('package.json', JSON.stringify(mapper(json), null, 2)); +} From df28559a8a5afe9ba7c9de62eed2b7bee95ef1ae Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 03:26:48 +0100 Subject: [PATCH 094/113] test(angular): fix test --- packages/angular/src/file-types/package-json.ts | 2 +- .../generators/update-build-scripts/update-build-scripts.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular/src/file-types/package-json.ts b/packages/angular/src/file-types/package-json.ts index 5376751..6011bf7 100644 --- a/packages/angular/src/file-types/package-json.ts +++ b/packages/angular/src/file-types/package-json.ts @@ -5,7 +5,7 @@ export interface WorkspaceRootPackageJson { /** * Workspace scripts. */ - readonly scripts: { + readonly scripts?: { /** * Script name mapped to local command. */ diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts index 11d9aab..39365f1 100644 --- a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts +++ b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts @@ -12,12 +12,12 @@ export function updateBuildScripts(host: Tree): void { scripts: { ...packageJson.scripts, 'affected:build': - packageJson.scripts['affected:build']?.replace( + packageJson.scripts?.['affected:build']?.replace( 'nx affected:build', affectedIncrementalBuildCommand ) ?? affectedIncrementalBuildCommand, build: - packageJson.scripts.build?.replace( + packageJson.scripts?.build?.replace( 'nx build', incrementalBuildCommand ) ?? incrementalBuildCommand, From 869b667e377985acff120be3c89098a08470f33a Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 16 Jan 2021 03:41:18 +0100 Subject: [PATCH 095/113] test(angular): fix e2e in CI pipeline --- e2e/angular-e2e/tests/use-incremental-build.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index 37f88b0..f83aeb7 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -65,7 +65,9 @@ describe('@nxworker/angular:use-incremental-build generator e2e', () => { `generate @nxworker/angular:use-incremental-build ${projectName}` ); - const result = await runCommandAsync(`npm run affected:build`); + const result = await runCommandAsync( + `npm run affected:build -- --base=remotes/origin/main` + ); expect(result.stdout).toContain('Running target "build" succeeded'); }); }); From 982ffc789747c9d7b29878a297339a4da419e09e Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 12:52:50 +0100 Subject: [PATCH 096/113] test(angular): extract useDefaultBaseBranch e2e utility --- .../tests/use-incremental-build.spec.ts | 9 ++------- packages/internal/e2e-util/src/index.ts | 1 + .../src/lib/use-default-base-branch.ts | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 packages/internal/e2e-util/src/lib/use-default-base-branch.ts diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index f83aeb7..ada66a8 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -2,6 +2,7 @@ import { addPackages, fixPnpmInstallInCiPipeline, updateJsonFile, + useDefaultBaseBranch, } from '@internal/e2e-util'; import { NxJsonConfiguration } from '@nrwl/devkit'; import { @@ -22,13 +23,7 @@ describe('@nxworker/angular:use-incremental-build generator e2e', () => { ['@nrwl/angular']: '*', }, }); - updateJsonFile('nx.json', nxJson => ({ - ...nxJson, - affected: { - ...nxJson.affected, - defaultBase: 'main', - }, - })); + useDefaultBaseBranch('main'); }); beforeEach(async () => { diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index 14c1bf6..9daaca7 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,3 +1,4 @@ export * from './lib/add-packages'; export * from './lib/fix-pnpm-install-in-ci-pipeline'; export * from './lib/update-json-file'; +export * from './lib/use-default-base-branch'; diff --git a/packages/internal/e2e-util/src/lib/use-default-base-branch.ts b/packages/internal/e2e-util/src/lib/use-default-base-branch.ts new file mode 100644 index 0000000..85a020f --- /dev/null +++ b/packages/internal/e2e-util/src/lib/use-default-base-branch.ts @@ -0,0 +1,18 @@ +import { NxJsonConfiguration } from '@nrwl/devkit'; + +import { updateJsonFile } from './update-json-file'; + +/** + * Configure the default base branch for Nx. + * + * @param defaultBaseBranch Default base branch used by nx affected commands. + */ +export function useDefaultBaseBranch(defaultBaseBranch: string): void { + updateJsonFile('nx.json', nxJson => ({ + ...nxJson, + affected: { + ...nxJson.affected, + defaultBase: defaultBaseBranch, + }, + })); +} From ecf29df0b3d89f47d3d3441cfbaee5b0659b8514 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 12:59:40 +0100 Subject: [PATCH 097/113] style: lint --- e2e/angular-e2e/tests/use-incremental-build.spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index ada66a8..2722293 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -1,10 +1,8 @@ import { addPackages, fixPnpmInstallInCiPipeline, - updateJsonFile, useDefaultBaseBranch, } from '@internal/e2e-util'; -import { NxJsonConfiguration } from '@nrwl/devkit'; import { copyNodeModules, ensureNxProject, From ae2b6e4dd9f1627aef05f48a139bc8d45dc3c09f Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:15:52 +0100 Subject: [PATCH 098/113] test(angular): refactor convert-to-buildable integration test --- .../convert-to-buildable/generator.spec.ts | 63 +++++-------------- 1 file changed, 17 insertions(+), 46 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 7a16162..40e1ff0 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -1,57 +1,28 @@ -import { - addProjectConfiguration, - ProjectConfiguration, - readJson, - readProjectConfiguration, - TargetConfiguration, - Tree, -} from '@nrwl/devkit'; +// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries +import { addAngularLibrary, createProjectName, LibraryType } from '@internal/test-util'; +import { ProjectConfiguration, readJson, readProjectConfiguration, TargetConfiguration, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { TsconfigBaseJson, WorkspaceRootPackageJson } from '../../file-types'; +import { WorkspaceRootPackageJson } from '../../file-types'; import generator from './generator'; describe('convert-to-buildable generator', () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); - projectName = 'booking-feature-flight-search'; - project = { - projectType: 'library', - root: 'libs/booking/feature-flight-search', - sourceRoot: 'libs/booking/feature-flight-search/src', - targets: { - lint: { - executor: '@nrwl/linter:eslint', - options: { - lintFilePatterns: [ - 'libs/booking/feature-flight-search/src/**/*.ts', - 'libs/booking/feature-flight-search/**/*.html', - ], - }, - }, - test: { - executor: '@nrwl/jest:jest', - outputs: ['coverage/libs/booking/feature-flight-search'], - options: { - jestConfig: 'libs/booking/feature-flight-search/jest.config.js', - passWithNoTests: true, - }, - }, - }, - }; - const tsconfigBase: TsconfigBaseJson = { - compilerOptions: { - paths: { - '@nrwl-airlines/booking/feature-flight-search': [ - path.join(project.sourceRoot ?? '', 'index.ts'), - ], - }, - }, - }; - - host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); - addProjectConfiguration(host, projectName, project); + const name = 'feature-flight-search'; + const directory = 'booking'; + projectName = createProjectName({ + directory, + name, + }); + addAngularLibrary(host, { + directory, + name, + type: LibraryType.WorkspaceLibrary, + npmScope: 'nrwl-airlines', + }); + project = readProjectConfiguration(host, projectName); }); let project: ProjectConfiguration; From d1fac46977b03bfc8a0e221f7911dfa6671a5fb0 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:22:02 +0100 Subject: [PATCH 099/113] test(angular): organize properties --- .../src/generators/convert-to-buildable/generator.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 40e1ff0..004f145 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -19,8 +19,8 @@ describe('convert-to-buildable generator', () => { addAngularLibrary(host, { directory, name, - type: LibraryType.WorkspaceLibrary, npmScope: 'nrwl-airlines', + type: LibraryType.WorkspaceLibrary, }); project = readProjectConfiguration(host, projectName); }); From 2ac57395528a4caf61ca98d7a7071de4edcfff3c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:25:57 +0100 Subject: [PATCH 100/113] test(angular): refactor unit test for addLibraryBuildTarget --- .../add-library-build-target.spec.ts | 61 +++++-------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts index d1f0372..f19685f 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts @@ -1,65 +1,34 @@ -import { - addProjectConfiguration, - ProjectConfiguration, - readProjectConfiguration, - TargetConfiguration, - Tree, -} from '@nrwl/devkit'; +// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries +import { addAngularLibrary, createProjectName, LibraryType } from '@internal/test-util'; +import { readProjectConfiguration, TargetConfiguration, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; -import { TsconfigBaseJson } from '../../../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; import { addLibraryBuildTarget } from './add-library-build-target'; describe(addLibraryBuildTarget.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); - projectName = 'seatmap-feature-seat-listing'; - importPath = `@nrwl-airlines/seatmap/feature-seat-listing`; - project = { - projectType: 'library', - root: 'libs/seatmap/feature-seat-listing', - sourceRoot: 'libs/seatmap/feature-seat-listing/src', - targets: { - lint: { - executor: '@nrwl/linter:eslint', - options: { - lintFilePatterns: [ - 'libs/seatmap/feature-seat-listing/src/**/*.ts', - 'libs/seatmap/feature-seat-listing/src/**/*.html', - ], - }, - }, - test: { - executor: '@nrwl/jest:jest', - outputs: ['coverage/libs/seatmap/feature-seat-listing'], - options: { - jestConfig: 'libs/seatmap/feature-seat-listing/jest.config.js', - passWithNoTests: true, - }, - }, - }, - }; - const tsconfigBase: TsconfigBaseJson = { - compilerOptions: { - paths: { - [importPath]: [`${project.sourceRoot}/index.ts`], - }, - }, - }; - - host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); - addProjectConfiguration(host, projectName, project); + const name = 'feature-seat-listing'; + const directory = 'seatmap'; + projectName = createProjectName({ + directory, + name, + }); + addAngularLibrary(host, { + directory, + name, + npmScope: 'nrwl-airlines', + type: LibraryType.WorkspaceLibrary, + }); options = normalizeOptions(host, { project: projectName, }); }); let host: Tree; - let importPath: string; let options: NormalizedSchema; - let project: ProjectConfiguration; let projectName: string; it('adds a build target', () => { From dc55a79b825296311e0cdd5d9cca8bfe5b0f2c6c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:28:26 +0100 Subject: [PATCH 101/113] test(angular): refactor addNgPackagr unit test --- .../add-ng-packagr/add-ng-packagr.spec.ts | 61 ++++--------------- 1 file changed, 12 insertions(+), 49 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts index 51e080f..28d9465 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-ng-packagr/add-ng-packagr.spec.ts @@ -1,62 +1,25 @@ -import { - addProjectConfiguration, - ProjectConfiguration, - readJson, - Tree, -} from '@nrwl/devkit'; +// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries +import { addAngularLibrary, LibraryType } from '@internal/test-util'; +import { readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; -import { - TsconfigBaseJson, - WorkspaceRootPackageJson, -} from '../../../../file-types'; +import { WorkspaceRootPackageJson } from '../../../../file-types'; import { addNgPackagr } from './add-ng-packagr'; describe(addNgPackagr.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); - projectName = 'shared-ui-buttons'; - importPath = `@nrwl-airlines/shared/ui-buttons`; - project = { - projectType: 'library', - root: 'libs/shared/ui-buttons', - sourceRoot: 'libs/shared/ui-buttons/src', - targets: { - lint: { - executor: '@nrwl/linter:eslint', - options: { - lintFilePatterns: [ - 'libs/shared/ui-buttons/src/**/*.ts', - 'libs/shared/ui-buttons/src/**/*.html', - ], - }, - }, - test: { - executor: '@nrwl/jest:jest', - outputs: ['coverage/libs/shared/ui-buttons'], - options: { - jestConfig: 'libs/shared/ui-buttons/jest.config.js', - passWithNoTests: true, - }, - }, - }, - }; - const tsconfigBase: TsconfigBaseJson = { - compilerOptions: { - paths: { - [importPath]: [`${project.sourceRoot}/index.ts`], - }, - }, - }; - - host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); - addProjectConfiguration(host, projectName, project); + const name = 'ui-buttons'; + const directory = 'shared'; + addAngularLibrary(host, { + directory, + name, + npmScope: 'nrwl-airlines', + type: LibraryType.WorkspaceLibrary, + }); }); let host: Tree; - let importPath: string; - let project: ProjectConfiguration; - let projectName: string; it('installs ng-packagr when not installed', async () => { await addNgPackagr(host); From f94e0062b203d581d63f20eafa20a630c6e5b713 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:42:01 +0100 Subject: [PATCH 102/113] test(angular): refactor unit test for generateBuildableLibraryConfigurations --- ...e-buildable-library-configurations.spec.ts | 93 +++++++------------ .../update-build-scripts.ts | 4 +- .../test-util/src/lib/util/normalize-path.ts | 2 +- 3 files changed, 35 insertions(+), 64 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index d351e24..e76c466 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -1,78 +1,43 @@ -import { - addProjectConfiguration, - ProjectConfiguration, - readJson, - Tree, -} from '@nrwl/devkit'; +import { addAngularLibrary, createProjectName, LibraryType } from '@internal/test-util'; +import { readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; import { TsconfigBaseJson } from '../../../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; -import { - AngularCompilerOptions, - BuildableLibraryPackageJson, - NgPackageJson, - TsconfigLibProdJson, -} from './file-types'; +import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigLibProdJson } from './file-types'; import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; describe(generateBuildableLibraryConfigurations.name, () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); - projectName = 'shared-ui-buttons'; - importPath = `@nrwl-airlines/shared/ui-buttons`; - project = { - projectType: 'library', - root: 'libs/shared/ui-buttons', - sourceRoot: 'libs/shared/ui-buttons/src', - targets: { - lint: { - executor: '@nrwl/linter:eslint', - options: { - lintFilePatterns: [ - 'libs/shared/ui-buttons/src/**/*.ts', - 'libs/shared/ui-buttons/src/**/*.html', - ], - }, - }, - test: { - executor: '@nrwl/jest:jest', - outputs: ['coverage/libs/shared/ui-buttons'], - options: { - jestConfig: 'libs/shared/ui-buttons/jest.config.js', - passWithNoTests: true, - }, - }, - }, - }; - const tsconfigBase: TsconfigBaseJson = { - compilerOptions: { - paths: { - [importPath]: [`${project.sourceRoot}/index.ts`], - }, - }, - }; - - host.write('tsconfig.base.json', JSON.stringify(tsconfigBase)); - addProjectConfiguration(host, projectName, project); + const name = 'ui-buttons'; + const directory = 'shared'; + projectName = createProjectName({ + directory, + name, + }); + addAngularLibrary(host, { + directory, + name, + npmScope: 'nrwl-airlines', + type: LibraryType.WorkspaceLibrary, + }); options = normalizeOptions(host, { project: projectName, }); }); let host: Tree; - let importPath: string; let options: NormalizedSchema; - let project: ProjectConfiguration; let projectName: string; describe('Package configurations', () => { it('generates ng-package.json', async () => { - const filePath = path.join(project.root, 'ng-package.json'); + const filePath = path.join(options.projectRoot, 'ng-package.json'); const expectedNgPackageJson: NgPackageJson = { $schema: '../../../node_modules/ng-packagr/ng-package.schema.json', - dest: `../../../dist/${project.root}`, + dest: `../../../dist/${options.projectRoot}`, lib: { entryFile: 'src/index.ts', }, @@ -86,9 +51,9 @@ describe(generateBuildableLibraryConfigurations.name, () => { }); it('generates package.json', async () => { - const filePath = path.join(project.root, 'package.json'); + const filePath = path.join(options.projectRoot, 'package.json'); const expectedPackageJson: BuildableLibraryPackageJson = { - name: importPath, + name: options.importPath, private: true, }; @@ -103,7 +68,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { }); it('generates tsconfig.lib.prod.json', async () => { - const filePath = path.join(project.root, 'tsconfig.lib.prod.json'); + const filePath = path.join(options.projectRoot, 'tsconfig.lib.prod.json'); const expectedTsconfig: TsconfigLibProdJson = { extends: './tsconfig.lib.json', compilerOptions: { @@ -123,10 +88,13 @@ describe(generateBuildableLibraryConfigurations.name, () => { it('keeps package configurations when they all exist', async () => { const testConfiguration = { test: true }; - const ngPackageJsonPath = path.join(project.root, 'ng-package.json'); - const packageJsonPath = path.join(project.root, 'package.json'); + const ngPackageJsonPath = path.join( + options.projectRoot, + 'ng-package.json' + ); + const packageJsonPath = path.join(options.projectRoot, 'package.json'); const productionTsconfigPath = path.join( - project.root, + options.projectRoot, 'tsconfig.lib.prod.json' ); host.write(ngPackageJsonPath, JSON.stringify(testConfiguration)); @@ -145,8 +113,11 @@ describe(generateBuildableLibraryConfigurations.name, () => { it('overwrites package configurations when only some of them exist', async () => { const testConfiguration = { test: true }; - const ngPackageJsonPath = path.join(project.root, 'ng-package.json'); - const packageJsonPath = path.join(project.root, 'package.json'); + const ngPackageJsonPath = path.join( + options.projectRoot, + 'ng-package.json' + ); + const packageJsonPath = path.join(options.projectRoot, 'package.json'); host.write(ngPackageJsonPath, JSON.stringify(testConfiguration)); host.write(packageJsonPath, JSON.stringify(testConfiguration)); @@ -161,7 +132,7 @@ describe(generateBuildableLibraryConfigurations.name, () => { describe('enableIvy option', () => { beforeEach(() => { - filePath = path.join(project.root, 'tsconfig.lib.prod.json'); + filePath = path.join(options.projectRoot, 'tsconfig.lib.prod.json'); }); let filePath: string; diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts index 39365f1..a134f3d 100644 --- a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts +++ b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.ts @@ -13,12 +13,12 @@ export function updateBuildScripts(host: Tree): void { ...packageJson.scripts, 'affected:build': packageJson.scripts?.['affected:build']?.replace( - 'nx affected:build', + /nx affected:build/g, affectedIncrementalBuildCommand ) ?? affectedIncrementalBuildCommand, build: packageJson.scripts?.build?.replace( - 'nx build', + /nx build/g, incrementalBuildCommand ) ?? incrementalBuildCommand, }, diff --git a/packages/internal/test-util/src/lib/util/normalize-path.ts b/packages/internal/test-util/src/lib/util/normalize-path.ts index 7024955..c2b6f15 100644 --- a/packages/internal/test-util/src/lib/util/normalize-path.ts +++ b/packages/internal/test-util/src/lib/util/normalize-path.ts @@ -1,3 +1,3 @@ export function normalizePath(path: string): string { - return path.replace('\\', '/'); + return path.replace(/\\/g, '/'); } From 3f9af47976bf9f83f4b50d22ad8f16195f0a6467 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:54:02 +0100 Subject: [PATCH 103/113] test(angular): refactor convert-to-buildable integration test, extract addAngularApplication utility --- .../use-incremental-build/generator.spec.ts | 113 ++--------------- packages/internal/test-util/src/index.ts | 1 + .../lib/generators/add-angular-application.ts | 119 ++++++++++++++++++ 3 files changed, 133 insertions(+), 100 deletions(-) create mode 100644 packages/internal/test-util/src/lib/generators/add-angular-application.ts diff --git a/packages/angular/src/generators/use-incremental-build/generator.spec.ts b/packages/angular/src/generators/use-incremental-build/generator.spec.ts index d27e60b..fce68a7 100644 --- a/packages/angular/src/generators/use-incremental-build/generator.spec.ts +++ b/packages/angular/src/generators/use-incremental-build/generator.spec.ts @@ -1,9 +1,6 @@ -import { - addProjectConfiguration, - ProjectConfiguration, - readProjectConfiguration, - Tree, -} from '@nrwl/devkit'; +// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries +import { addAngularApplication, createProjectName } from '@internal/test-util'; +import { readProjectConfiguration, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import generator from './generator'; @@ -11,102 +8,18 @@ import generator from './generator'; describe('convert-to-buildable generator', () => { beforeEach(() => { host = createTreeWithEmptyWorkspace(); - projectName = 'booking-desktop-app'; - project = { - projectType: 'application', - root: 'apps/booking/desktop-app', - sourceRoot: 'apps/booking/desktop-app/src', - // prefix: 'booking', - targets: { - build: { - executor: '@angular-devkit/build-angular:browser', - options: { - outputPath: 'dist/apps/booking/desktop-app', - index: 'apps/booking/desktop-app/src/index.html', - main: 'apps/booking/desktop-app/src/main.ts', - polyfills: 'apps/booking/desktop-app/src/polyfills.ts', - tsConfig: 'apps/booking/desktop-app/tsconfig.app.json', - aot: true, - assets: [ - 'apps/booking/desktop-app/src/favicon.ico', - 'apps/booking/desktop-app/src/assets', - ], - styles: ['apps/booking/desktop-app/src/styles.scss'], - scripts: [], - }, - configurations: { - production: { - fileReplacements: [ - { - replace: - 'apps/booking/desktop-app/src/environments/environment.ts', - with: - 'apps/booking/desktop-app/src/environments/environment.prod.ts', - }, - ], - optimization: true, - outputHashing: 'all', - sourceMap: false, - namedChunks: false, - extractLicenses: true, - vendorChunk: false, - buildOptimizer: true, - budgets: [ - { - type: 'initial', - maximumWarning: '2mb', - maximumError: '5mb', - }, - { - type: 'anyComponentStyle', - maximumWarning: '6kb', - maximumError: '10kb', - }, - ], - }, - }, - }, - serve: { - executor: '@angular-devkit/build-angular:dev-server', - options: { - browserTarget: 'booking-desktop-app:build', - }, - configurations: { - production: { - browserTarget: 'booking-desktop-app:build:production', - }, - }, - }, - 'extract-i18n': { - executor: '@angular-devkit/build-angular:extract-i18n', - options: { - browserTarget: 'booking-desktop-app:build', - }, - }, - lint: { - executor: '@nrwl/linter:eslint', - options: { - lintFilePatterns: [ - 'apps/booking/desktop-app/src/**/*.ts', - 'apps/booking/desktop-app/src/**/*.html', - ], - }, - }, - test: { - executor: '@nrwl/jest:jest', - outputs: ['coverage/apps/booking/desktop-app'], - options: { - jestConfig: 'apps/booking/desktop-app/jest.config.js', - passWithNoTests: true, - }, - }, - }, - }; - - addProjectConfiguration(host, projectName, project); + const name = 'desktop-app'; + const directory = 'booking'; + projectName = createProjectName({ + directory, + name, + }); + addAngularApplication(host, { + directory, + name, + }); }); - let project: ProjectConfiguration; let projectName: string; let host: Tree; diff --git a/packages/internal/test-util/src/index.ts b/packages/internal/test-util/src/index.ts index 604b8d5..92b332f 100644 --- a/packages/internal/test-util/src/index.ts +++ b/packages/internal/test-util/src/index.ts @@ -1,2 +1,3 @@ +export * from './lib/generators/add-angular-application'; export * from './lib/generators/add-angular-library'; export * from './lib/util/create-project-name'; diff --git a/packages/internal/test-util/src/lib/generators/add-angular-application.ts b/packages/internal/test-util/src/lib/generators/add-angular-application.ts new file mode 100644 index 0000000..caeb16e --- /dev/null +++ b/packages/internal/test-util/src/lib/generators/add-angular-application.ts @@ -0,0 +1,119 @@ +import { addProjectConfiguration, getWorkspaceLayout, ProjectConfiguration, Tree } from '@nrwl/devkit'; +import * as path from 'path'; + +import { createProjectName, normalizePath } from '../util'; + +export interface AddAngularApplicationOptions { + readonly directory?: string; + readonly name: string; +} + +export function addAngularApplication( + host: Tree, + { directory = '', name }: AddAngularApplicationOptions +): void { + const { appsDir } = getWorkspaceLayout(host); + const root = normalizePath(path.join(appsDir, directory, name)); + const sourceRoot = normalizePath(path.join(appsDir, directory, name, 'src')); + const projectName = createProjectName({ directory, name }); + const project: ProjectConfiguration = { + projectType: 'application', + root, + sourceRoot, + // prefix: 'booking', + targets: { + build: { + executor: '@angular-devkit/build-angular:browser', + options: { + outputPath: normalizePath( + path.join('dist', appsDir, directory, name) + ), + index: normalizePath(path.join(sourceRoot, 'index.html')), + main: normalizePath(path.join(sourceRoot, 'main.ts')), + polyfills: normalizePath(path.join(sourceRoot, 'polyfills.ts')), + tsConfig: normalizePath(path.join(root, 'tsconfig.app.json')), + aot: true, + assets: [ + normalizePath(path.join(sourceRoot, 'favicon.ico')), + normalizePath(path.join(sourceRoot, 'assets')), + ], + styles: [normalizePath(path.join(sourceRoot, 'styles.scss'))], + scripts: [], + }, + configurations: { + production: { + fileReplacements: [ + { + replace: normalizePath( + path.join(sourceRoot, 'environments/environment.ts') + ), + with: normalizePath( + path.join(sourceRoot, 'environments/environment.prod.ts') + ), + }, + ], + optimization: true, + outputHashing: 'all', + sourceMap: false, + namedChunks: false, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + budgets: [ + { + type: 'initial', + maximumWarning: '2mb', + maximumError: '5mb', + }, + { + type: 'anyComponentStyle', + maximumWarning: '6kb', + maximumError: '10kb', + }, + ], + }, + }, + }, + serve: { + executor: '@angular-devkit/build-angular:dev-server', + options: { + browserTarget: `${projectName}:build`, + }, + configurations: { + production: { + browserTarget: `${projectName}:build:production`, + }, + }, + }, + 'extract-i18n': { + executor: '@angular-devkit/build-angular:extract-i18n', + options: { + browserTarget: `${projectName}:build`, + }, + }, + lint: { + executor: '@nrwl/linter:eslint', + options: { + lintFilePatterns: [ + normalizePath(path.join(sourceRoot, '**/*.ts')), + normalizePath(path.join(sourceRoot, '**/*.html')), + ], + }, + }, + test: { + executor: '@nrwl/jest:jest', + outputs: [ + normalizePath(path.join('coverage', appsDir, directory, name)), + ], + options: { + jestConfig: normalizePath( + path.join(appsDir, directory, name, 'jest.config.js') + ), + passWithNoTests: true, + }, + }, + }, + }; + + addProjectConfiguration(host, projectName, project); +} From e2e8be35d7709586ba04d7b47697daed7b49a028 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:57:23 +0100 Subject: [PATCH 104/113] style: format --- .../convert-to-buildable/generator.spec.ts | 14 ++++++++++++-- .../add-library-build-target.spec.ts | 12 ++++++++++-- ...nerate-buildable-library-configurations.spec.ts | 13 +++++++++++-- .../src/lib/generators/add-angular-application.ts | 7 ++++++- 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts index 004f145..dcfb44e 100644 --- a/packages/angular/src/generators/convert-to-buildable/generator.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generator.spec.ts @@ -1,6 +1,16 @@ // eslint-disable-next-line @nrwl/nx/enforce-module-boundaries -import { addAngularLibrary, createProjectName, LibraryType } from '@internal/test-util'; -import { ProjectConfiguration, readJson, readProjectConfiguration, TargetConfiguration, Tree } from '@nrwl/devkit'; +import { + addAngularLibrary, + createProjectName, + LibraryType, +} from '@internal/test-util'; +import { + ProjectConfiguration, + readJson, + readProjectConfiguration, + TargetConfiguration, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts index f19685f..cd695c7 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/add-library-build-target/add-library-build-target.spec.ts @@ -1,6 +1,14 @@ // eslint-disable-next-line @nrwl/nx/enforce-module-boundaries -import { addAngularLibrary, createProjectName, LibraryType } from '@internal/test-util'; -import { readProjectConfiguration, TargetConfiguration, Tree } from '@nrwl/devkit'; +import { + addAngularLibrary, + createProjectName, + LibraryType, +} from '@internal/test-util'; +import { + readProjectConfiguration, + TargetConfiguration, + Tree, +} from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index e76c466..9d57e24 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -1,11 +1,20 @@ -import { addAngularLibrary, createProjectName, LibraryType } from '@internal/test-util'; +import { + addAngularLibrary, + createProjectName, + LibraryType, +} from '@internal/test-util'; import { readJson, Tree } from '@nrwl/devkit'; import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; import * as path from 'path'; import { TsconfigBaseJson } from '../../../../file-types'; import { NormalizedSchema, normalizeOptions } from '../../util'; -import { AngularCompilerOptions, BuildableLibraryPackageJson, NgPackageJson, TsconfigLibProdJson } from './file-types'; +import { + AngularCompilerOptions, + BuildableLibraryPackageJson, + NgPackageJson, + TsconfigLibProdJson, +} from './file-types'; import { generateBuildableLibraryConfigurations } from './generate-buildable-library-configurations'; describe(generateBuildableLibraryConfigurations.name, () => { diff --git a/packages/internal/test-util/src/lib/generators/add-angular-application.ts b/packages/internal/test-util/src/lib/generators/add-angular-application.ts index caeb16e..86e31fc 100644 --- a/packages/internal/test-util/src/lib/generators/add-angular-application.ts +++ b/packages/internal/test-util/src/lib/generators/add-angular-application.ts @@ -1,4 +1,9 @@ -import { addProjectConfiguration, getWorkspaceLayout, ProjectConfiguration, Tree } from '@nrwl/devkit'; +import { + addProjectConfiguration, + getWorkspaceLayout, + ProjectConfiguration, + Tree, +} from '@nrwl/devkit'; import * as path from 'path'; import { createProjectName, normalizePath } from '../util'; From 96dff41873bee2dab3cd342816772e80060b7186 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sun, 17 Jan 2021 13:58:50 +0100 Subject: [PATCH 105/113] test(angular): allow test util import in spec file --- .../generate-buildable-library-configurations.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts index 9d57e24..f055143 100644 --- a/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts +++ b/packages/angular/src/generators/convert-to-buildable/generators/generate-buildable-library-configurations/generate-buildable-library-configurations.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries import { addAngularLibrary, createProjectName, From 3cab7c2de78034fe04676e386a080c421c79960a Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 25 Jan 2021 21:39:06 +0100 Subject: [PATCH 106/113] fix(angular): use Nx beta to fix build target for buildable Angular libraries --- .../tests/convert-to-buildable.spec.ts | 6 +- .../tests/use-incremental-build.spec.ts | 18 +- package.json | 66 +- pnpm-lock.yaml | 1169 +++++++++-------- 4 files changed, 696 insertions(+), 563 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index abbf38e..bfa1e7a 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -1,4 +1,4 @@ -import { addPackages, fixPnpmInstallInCiPipeline } from '@internal/e2e-util'; +import { addPackages } from '@internal/e2e-util'; import { checkFilesExist, copyNodeModules, @@ -13,10 +13,10 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - fixPnpmInstallInCiPipeline(); + // fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { - ['@nrwl/angular']: '*', + ['@nrwl/angular']: '11.2.0-beta.1', }, }); }); diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index 2722293..b9d7c4d 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -1,24 +1,14 @@ -import { - addPackages, - fixPnpmInstallInCiPipeline, - useDefaultBaseBranch, -} from '@internal/e2e-util'; -import { - copyNodeModules, - ensureNxProject, - runCommandAsync, - runNxCommandAsync, - uniq, -} from '@nrwl/nx-plugin/testing'; +import { addPackages, useDefaultBaseBranch } from '@internal/e2e-util'; +import { copyNodeModules, ensureNxProject, runCommandAsync, runNxCommandAsync, uniq } from '@nrwl/nx-plugin/testing'; describe('@nxworker/angular:use-incremental-build generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - fixPnpmInstallInCiPipeline(); + // fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { - ['@nrwl/angular']: '*', + ['@nrwl/angular']: '11.2.0-beta.1', }, }); useDefaultBaseBranch('main'); diff --git a/package.json b/package.json index d372915..13a17f3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build": "nx run-many --target=build --configuration=production --all", "test": "nx run-many --target=test --all --parallel", "lint": "nx workspace-lint && nx run-many --target=lint --all --parallel", - "e2e": "nx run-many --target=e2e --all --parallel", + "e2e": "nx run-many --target=e2e --all --parallel --skip-nx-cache", "affected:apps": "nx affected:apps", "affected:libs": "nx affected:libs", "affected:build": "nx affected:build", @@ -36,50 +36,50 @@ "affected:ci": "pnpm affected:lint && pnpm affected:test && pnpm affected:build && pnpm affected:e2e" }, "dependencies": { - "@angular/animations": "^11.0.7", - "@angular/common": "^11.0.7", - "@angular/compiler": "^11.0.7", - "@angular/core": "^11.0.7", - "@angular/forms": "^11.0.7", - "@angular/platform-browser": "^11.0.7", - "@angular/platform-browser-dynamic": "^11.0.7", - "@angular/router": "^11.0.7", + "@angular/animations": "~11.0.0", + "@angular/common": "~11.0.0", + "@angular/compiler": "~11.0.0", + "@angular/core": "~11.0.0", + "@angular/forms": "~11.0.0", + "@angular/platform-browser": "~11.0.0", + "@angular/platform-browser-dynamic": "~11.0.0", + "@angular/router": "~11.0.0", "@ngrx/effects": "^10.1.2", "@ngrx/entity": "^10.1.2", "@ngrx/router-store": "^10.1.2", "@ngrx/store": "^10.1.2", - "@nrwl/angular": "11.1.1", + "@nrwl/angular": "11.2.0-beta.1", "luxon": "^1.25.0", - "rxjs": "~6.5.5", + "rxjs": "~6.6.3", "tslib": "^2.1.0", - "zone.js": "^0.10.3" + "zone.js": "^0.11.3" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.1100.6", + "@angular-devkit/build-angular": "~0.1100.1", "@angular-eslint/eslint-plugin": "1.0.0", "@angular-eslint/eslint-plugin-template": "1.0.0", "@angular-eslint/template-parser": "1.0.0", - "@angular/cli": "^11.0.6", - "@angular/compiler-cli": "^11.0.7", - "@angular/language-service": "^11.0.7", + "@angular/cli": "~11.0.1", + "@angular/compiler-cli": "~11.0.0", + "@angular/language-service": "~11.0.0", "@commitlint/cli": "^11.0.0", "@commitlint/config-angular": "^11.0.0", "@commitlint/config-conventional": "^11.0.0", "@ngrx/schematics": "^10.1.2", "@ngrx/store-devtools": "^10.1.2", - "@nrwl/cli": "11.1.1", - "@nrwl/cypress": "11.1.1", - "@nrwl/devkit": "11.0.20", - "@nrwl/eslint-plugin-nx": "11.1.1", - "@nrwl/jest": "11.1.1", - "@nrwl/node": "11.1.1", - "@nrwl/nx-cloud": "11.0.1", - "@nrwl/nx-plugin": "11.1.1", - "@nrwl/tao": "11.1.1", - "@nrwl/workspace": "11.1.1", + "@nrwl/cli": "11.2.0-beta.1", + "@nrwl/cypress": "11.2.0-beta.1", + "@nrwl/devkit": "11.2.0-beta.1", + "@nrwl/eslint-plugin-nx": "11.2.0-beta.1", + "@nrwl/jest": "11.2.0-beta.1", + "@nrwl/node": "11.2.0-beta.1", + "@nrwl/nx-cloud": "11.0.2", + "@nrwl/nx-plugin": "11.2.0-beta.1", + "@nrwl/tao": "11.2.0-beta.1", + "@nrwl/workspace": "11.2.0-beta.1", "@types/jest": "26.0.8", - "@types/luxon": "^1.25.0", - "@types/node": "12.12.38", + "@types/luxon": "^1.25.1", + "@types/node": "12.12.33", "@typescript-eslint/eslint-plugin": "4.3.0", "@typescript-eslint/parser": "4.3.0", "all-contributors-cli": "^6.19.0", @@ -89,18 +89,18 @@ "eslint-config-prettier": "6.0.0", "eslint-plugin-cypress": "^2.11.2", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsdoc": "^30.7.13", + "eslint-plugin-jsdoc": "^31.3.3", "eslint-plugin-prefer-arrow": "^1.2.2", "git-cz": "^4.7.6", - "husky": "^4.3.7", + "husky": "^4.3.8", "jest": "26.2.2", - "jest-preset-angular": "8.3.1", + "jest-preset-angular": "8.3.2", "jest-serial-runner": "^1.1.0", "json": "^10.0.0", "lint-staged": "^10.5.3", - "ng-packagr": "^11.0.3", + "ng-packagr": "~11.1.2", "prettier": "2.1.2", - "ts-jest": "26.4.0", + "ts-jest": "26.4.4", "ts-node": "~9.1.1", "typescript": "~4.0.5" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8296f75..e113072 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,47 +1,47 @@ dependencies: '@angular/animations': 11.0.9_@angular+core@11.0.9 - '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.5.5 + '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.6.3 '@angular/compiler': 11.0.9 - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 - '@angular/forms': 11.0.9_5ca4793bdf8f3b6352f42f806d14580c + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 + '@angular/forms': 11.0.9_58109f712dfe1a39e6d2d2dc0ca2a98b '@angular/platform-browser': 11.0.9_0d11ba2a2337edbaa2684af2277e7862 '@angular/platform-browser-dynamic': 11.0.9_8383343813cdfa803f2f916e7857b4c5 - '@angular/router': 11.0.9_5ca4793bdf8f3b6352f42f806d14580c - '@ngrx/effects': 10.1.2_566b34705c48b81bdc6e6d4de79195c5 - '@ngrx/entity': 10.1.2_566b34705c48b81bdc6e6d4de79195c5 - '@ngrx/router-store': 10.1.2_137b9eaf69d062fc259575bfc001fcf2 - '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.5.5 - '@nrwl/angular': 11.1.1_b544165f54f89853f0045af9ccb54cf8 + '@angular/router': 11.0.9_58109f712dfe1a39e6d2d2dc0ca2a98b + '@ngrx/effects': 10.1.2_c9984c2d5dfead750ae4944108f89915 + '@ngrx/entity': 10.1.2_c9984c2d5dfead750ae4944108f89915 + '@ngrx/router-store': 10.1.2_4d6084dfa1bb34253ddd107c7f0fa925 + '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.6.3 + '@nrwl/angular': 11.2.0-beta.1_d6b0abbe2edd0c42ac81d0710b1f1fa8 luxon: 1.25.0 - rxjs: 6.5.5 + rxjs: 6.6.3 tslib: 2.1.0 - zone.js: 0.10.3 + zone.js: 0.11.3 devDependencies: - '@angular-devkit/build-angular': 0.1100.6_62e88fc358bc87eaf06220bdb0536cf0 - '@angular-eslint/eslint-plugin': 1.0.0_fd68a510280f74aa31387ed2af786951 + '@angular-devkit/build-angular': 0.1100.7_9b807e5ff1efcabea2af6c05ffc64e6e + '@angular-eslint/eslint-plugin': 1.0.0_c3bc21fa3870a09a40baf546878571ad '@angular-eslint/eslint-plugin-template': 1.0.0_0361543f832fb11a9481f3c18ac13408 '@angular-eslint/template-parser': 1.0.0_1477e8f1042969ed998938df42d96062 - '@angular/cli': 11.0.6 + '@angular/cli': 11.0.7 '@angular/compiler-cli': 11.0.9_3656b9d387a5ec1e283954a14f07f018 '@angular/language-service': 11.0.9 '@commitlint/cli': 11.0.0 '@commitlint/config-angular': 11.0.0 '@commitlint/config-conventional': 11.0.0 - '@ngrx/schematics': 10.1.2_rxjs@6.5.5+zone.js@0.10.3 - '@ngrx/store-devtools': 10.1.2_@ngrx+store@10.1.2+rxjs@6.5.5 - '@nrwl/cli': 11.1.1 - '@nrwl/cypress': 11.1.1_cypress@5.6.0+typescript@4.0.5 - '@nrwl/devkit': 11.0.20 - '@nrwl/eslint-plugin-nx': 11.1.1_0a641c819e3f5e2d27a85327fbf21101 - '@nrwl/jest': 11.1.1 - '@nrwl/node': 11.1.1_typescript@4.0.5 - '@nrwl/nx-cloud': 11.0.1 - '@nrwl/nx-plugin': 11.1.1_typescript@4.0.5 - '@nrwl/tao': 11.1.1 - '@nrwl/workspace': 11.1.1_prettier@2.1.2 + '@ngrx/schematics': 10.1.2_rxjs@6.6.3+zone.js@0.11.3 + '@ngrx/store-devtools': 10.1.2_@ngrx+store@10.1.2+rxjs@6.6.3 + '@nrwl/cli': 11.2.0-beta.1 + '@nrwl/cypress': 11.2.0-beta.1_cypress@5.6.0+typescript@4.0.5 + '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/eslint-plugin-nx': 11.2.0-beta.1_0a641c819e3f5e2d27a85327fbf21101 + '@nrwl/jest': 11.2.0-beta.1 + '@nrwl/node': 11.2.0-beta.1_typescript@4.0.5 + '@nrwl/nx-cloud': 11.0.2 + '@nrwl/nx-plugin': 11.2.0-beta.1_typescript@4.0.5 + '@nrwl/tao': 11.2.0-beta.1 + '@nrwl/workspace': 11.2.0-beta.1_prettier@2.1.2 '@types/jest': 26.0.8 - '@types/luxon': 1.25.0 - '@types/node': 12.12.38 + '@types/luxon': 1.25.1 + '@types/node': 12.12.33 '@typescript-eslint/eslint-plugin': 4.3.0_0a641c819e3f5e2d27a85327fbf21101 '@typescript-eslint/parser': 4.3.0_eslint@7.10.0+typescript@4.0.5 all-contributors-cli: 6.19.0 @@ -51,38 +51,38 @@ devDependencies: eslint-config-prettier: 6.0.0_eslint@7.10.0 eslint-plugin-cypress: 2.11.2_eslint@7.10.0 eslint-plugin-import: 2.22.1_eslint@7.10.0 - eslint-plugin-jsdoc: 30.7.13_eslint@7.10.0 + eslint-plugin-jsdoc: 31.3.3_eslint@7.10.0 eslint-plugin-prefer-arrow: 1.2.2_eslint@7.10.0 git-cz: 4.7.6 - husky: 4.3.7 + husky: 4.3.8 jest: 26.2.2_ts-node@9.1.1 - jest-preset-angular: 8.3.1_c29faa133a6a4b4ab5c55a1fa06c50f9 + jest-preset-angular: 8.3.2_c29faa133a6a4b4ab5c55a1fa06c50f9 jest-serial-runner: 1.1.0 json: 10.0.0 lint-staged: 10.5.3 - ng-packagr: 11.0.3_91de3abf2c33a188d811d0c09a5700d2 + ng-packagr: 11.1.2_d5db820be2a97d193023211c377028b4 prettier: 2.1.2 - ts-jest: 26.4.0_jest@26.2.2+typescript@4.0.5 + ts-jest: 26.4.4_jest@26.2.2+typescript@4.0.5 ts-node: 9.1.1_typescript@4.0.5 typescript: 4.0.5 lockfileVersion: 5.2 packages: - /@angular-devkit/architect/0.1100.6: + /@angular-devkit/architect/0.1100.7: dependencies: - '@angular-devkit/core': 11.0.6 + '@angular-devkit/core': 11.0.7 rxjs: 6.6.3 engines: node: '>= 10.13.0' npm: '>= 6.11.0' yarn: '>= 1.13.0' resolution: - integrity: sha512-4O+cg3AimI2bNAxxdu5NrqSf4Oa8r8xL0+G2Ycd3jLoFv0h0ecJiNKEG5F6IpTprb4aexZD6pcxBJCqQ8MmzWQ== - /@angular-devkit/build-angular/0.1100.6_62e88fc358bc87eaf06220bdb0536cf0: + integrity: sha512-b2zv2yiRbdhJ7hJfZsAvGYcqgh2DVtc7gRIPo1eDPvOAKrenmZ4zo/v0PRYScrTsPzqmoCokNA5nIwufwUEnuA== + /@angular-devkit/build-angular/0.1100.7_9b807e5ff1efcabea2af6c05ffc64e6e: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/build-optimizer': 0.1100.6 - '@angular-devkit/build-webpack': 0.1100.6_e3222a4926c3b7d4c1aa5becb19e445f - '@angular-devkit/core': 11.0.6 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/build-optimizer': 0.1100.7 + '@angular-devkit/build-webpack': 0.1100.7_e3222a4926c3b7d4c1aa5becb19e445f + '@angular-devkit/core': 11.0.7 '@angular/compiler-cli': 11.0.9_3656b9d387a5ec1e283954a14f07f018 '@babel/core': 7.12.3 '@babel/generator': 7.12.1 @@ -91,13 +91,13 @@ packages: '@babel/runtime': 7.12.1 '@babel/template': 7.10.4 '@jsdevtools/coverage-istanbul-loader': 3.0.5 - '@ngtools/webpack': 11.0.6_ab33affbbb6f67462fbfb9b4d53a8b97 + '@ngtools/webpack': 11.0.7_ab33affbbb6f67462fbfb9b4d53a8b97 ansi-colors: 4.1.1 autoprefixer: 9.8.6 babel-loader: 8.1.0_427212bc1158d185e577033f19ca0757 browserslist: 4.16.1 cacache: 15.0.5 - caniuse-lite: 1.0.30001176 + caniuse-lite: 1.0.30001179 circular-dependency-plugin: 5.2.0_webpack@4.44.2 copy-webpack-plugin: 6.2.1_webpack@4.44.2 core-js: 3.6.5 @@ -115,7 +115,7 @@ packages: loader-utils: 2.0.0 mini-css-extract-plugin: 1.2.1_webpack@4.44.2 minimatch: 3.0.4 - ng-packagr: 11.0.3_91de3abf2c33a188d811d0c09a5700d2 + ng-packagr: 11.1.2_d5db820be2a97d193023211c377028b4 open: 7.3.0 ora: 5.1.0 parse5-html-rewriting-stream: 6.0.1 @@ -176,8 +176,8 @@ packages: tslint: optional: true resolution: - integrity: sha512-HcqsWiSIUxExGg3HRQScLOmF+ckVkCKolfpPcNOCCpBYxH/i8n4wDGLBP5Rtxky+0Qz+3nnAaFIpNb9p9aUmbg== - /@angular-devkit/build-optimizer/0.1100.6: + integrity: sha512-erc+AtSU46ZIX7A5dmeZ0/G/SQIbqMAGbTKZbf11GePyhT0JAAnfMQtOHMb6AaX85n4yQTg1uMo9f5+8V3lfKA== + /@angular-devkit/build-optimizer/0.1100.7: dependencies: loader-utils: 2.0.0 source-map: 0.7.3 @@ -191,11 +191,11 @@ packages: yarn: '>= 1.13.0' hasBin: true resolution: - integrity: sha512-Qkq7n6510N+nXmfZqpqpI0I6Td+b+06RRNmS7KftSNJntU1z5QYh4FggwlthZ5P0QUT92cnBQsnT8OgYqGnwbg== - /@angular-devkit/build-webpack/0.1100.6_e3222a4926c3b7d4c1aa5becb19e445f: + integrity: sha512-bHIIub0d1trVAmAX/EaNR6Zo4b7hkscewK394qYYp/w8VKQkLSAPMUbt2YTWN+erR9yyHnJ2y7tBabIui75Wdw== + /@angular-devkit/build-webpack/0.1100.7_e3222a4926c3b7d4c1aa5becb19e445f: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 rxjs: 6.6.3 webpack: 4.44.2 webpack-dev-server: 3.11.0_webpack@4.44.2 @@ -208,11 +208,11 @@ packages: webpack: ^4.6.0 webpack-dev-server: ^3.1.4 resolution: - integrity: sha512-kK0FlpYJHP25o1yzIGHQqIvO5kp+p6V5OwGpD2GGRZLlJqd3WdjY5DxnyZoX3/IofO6KsTnmm76fzTRqc62z/Q== - /@angular-devkit/build-webpack/0.1100.6_f17e7dc3686dc4072a83e169fb8b83a8: + integrity: sha512-/6Hudd1hs/GMHX4C/Qk7jueIMNg8NKFJWDEbvMPMgDzTqUIa680PTD6SNSCcY5Cz9mEpdpYCZo5N31JB7dlpOg== + /@angular-devkit/build-webpack/0.1100.7_f17e7dc3686dc4072a83e169fb8b83a8: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 rxjs: 6.6.3 webpack: 4.42.0 webpack-dev-server: 3.11.0_webpack@4.42.0 @@ -225,7 +225,7 @@ packages: webpack: ^4.6.0 webpack-dev-server: ^3.1.4 resolution: - integrity: sha512-kK0FlpYJHP25o1yzIGHQqIvO5kp+p6V5OwGpD2GGRZLlJqd3WdjY5DxnyZoX3/IofO6KsTnmm76fzTRqc62z/Q== + integrity: sha512-/6Hudd1hs/GMHX4C/Qk7jueIMNg8NKFJWDEbvMPMgDzTqUIa680PTD6SNSCcY5Cz9mEpdpYCZo5N31JB7dlpOg== /@angular-devkit/core/11.0.0: dependencies: ajv: 6.12.6 @@ -240,7 +240,7 @@ packages: yarn: '>= 1.13.0' resolution: integrity: sha512-fXZtSs3J4S12hboi3om1FA+QS0e8nuQMyzl2nkmtuhcELUFMmSrEl36dtCni5e7Svs46BUAZ5w8EazIkgGQDJg== - /@angular-devkit/core/11.0.6: + /@angular-devkit/core/11.0.7: dependencies: ajv: 6.12.6 fast-json-stable-stringify: 2.1.0 @@ -252,7 +252,7 @@ packages: npm: '>= 6.11.0' yarn: '>= 1.13.0' resolution: - integrity: sha512-nhvU5hH01r9qcexAqvIFU233treWWeW3ncs9UFYjD9Hys9sDSvqC3+bvGvl9vCG5FsyY7oDsjaVAipyUc+SFAg== + integrity: sha512-1GKnIT++YSUHpzzRx9QC0+8yOw4wy+ZpiJVDlroPSeK4FGrTCJqJKenkfRjVFRFOSrzTiJds+IU6kI4+bFbw9g== /@angular-devkit/schematics/11.0.0: dependencies: '@angular-devkit/core': 11.0.0 @@ -265,9 +265,9 @@ packages: yarn: '>= 1.13.0' resolution: integrity: sha512-oCz9E0thA5WdGDuv6biu3X5kw5/vNE4ZZOKT2sHBQMpAuuDYrDpfTYQJjXQtjfXWvmlr8L8aqDD9N4HXsE4Esw== - /@angular-devkit/schematics/11.0.6: + /@angular-devkit/schematics/11.0.7: dependencies: - '@angular-devkit/core': 11.0.6 + '@angular-devkit/core': 11.0.7 ora: 5.1.0 rxjs: 6.6.3 engines: @@ -275,7 +275,7 @@ packages: npm: '>= 6.11.0' yarn: '>= 1.13.0' resolution: - integrity: sha512-hCyu/SSSiC6dKl/NxdWctknIrBqKR6pRe7DMArWowrZX6P9oi36LpKEFnKutE8+tXjsOqQj8XMBq9L64sXZWqg== + integrity: sha512-mKkXWmSTlZYjQO4i7xUX+bG1E9h9Ke3GgGQQouA+kth06IPO+VcywLQNsui4qcyLDUjyo8CaX+44aoSXoX3Tgg== /@angular-eslint/eslint-plugin-template/1.0.0_0361543f832fb11a9481f3c18ac13408: dependencies: '@angular-eslint/template-parser': 1.0.0_1477e8f1042969ed998938df42d96062 @@ -291,12 +291,12 @@ packages: typescript: '*' resolution: integrity: sha512-+LrAypsGUaW98aoDb/ITWWDKYHYp6UcJraJU7/bih7AQOJyDs6AnpbMPLscTcxkcCP2ylmJ31pEzYz4ItNKRTQ== - /@angular-eslint/eslint-plugin/1.0.0_fd68a510280f74aa31387ed2af786951: + /@angular-eslint/eslint-plugin/1.0.0_c3bc21fa3870a09a40baf546878571ad: dependencies: '@typescript-eslint/experimental-utils': 4.3.0_eslint@7.10.0+typescript@4.0.5 eslint: 7.10.0 eslint-plugin-import: 2.22.1_eslint@7.10.0 - eslint-plugin-jsdoc: 30.7.13_eslint@7.10.0 + eslint-plugin-jsdoc: 31.3.3_eslint@7.10.0 eslint-plugin-prefer-arrow: 1.2.2_eslint@7.10.0 typescript: 4.0.5 dev: true @@ -323,20 +323,20 @@ packages: integrity: sha512-M7rj907yOoEzq10FO5BDX7Ylw24V+YfdsYfyEi/TzzQtNGxCwQhbEwXc1PAZgsQ+P1wbGFbg9mb3yFkps7/LEA== /@angular/animations/11.0.9_@angular+core@11.0.9: dependencies: - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 tslib: 2.1.0 dev: false peerDependencies: '@angular/core': 11.0.9 resolution: integrity: sha512-/KsMBUbRTqp29CNLbRIe4/8IxWxhnbUUZWqULaySnRDDW/p2m4miPcFVSp4zjrDZPqdXSibDiCyTiWmQ5PTuKA== - /@angular/cli/11.0.6: + /@angular/cli/11.0.7: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 - '@schematics/angular': 11.0.6 - '@schematics/update': 0.1100.6 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 + '@schematics/angular': 11.0.7 + '@schematics/update': 0.1100.7 '@yarnpkg/lockfile': 1.1.0 ansi-colors: 4.1.1 debug: 4.2.0 @@ -360,11 +360,11 @@ packages: hasBin: true requiresBuild: true resolution: - integrity: sha512-bwrXXyU23HjUlFl0CNCU+XMGa/enooqpMLcTAA15StVpKFHyaA4c57il/aqu+1IuB+zR6rGDzhAABuvRcHd+mQ== - /@angular/common/11.0.9_@angular+core@11.0.9+rxjs@6.5.5: + integrity: sha512-gKHfkkjduNi5OFaEKd75UKpZ7gg9h2+eVoo7ufrZda87PLP7v/XB/QoFz9zj6tTM2/IWkKhJhcsE2MLyIOTUZA== + /@angular/common/11.0.9_@angular+core@11.0.9+rxjs@6.6.3: dependencies: - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 - rxjs: 6.5.5 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 + rxjs: 6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -378,7 +378,7 @@ packages: '@babel/core': 7.12.10 '@babel/types': 7.12.12 canonical-path: 1.0.0 - chokidar: 3.5.0 + chokidar: 3.5.1 convert-source-map: 1.7.0 dependency-graph: 0.7.2 fs-extra: 4.0.2 @@ -406,34 +406,34 @@ packages: dev: false resolution: integrity: sha512-H2IfS6ciPWN0kmKhbwDuvS8ry5GcRFKfoyA/HGk+nQwCE2nAHC8VNwldbtoisO7XfRWr/uaTrh6z/vdfxsAiHw== - /@angular/core/10.2.4_rxjs@6.5.5+zone.js@0.10.3: + /@angular/core/10.2.4_rxjs@6.6.3+zone.js@0.11.3: dependencies: - rxjs: 6.5.5 + rxjs: 6.6.3 tslib: 2.1.0 - zone.js: 0.10.3 + zone.js: 0.11.3 dev: true peerDependencies: rxjs: ^6.5.3 zone.js: ~0.10.3 resolution: integrity: sha512-5xpAvmZwD9nZ8eWx10urjibqEeePGEiFXVMEn3IaJWgfdOcMmeSoioW9JUllT3w85+DlNVWbRbhz0YfE9a4jyw== - /@angular/core/11.0.9_rxjs@6.5.5+zone.js@0.10.3: + /@angular/core/11.0.9_rxjs@6.6.3+zone.js@0.11.3: dependencies: - rxjs: 6.5.5 + rxjs: 6.6.3 tslib: 2.1.0 - zone.js: 0.10.3 + zone.js: 0.11.3 dev: false peerDependencies: rxjs: ^6.5.3 zone.js: ~0.10.3 resolution: integrity: sha512-J0ff3UK2Cw7Z0eNLtUXrpMFvmmkvPPZWLYIwimyc1pZys7qsIVT6cy2ybGEOhbJgC6qt3fo0DoJV3pGXTalb8A== - /@angular/forms/11.0.9_5ca4793bdf8f3b6352f42f806d14580c: + /@angular/forms/11.0.9_58109f712dfe1a39e6d2d2dc0ca2a98b: dependencies: - '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.5.5 - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 + '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.6.3 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 '@angular/platform-browser': 11.0.9_0d11ba2a2337edbaa2684af2277e7862 - rxjs: 6.5.5 + rxjs: 6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -449,9 +449,9 @@ packages: integrity: sha512-wmt/siAwHUMNIXeu4OCW3z6JtP/VoJLkiQXDfSnetuCfHwy401b72L4h+TWiX3x2ZLzeYwmi0sbqMb5UCctrIw== /@angular/platform-browser-dynamic/11.0.9_8383343813cdfa803f2f916e7857b4c5: dependencies: - '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.5.5 + '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.6.3 '@angular/compiler': 11.0.9 - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 '@angular/platform-browser': 11.0.9_0d11ba2a2337edbaa2684af2277e7862 tslib: 2.1.0 dev: false @@ -465,8 +465,8 @@ packages: /@angular/platform-browser/11.0.9_0d11ba2a2337edbaa2684af2277e7862: dependencies: '@angular/animations': 11.0.9_@angular+core@11.0.9 - '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.5.5 - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 + '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.6.3 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 tslib: 2.1.0 dev: false peerDependencies: @@ -478,12 +478,12 @@ packages: optional: true resolution: integrity: sha512-snuq8SaIRuVDYJLy80kYCEuVITZZbtG3PvxamATvzpgYpAzBskToc4/7LKJk0IEVSMvKzi8eSBCDaK2f2ZJB3A== - /@angular/router/11.0.9_5ca4793bdf8f3b6352f42f806d14580c: + /@angular/router/11.0.9_58109f712dfe1a39e6d2d2dc0ca2a98b: dependencies: - '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.5.5 - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 + '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.6.3 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 '@angular/platform-browser': 11.0.9_0d11ba2a2337edbaa2684af2277e7862 - rxjs: 6.5.5 + rxjs: 6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -525,11 +525,11 @@ packages: /@babel/core/7.12.3: dependencies: '@babel/code-frame': 7.12.11 - '@babel/generator': 7.12.1 + '@babel/generator': 7.12.11 '@babel/helper-module-transforms': 7.12.1 '@babel/helpers': 7.12.5 '@babel/parser': 7.12.11 - '@babel/template': 7.10.4 + '@babel/template': 7.12.7 '@babel/traverse': 7.12.12 '@babel/types': 7.12.12 convert-source-map: 1.7.0 @@ -1964,7 +1964,7 @@ packages: '@babel/plugin-transform-unicode-regex': 7.12.1_@babel+core@7.12.10 '@babel/preset-modules': 0.1.4_@babel+core@7.12.10 '@babel/types': 7.12.12 - core-js-compat: 3.8.2 + core-js-compat: 3.8.3 semver: 5.7.1 optional: true peerDependencies: @@ -2038,7 +2038,7 @@ packages: '@babel/plugin-transform-unicode-regex': 7.12.1_@babel+core@7.12.3 '@babel/preset-modules': 0.1.4_@babel+core@7.12.3 '@babel/types': 7.12.12 - core-js-compat: 3.8.2 + core-js-compat: 3.8.3 semver: 5.7.1 dev: true peerDependencies: @@ -2073,7 +2073,7 @@ packages: integrity: sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== /@babel/runtime-corejs3/7.12.5: dependencies: - core-js-pure: 3.8.2 + core-js-pure: 3.8.3 regenerator-runtime: 0.13.7 dev: true resolution: @@ -2081,12 +2081,12 @@ packages: /@babel/runtime/7.12.1: dependencies: regenerator-runtime: 0.13.7 + dev: true resolution: integrity: sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA== /@babel/runtime/7.12.5: dependencies: regenerator-runtime: 0.13.7 - dev: true resolution: integrity: sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== /@babel/template/7.10.4: @@ -2146,7 +2146,7 @@ packages: '@commitlint/load': 11.0.0 '@commitlint/read': 11.0.0 chalk: 4.1.0 - core-js: 3.8.2 + core-js: 3.8.3 get-stdin: 8.0.0 lodash: 4.17.20 resolve-from: 5.0.0 @@ -2256,7 +2256,7 @@ packages: /@commitlint/read/11.0.0: dependencies: '@commitlint/top-level': 11.0.0 - fs-extra: 9.0.1 + fs-extra: 9.1.0 git-raw-commits: 2.0.9 dev: true engines: @@ -2410,7 +2410,7 @@ packages: /@jest/console/26.6.2: dependencies: '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 chalk: 4.1.0 jest-message-util: 26.6.2 jest-util: 26.6.2 @@ -2427,7 +2427,7 @@ packages: '@jest/test-result': 26.6.2 '@jest/transform': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 ansi-escapes: 4.3.1 chalk: 4.1.0 exit: 0.1.2 @@ -2472,7 +2472,7 @@ packages: dependencies: '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 jest-mock: 26.6.2 dev: true engines: @@ -2493,7 +2493,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@sinonjs/fake-timers': 6.0.1 - '@types/node': 12.12.38 + '@types/node': 12.19.15 jest-message-util: 26.6.2 jest-mock: 26.6.2 jest-util: 26.6.2 @@ -2681,7 +2681,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.3 '@types/istanbul-reports': 3.0.0 - '@types/node': 12.12.38 + '@types/node': 12.19.15 '@types/yargs': 15.0.12 chalk: 4.1.0 engines: @@ -2698,11 +2698,11 @@ packages: dev: true resolution: integrity: sha512-EUCPEkaRPvmHjWAAZkWMT7JDzpw7FKB00WTISaiXsbNOd5hCHg77XLA8sLYLFDo1zepYLo2w7GstN8YBqRXZfA== - /@ngrx/effects/10.1.2_566b34705c48b81bdc6e6d4de79195c5: + /@ngrx/effects/10.1.2_c9984c2d5dfead750ae4944108f89915: dependencies: - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 - '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.5.5 - rxjs: 6.5.5 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 + '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.6.3 + rxjs: 6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -2711,11 +2711,11 @@ packages: rxjs: ^6.5.3 resolution: integrity: sha512-6pX6FEzLlqdbtFVMbCvscsaL6QC/L95e72JKj76Xz+8V77UTlpVsxWyMo7YU9pM4EXNpBGmOpMs2xKjfBfK05Q== - /@ngrx/entity/10.1.2_566b34705c48b81bdc6e6d4de79195c5: + /@ngrx/entity/10.1.2_c9984c2d5dfead750ae4944108f89915: dependencies: - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 - '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.5.5 - rxjs: 6.5.5 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 + '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.6.3 + rxjs: 6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -2724,13 +2724,13 @@ packages: rxjs: ^6.5.3 resolution: integrity: sha512-peit/zjLUxl8zQgNuPlPXDf4FmNZYMMNGsKQHiFpShIpWjLFTnR1wCeeLw8LMrqSy9vxLO3JpXwkDFZb8a+FDg== - /@ngrx/router-store/10.1.2_137b9eaf69d062fc259575bfc001fcf2: + /@ngrx/router-store/10.1.2_4d6084dfa1bb34253ddd107c7f0fa925: dependencies: - '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.5.5 - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 - '@angular/router': 11.0.9_5ca4793bdf8f3b6352f42f806d14580c - '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.5.5 - rxjs: 6.5.5 + '@angular/common': 11.0.9_@angular+core@11.0.9+rxjs@6.6.3 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 + '@angular/router': 11.0.9_58109f712dfe1a39e6d2d2dc0ca2a98b + '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.6.3 + rxjs: 6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -2741,19 +2741,19 @@ packages: rxjs: ^6.5.3 resolution: integrity: sha512-IBsZee5ZUmLbXkY/O4OjhJP1Q6mdu4lcLcQ9jeXsdCMH/Vvc0EGK+MlhsZrxv5+v2ZXb1bhtKsLBUsTovanLWA== - /@ngrx/schematics/10.1.2_rxjs@6.5.5+zone.js@0.10.3: + /@ngrx/schematics/10.1.2_rxjs@6.6.3+zone.js@0.11.3: dependencies: - '@angular/core': 10.2.4_rxjs@6.5.5+zone.js@0.10.3 + '@angular/core': 10.2.4_rxjs@6.6.3+zone.js@0.11.3 dev: true peerDependencies: rxjs: '*' zone.js: '*' resolution: integrity: sha512-N53YObCnZoBIHWuCiQSfY3r8M/T0lGkzApLoaGTSNUHbyTBYevpjpUpvANE+Pb4F6Jh/7EEZBsmXBYKcPD2BtA== - /@ngrx/store-devtools/10.1.2_@ngrx+store@10.1.2+rxjs@6.5.5: + /@ngrx/store-devtools/10.1.2_@ngrx+store@10.1.2+rxjs@6.6.3: dependencies: - '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.5.5 - rxjs: 6.5.5 + '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.6.3 + rxjs: 6.6.3 tslib: 2.1.0 dev: true peerDependencies: @@ -2761,10 +2761,10 @@ packages: rxjs: ^6.5.3 resolution: integrity: sha512-HE681GuZ+lRgSXpgt7y7LKzsfu/+Tgy9yPZpaitvkhg+eCIjnN5Uvs1rWqETHYWnsKliW25yoqFUAVw+xb7hug== - /@ngrx/store/10.1.2_@angular+core@11.0.9+rxjs@6.5.5: + /@ngrx/store/10.1.2_@angular+core@11.0.9+rxjs@6.6.3: dependencies: - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 - rxjs: 6.5.5 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 + rxjs: 6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -2772,9 +2772,9 @@ packages: rxjs: ^6.5.3 resolution: integrity: sha512-FUjN786ch4Qt9WgJ78ef7Yquq3mPCekgcWgZrs4ycZw1f+KdfTHLTk1bGDtO8A8CzOya5yTT7KhxbdVjbOS5ng== - /@ngtools/webpack/11.0.6_ab33affbbb6f67462fbfb9b4d53a8b97: + /@ngtools/webpack/11.0.7_ab33affbbb6f67462fbfb9b4d53a8b97: dependencies: - '@angular-devkit/core': 11.0.6 + '@angular-devkit/core': 11.0.7 '@angular/compiler-cli': 11.0.9_3656b9d387a5ec1e283954a14f07f018 enhanced-resolve: 5.3.1 typescript: 4.0.5 @@ -2790,7 +2790,7 @@ packages: typescript: ~4.0.0 webpack: ^4.0.0 resolution: - integrity: sha512-vf5YNEpXWRa0fKC/BRq5sVVj2WnEqW8jn14YQRHwVt5ppUeyu8IKUF69p6W1MwZMgMqMaw/vPQ8LI5cFbyf3uw== + integrity: sha512-OWGiiDc7s4T53BBCY8tLkLUjgw44HrixW8Wh8e4thFH1eIUM0NHe087s/B5hDNu72W/GqK4IoBbhNQ2wiCR7qQ== /@nodelib/fs.scandir/2.1.4: dependencies: '@nodelib/fs.stat': 2.0.4 @@ -2815,23 +2815,24 @@ packages: node: '>= 8' resolution: integrity: sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== - /@npmcli/move-file/1.0.1: + /@npmcli/move-file/1.1.0: dependencies: mkdirp: 1.0.4 + rimraf: 2.7.1 dev: true engines: node: '>=10' resolution: - integrity: sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw== - /@nrwl/angular/11.1.1_b544165f54f89853f0045af9ccb54cf8: + integrity: sha512-Iv2iq0JuyYjKeFkSR4LPaCdDZwlGK9X2cP/01nJcp3yMJ1FjNd9vpiEYvLUgzBxKPg2SFmaOhizoQsPc0LWeOQ== + /@nrwl/angular/11.2.0-beta.1_d6b0abbe2edd0c42ac81d0710b1f1fa8: dependencies: - '@angular-devkit/schematics': 11.0.6 - '@nrwl/cypress': 11.1.1_cypress@5.6.0+typescript@4.0.5 - '@nrwl/devkit': 11.1.1 - '@nrwl/jest': 11.1.1 - '@nrwl/linter': 11.1.1 - '@schematics/angular': 11.0.6 - jasmine-marbles: 0.6.0_rxjs@6.5.5 + '@angular-devkit/schematics': 11.0.7 + '@nrwl/cypress': 11.2.0-beta.1_cypress@5.6.0+typescript@4.0.5 + '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/jest': 11.2.0-beta.1 + '@nrwl/linter': 11.2.0-beta.1 + '@schematics/angular': 11.0.7 + jasmine-marbles: 0.6.0_rxjs@6.6.3 tslib: 2.1.0 dev: false peerDependencies: @@ -2839,10 +2840,10 @@ packages: rxjs: '*' typescript: '*' resolution: - integrity: sha512-zVR4Vp8z/o51Q/DK3TFZhG8kXtAyYQQ+dABSN+nVcc8Kmwjle7FJuvM3XH1lvGnQKvsklXlXGtoyXaRMWPvcNQ== - /@nrwl/cli/11.1.1: + integrity: sha512-1SXxxpM/krNHTC9aoaGfSlDstGSKMzAUAQ2C/gDMpz5tKDYf7Qh5J8ySI7N5A5QhDdVYDxTNMnjGgETaKV4rOw== + /@nrwl/cli/11.2.0-beta.1: dependencies: - '@nrwl/tao': 11.1.1 + '@nrwl/tao': 11.2.0-beta.1 chalk: 4.1.0 tmp: 0.0.33 yargs: 15.4.1 @@ -2850,18 +2851,18 @@ packages: dev: true hasBin: true resolution: - integrity: sha512-d1m7+V4gOE8ZbqDFk+eHgiJno0IRLeu02K46jRFeiiDuaEvkxQ5iQxawoqiJsXbEhMA7GDaGTBAdaGSar+CnVw== - /@nrwl/cypress/11.1.1_cypress@5.6.0+typescript@4.0.5: + integrity: sha512-nH7iFHSEfG+laCjfuS30npFMA4/TyDN6Z9I4uKL7YeM2MIVQx/pw+2P+VVwDCbVK5bJTX6bkkOlYMlsmXXNQUQ== + /@nrwl/cypress/11.2.0-beta.1_cypress@5.6.0+typescript@4.0.5: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 '@cypress/webpack-preprocessor': 4.1.5 - '@nrwl/devkit': 11.1.1 + '@nrwl/devkit': 11.2.0-beta.1 cypress: 5.6.0 fork-ts-checker-webpack-plugin: 3.1.1 fs-extra: 7.0.1 - rxjs: 6.5.5 + rxjs: 6.6.3 tree-kill: 1.2.2 ts-loader: 5.4.5_typescript@4.0.5 tsconfig-paths-webpack-plugin: 3.2.0 @@ -2872,28 +2873,21 @@ packages: cypress: '>= 3 < 7' typescript: '*' resolution: - integrity: sha512-vunmvJRqLLvMCbhZbNcUGnC7GURJ1NSb3Q9UK5CcVmRQ0YIeoaYmpRIGhvAg3dj5hA7r+a9BByaPb9cWrMfACg== - /@nrwl/devkit/11.0.20: + integrity: sha512-0jTyCAqBmYDq1SiPp54mh9r9JleiPXYhwecF/34fNFzog3dwb+EI80XNUZvKI1vaEEkt6Fr3IrEe2m0gLnsJzA== + /@nrwl/devkit/11.2.0-beta.1: dependencies: - '@nrwl/tao': 11.0.20 - ejs: 3.1.5 - strip-json-comments: 2.0.1 - tslib: 2.1.0 - dev: true - resolution: - integrity: sha512-enhdAZeC96ZQad9lciNtm7CGNjI8PUNme4J5/y2ZlGMShrqDaijag9yktVVkErfdizaXL4o2Rny7UFXSXdElEw== - /@nrwl/devkit/11.1.1: - dependencies: - '@nrwl/tao': 11.1.1 + '@nrwl/tao': 11.2.0-beta.1 ejs: 3.1.5 + ignore: 5.1.8 + semver: 6.3.0 strip-json-comments: 2.0.1 tslib: 2.1.0 resolution: - integrity: sha512-Twu++BN5dFpQSER6+z3vBznTqrofH5geERDbtM1cl7U9D26tdYFM+eNzk3ma03PVCMBEVZymWqmFtewr869uNw== - /@nrwl/eslint-plugin-nx/11.1.1_0a641c819e3f5e2d27a85327fbf21101: + integrity: sha512-uvGofzQLgEr975ZY3QpNg71Ja/+NSV+WPIZNWuBPTGTugBln73uRIWRdAfjDPl0BNvelA1CJboiqBaTibuWkHQ== + /@nrwl/eslint-plugin-nx/11.2.0-beta.1_0a641c819e3f5e2d27a85327fbf21101: dependencies: - '@angular-devkit/core': 11.0.6 - '@typescript-eslint/experimental-utils': 4.13.0_eslint@7.10.0+typescript@4.0.5 + '@angular-devkit/core': 11.0.7 + '@typescript-eslint/experimental-utils': 4.14.1_eslint@7.10.0+typescript@4.0.5 '@typescript-eslint/parser': 4.3.0_eslint@7.10.0+typescript@4.0.5 confusing-browser-globals: 1.0.10 dev: true @@ -2902,43 +2896,44 @@ packages: eslint: '*' typescript: '*' resolution: - integrity: sha512-tPCgkhdl0VABsMJJMGtjVxtRfowmcTBhFevfgwbzuJpOCrXCreyGY6GiTdXrVBJwRjfx9L8wneC/cTedl6umhA== - /@nrwl/jest/11.1.1: + integrity: sha512-uJTvkAFnOLRjjVjHB8ZL9TFsbxmoyKmT37HnmCtlv0cLvSwp7WRhBXp8Z13sUGMa5ytcKbTloZ90sHCrYwCcaQ== + /@nrwl/jest/11.2.0-beta.1: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 - '@nrwl/devkit': 11.1.1 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 + '@nrwl/devkit': 11.2.0-beta.1 jest-resolve: 26.6.2 - rxjs: 6.5.5 + rxjs: 6.6.3 strip-json-comments: 2.0.1 tslib: 2.1.0 resolution: - integrity: sha512-QWBlbuODdPUb4332XSKnWONsewah4jRHPfTcD2lr2LtzBdvc3b7h7q4NmpHtkiWtU9srRhcwgZiPjI46FrDS1w== - /@nrwl/linter/11.1.1: + integrity: sha512-yPzUoYMCBIVU6+qivJhR17w+rm0ESFdCaPN1rJsa7RXXq0yLTIkW22F9aStLPrBpaG2ScwZ8yWkpJnHK0cy1AA== + /@nrwl/linter/11.2.0-beta.1: dependencies: - '@angular-devkit/architect': 0.1100.6 + '@angular-devkit/architect': 0.1100.7 + '@nrwl/devkit': 11.2.0-beta.1 glob: 7.1.4 minimatch: 3.0.4 tslib: 2.1.0 resolution: - integrity: sha512-T1LgglzcPuZlgpFFYANVO2uYjWOcThpiUbRLVfehgD7W14Xey46wP3H3AVtfoCYcW+WMfwLUJ/1jqDmyEjdr8g== - /@nrwl/node/11.1.1_typescript@4.0.5: + integrity: sha512-5FQa+vo5UyWa0U04etr+r3ICcWd6beauTTwNO0N8GgFs7QjN5n8wZ5+DIHKkUM1XloaM7iMtN5STatDPlVGb4g== + /@nrwl/node/11.2.0-beta.1_typescript@4.0.5: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/build-webpack': 0.1100.6_f17e7dc3686dc4072a83e169fb8b83a8 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 - '@nrwl/devkit': 11.1.1 - '@nrwl/jest': 11.1.1 - '@nrwl/linter': 11.1.1 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/build-webpack': 0.1100.7_f17e7dc3686dc4072a83e169fb8b83a8 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 + '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/jest': 11.2.0-beta.1 + '@nrwl/linter': 11.2.0-beta.1 circular-dependency-plugin: 5.2.0_webpack@4.42.0 copy-webpack-plugin: 6.0.3_webpack@4.42.0 fork-ts-checker-webpack-plugin: 3.1.1 fs-extra: 7.0.1 glob: 7.1.4 license-webpack-plugin: 2.1.2 - rxjs: 6.5.5 + rxjs: 6.6.3 source-map-support: 0.5.16 tree-kill: 1.2.2 ts-loader: 5.4.5_typescript@4.0.5 @@ -2952,8 +2947,8 @@ packages: peerDependencies: typescript: '*' resolution: - integrity: sha512-YKUX7M5qx12XSHDJgdnQt9xrp+gPsqX2pLeqH0OIUB03nRREl0it8TPtSO1ivNfCvYFIxrRSBlhm4Bahdc3x9w== - /@nrwl/nx-cloud/11.0.1: + integrity: sha512-tGSNaf82Fjg2g0willju2CHQIwz26ismm24uwR+bPOhahIEbbX6BIgP9z8GPmZwoYrQPHHmOWGR4fkPG4A3A5w== + /@nrwl/nx-cloud/11.0.2: dependencies: '@angular-devkit/schematics': 11.0.0 axios: 0.21.1 @@ -2964,18 +2959,18 @@ packages: uuid: 3.4.0 dev: true resolution: - integrity: sha512-GP0AOIDhkG3HO708BQeOgAX0c2JX8TZjmTjLElTryVxpM48vra4I9jJXZhorgmo7ap+QzYugcYx6wtGw9PTfqA== - /@nrwl/nx-plugin/11.1.1_typescript@4.0.5: + integrity: sha512-3X/mGGVPN//8ZZw+HqRdMbQcwQF0wwamq0cl5fmwtXmzsxNgAunaU3wGVsK5JXcbGxkQqKWu/0k+pyGjUaKrAA== + /@nrwl/nx-plugin/11.2.0-beta.1_typescript@4.0.5: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 - '@nrwl/devkit': 11.1.1 - '@nrwl/linter': 11.1.1 - '@nrwl/node': 11.1.1_typescript@4.0.5 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 + '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/linter': 11.2.0-beta.1 + '@nrwl/node': 11.2.0-beta.1_typescript@4.0.5 fs-extra: 7.0.1 inquirer: 6.5.2 - rxjs: 6.5.5 + rxjs: 6.6.3 tmp: 0.0.33 tslib: 2.1.0 yargs: 15.4.1 @@ -2983,36 +2978,18 @@ packages: peerDependencies: typescript: '*' resolution: - integrity: sha512-OZGOdFdSHp+Sw/CbPeFBgxPAfq+9bX1iqrFoK0aJGEN05evLSVJvUR6+zr+IHXVWmy0Yf+bpxmsOw0X2VKXfKQ== - /@nrwl/tao/11.0.20: + integrity: sha512-W3wkldLuxrW4/Z/DQb+57CKHWujyQU5WwXFvO/yldKe6MhIfTeb7Pzuf6D3p6HA2BHiA2WsdlRS7Zl7hOnw6uw== + /@nrwl/tao/11.2.0-beta.1: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 chalk: 4.1.0 fs-extra: 7.0.1 inquirer: 6.5.2 minimist: 1.2.5 rxjs: 6.6.3 - semver: 6.3.0 - strip-json-comments: 2.0.1 - tmp: 0.0.33 - tslib: 2.1.0 - yargs-parser: 20.0.0 - dev: true - hasBin: true - resolution: - integrity: sha512-S/jaeenZ0ueQZgz54AGhMtK1Obs6KTwsojfHdB+FiEve2ipBbKKeBZXXfeXlH2priH5ej5FhosCEV1DKqXLlUg== - /@nrwl/tao/11.1.1: - dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 - chalk: 4.1.0 - fs-extra: 7.0.1 - inquirer: 6.5.2 - minimist: 1.2.5 - rxjs: 6.5.5 + rxjs-for-await: 0.0.2_rxjs@6.6.3 semver: 6.3.0 strip-json-comments: 2.0.1 tmp: 0.0.33 @@ -3020,14 +2997,16 @@ packages: yargs-parser: 20.0.0 hasBin: true resolution: - integrity: sha512-cSGCaOV0sHkZ+PkvJK2IILDD4IuIOegq8qOBKwC+kxvfDEBgB528L14CoQwmVkpq5IrGdCLi/zr2h6W5N/6RpA== - /@nrwl/workspace/11.1.1_prettier@2.1.2: + integrity: sha512-2Dszk3SzIW6qCX79fBn9P3Iq5m8WrGXkxok3jt7ZBU+lm+dmHVTJ+0nOKJLvV+gOsYubRKexFx1C8hy0Ufd2pA== + /@nrwl/workspace/11.2.0-beta.1_prettier@2.1.2: dependencies: - '@angular-devkit/architect': 0.1100.6 - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 - '@nrwl/cli': 11.1.1 - '@nrwl/devkit': 11.1.1 + '@angular-devkit/architect': 0.1100.7 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 + '@nrwl/cli': 11.2.0-beta.1 + '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/jest': 11.2.0-beta.1 + '@nrwl/linter': 11.2.0-beta.1 axios: 0.21.1 chalk: 4.1.0 cosmiconfig: 4.0.0 @@ -3042,7 +3021,7 @@ packages: opn: 5.5.0 prettier: 2.1.2 resolve: 1.17.0 - rxjs: 6.5.5 + rxjs: 6.6.3 semver: 6.3.0 strip-json-comments: 2.0.1 tmp: 0.0.33 @@ -3053,55 +3032,55 @@ packages: peerDependencies: prettier: ^2.0.4 resolution: - integrity: sha512-A3qrdHQQsGW3zmbcQnefrzm0CzHTNtkey04Fw8qWX+dSzjvLGkqc2jcYEdTnDrPMPYrTvgBT38WOdOAcuMIkwQ== - /@rollup/plugin-commonjs/15.1.0_rollup@2.32.1: + integrity: sha512-LYHk1GHp0IlCjIfzUf2S7YBhPaSGpKE9mvUIfet2XMqj33yatFJ90HemdQEFHdEEhnTK/q1cjG/6L+nE8JJH5A== + /@rollup/plugin-commonjs/17.0.0_rollup@2.38.0: dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.32.1 + '@rollup/pluginutils': 3.1.0_rollup@2.38.0 commondir: 1.0.1 estree-walker: 2.0.2 glob: 7.1.6 is-reference: 1.2.1 magic-string: 0.25.7 resolve: 1.19.0 - rollup: 2.32.1 + rollup: 2.38.0 dev: true engines: node: '>= 8.0.0' peerDependencies: - rollup: ^2.22.0 + rollup: ^2.30.0 resolution: - integrity: sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ== - /@rollup/plugin-json/4.1.0_rollup@2.32.1: + integrity: sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA== + /@rollup/plugin-json/4.1.0_rollup@2.38.0: dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.32.1 - rollup: 2.32.1 + '@rollup/pluginutils': 3.1.0_rollup@2.38.0 + rollup: 2.38.0 dev: true peerDependencies: rollup: ^1.20.0 || ^2.0.0 resolution: integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== - /@rollup/plugin-node-resolve/10.0.0_rollup@2.32.1: + /@rollup/plugin-node-resolve/11.1.0_rollup@2.38.0: dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.32.1 + '@rollup/pluginutils': 3.1.0_rollup@2.38.0 '@types/resolve': 1.17.1 builtin-modules: 3.2.0 deepmerge: 4.2.2 is-module: 1.0.0 resolve: 1.19.0 - rollup: 2.32.1 + rollup: 2.38.0 dev: true engines: node: '>= 10.0.0' peerDependencies: rollup: ^1.20.0||^2.0.0 resolution: - integrity: sha512-sNijGta8fqzwA1VwUEtTvWCx2E7qC70NMsDh4ZG13byAXYigBNZMxALhKUSycBks5gupJdq0lFrKumFrRZ8H3A== - /@rollup/pluginutils/3.1.0_rollup@2.32.1: + integrity: sha512-ouBBppRdWJKCllDXGzJ7ZIkYbaq+5TmyP0smt1vdJCFfoZhLi31vhpmjLhyo8lreHf4RoeSNllaWrvSqHpHRog== + /@rollup/pluginutils/3.1.0_rollup@2.38.0: dependencies: '@types/estree': 0.0.39 estree-walker: 1.0.1 picomatch: 2.2.2 - rollup: 2.32.1 + rollup: 2.38.0 dev: true engines: node: '>= 8.0.0' @@ -3126,21 +3105,21 @@ packages: optional: true resolution: integrity: sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ== - /@schematics/angular/11.0.6: + /@schematics/angular/11.0.7: dependencies: - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 jsonc-parser: 2.3.1 engines: node: '>= 10.13.0' npm: '>= 6.11.0' yarn: '>= 1.13.0' resolution: - integrity: sha512-XUcpOrlcp55PBHrgpIVx69lnhDY6ro35BSRmqNmjXik56qcOkfvdki8vvyW9EsWvu9/sfBSsVDdparlbVois7w== - /@schematics/update/0.1100.6: + integrity: sha512-h8ZmHJvMcvre3rzaDBu1b5RxaaBe008kcniFNeks5nHTQRqDL/5Thg4YhIgH9VQ9Yf8U4atLjRJK5PG1OzmgDA== + /@schematics/update/0.1100.7: dependencies: - '@angular-devkit/core': 11.0.6 - '@angular-devkit/schematics': 11.0.6 + '@angular-devkit/core': 11.0.7 + '@angular-devkit/schematics': 11.0.7 '@yarnpkg/lockfile': 1.1.0 ini: 1.3.6 npm-package-arg: 8.1.0 @@ -3153,7 +3132,7 @@ packages: npm: '>= 6.11.0' yarn: '>= 1.13.0' resolution: - integrity: sha512-+B8n+k+zZ3VYOhjNBsLqzjp8O9ZdUWgdpf9L8XAA7mh/oPwufXpExyEc66uAS07imvUMmjz6i8E2eNWV/IjBJg== + integrity: sha512-DXxWr4FwzhhpzDLivpA/QgXrnBHLSL5EQHcLLRylg3TISJFGKEQGYMYPw5V2ZS43hPM2zoJI/Dkcoo/PHBmNYw== /@sinonjs/commons/1.8.2: dependencies: type-detect: 4.0.8 @@ -3206,13 +3185,13 @@ packages: /@types/glob/7.1.3: dependencies: '@types/minimatch': 3.0.3 - '@types/node': 12.12.38 + '@types/node': 12.19.15 dev: true resolution: integrity: sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== /@types/graceful-fs/4.1.4: dependencies: - '@types/node': 12.12.38 + '@types/node': 12.19.15 dev: true resolution: integrity: sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg== @@ -3236,6 +3215,13 @@ packages: '@types/istanbul-lib-report': 3.0.0 resolution: integrity: sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA== + /@types/jest/26.0.20: + dependencies: + jest-diff: 26.6.2 + pretty-format: 26.6.2 + dev: true + resolution: + integrity: sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== /@types/jest/26.0.8: dependencies: jest-diff: 25.5.0 @@ -3243,16 +3229,16 @@ packages: dev: true resolution: integrity: sha512-eo3VX9jGASSuv680D4VQ89UmuLZneNxv2MCZjfwlInav05zXVJTzfc//lavdV0GPwSxsXJTy2jALscB7Acqg0g== - /@types/json-schema/7.0.6: + /@types/json-schema/7.0.7: resolution: - integrity: sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== + integrity: sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== /@types/json5/0.0.29: resolution: integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - /@types/luxon/1.25.0: + /@types/luxon/1.25.1: dev: true resolution: - integrity: sha512-iIJp2CP6C32gVqI08HIYnzqj55tlLnodIBMCcMf28q9ckqMfMzocCmIzd9JWI/ALLPMUiTkCu1JGv3FFtu6t3g== + integrity: sha512-enkMO4WJcbdkhK1eZrItF616buau02wtrSN+DDt9Qj9U23boSAXNJm0fMlgwpTDaRHq3S0D/SPIRbxy4YxBjiA== /@types/minimatch/3.0.3: dev: true resolution: @@ -3261,9 +3247,13 @@ packages: dev: true resolution: integrity: sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== - /@types/node/12.12.38: + /@types/node/12.12.33: + dev: true resolution: - integrity: sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA== + integrity: sha512-KXxfbd6nOiC0rF/JV2F93nZEKecoKPJ+VQTwrApXHj9g5fyUmnIloflMT3w3m9wdCqNEJExGWFXLmimo21DLNA== + /@types/node/12.19.15: + resolution: + integrity: sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw== /@types/normalize-package-data/2.4.0: resolution: integrity: sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== @@ -3281,7 +3271,7 @@ packages: integrity: sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== /@types/resolve/1.17.1: dependencies: - '@types/node': 12.12.38 + '@types/node': 12.19.15 dev: true resolution: integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== @@ -3307,7 +3297,7 @@ packages: integrity: sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== /@types/webpack-sources/0.1.8: dependencies: - '@types/node': 12.12.38 + '@types/node': 12.19.15 '@types/source-list-map': 0.1.2 source-map: 0.6.1 dev: true @@ -3337,7 +3327,7 @@ packages: functional-red-black-tree: 1.0.1 regexpp: 3.1.0 semver: 7.3.4 - tsutils: 3.19.1_typescript@4.0.5 + tsutils: 3.20.0_typescript@4.0.5 typescript: 4.0.5 dev: true engines: @@ -3351,12 +3341,12 @@ packages: optional: true resolution: integrity: sha512-RqEcaHuEKnn3oPFislZ6TNzsBLqpZjN93G69SS+laav/I8w/iGMuMq97P0D2/2/kW4SCebHggqhbcCfbDaaX+g== - /@typescript-eslint/experimental-utils/4.13.0_eslint@7.10.0+typescript@4.0.5: + /@typescript-eslint/experimental-utils/4.14.1_eslint@7.10.0+typescript@4.0.5: dependencies: - '@types/json-schema': 7.0.6 - '@typescript-eslint/scope-manager': 4.13.0 - '@typescript-eslint/types': 4.13.0 - '@typescript-eslint/typescript-estree': 4.13.0_typescript@4.0.5 + '@types/json-schema': 7.0.7 + '@typescript-eslint/scope-manager': 4.14.1 + '@typescript-eslint/types': 4.14.1 + '@typescript-eslint/typescript-estree': 4.14.1_typescript@4.0.5 eslint: 7.10.0 eslint-scope: 5.1.1 eslint-utils: 2.1.0 @@ -3367,10 +3357,10 @@ packages: eslint: '*' typescript: '*' resolution: - integrity: sha512-/ZsuWmqagOzNkx30VWYV3MNB/Re/CGv/7EzlqZo5RegBN8tMuPaBgNK6vPBCQA8tcYrbsrTdbx3ixMRRKEEGVw== + integrity: sha512-2CuHWOJwvpw0LofbyG5gvYjEyoJeSvVH2PnfUQSn0KQr4v8Dql2pr43ohmx4fdPQ/eVoTSFjTi/bsGEXl/zUUQ== /@typescript-eslint/experimental-utils/4.3.0_eslint@7.10.0+typescript@4.0.5: dependencies: - '@types/json-schema': 7.0.6 + '@types/json-schema': 7.0.7 '@typescript-eslint/scope-manager': 4.3.0 '@typescript-eslint/types': 4.3.0 '@typescript-eslint/typescript-estree': 4.3.0_typescript@4.0.5 @@ -3404,15 +3394,15 @@ packages: optional: true resolution: integrity: sha512-JyfRnd72qRuUwItDZ00JNowsSlpQGeKfl9jxwO0FHK1qQ7FbYdoy5S7P+5wh1ISkT2QyAvr2pc9dAemDxzt75g== - /@typescript-eslint/scope-manager/4.13.0: + /@typescript-eslint/scope-manager/4.14.1: dependencies: - '@typescript-eslint/types': 4.13.0 - '@typescript-eslint/visitor-keys': 4.13.0 + '@typescript-eslint/types': 4.14.1 + '@typescript-eslint/visitor-keys': 4.14.1 dev: true engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 resolution: - integrity: sha512-UpK7YLG2JlTp/9G4CHe7GxOwd93RBf3aHO5L+pfjIrhtBvZjHKbMhBXTIQNkbz7HZ9XOe++yKrXutYm5KmjWgQ== + integrity: sha512-F4bjJcSqXqHnC9JGUlnqSa3fC2YH5zTtmACS1Hk+WX/nFB0guuynVK5ev35D4XZbdKjulXBAQMyRr216kmxghw== /@typescript-eslint/scope-manager/4.3.0: dependencies: '@typescript-eslint/types': 4.3.0 @@ -3422,28 +3412,28 @@ packages: node: ^8.10.0 || ^10.13.0 || >=11.10.1 resolution: integrity: sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig== - /@typescript-eslint/types/4.13.0: + /@typescript-eslint/types/4.14.1: dev: true engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 resolution: - integrity: sha512-/+aPaq163oX+ObOG00M0t9tKkOgdv9lq0IQv/y4SqGkAXmhFmCfgsELV7kOCTb2vVU5VOmVwXBXJTDr353C1rQ== + integrity: sha512-SkhzHdI/AllAgQSxXM89XwS1Tkic7csPdndUuTKabEwRcEfR8uQ/iPA3Dgio1rqsV3jtqZhY0QQni8rLswJM2w== /@typescript-eslint/types/4.3.0: dev: true engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 resolution: integrity: sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw== - /@typescript-eslint/typescript-estree/4.13.0_typescript@4.0.5: + /@typescript-eslint/typescript-estree/4.14.1_typescript@4.0.5: dependencies: - '@typescript-eslint/types': 4.13.0 - '@typescript-eslint/visitor-keys': 4.13.0 + '@typescript-eslint/types': 4.14.1 + '@typescript-eslint/visitor-keys': 4.14.1 debug: 4.3.1 globby: 11.0.2 is-glob: 4.0.1 lodash: 4.17.20 semver: 7.3.4 - tsutils: 3.19.1_typescript@4.0.5 + tsutils: 3.20.0_typescript@4.0.5 typescript: 4.0.5 dev: true engines: @@ -3454,7 +3444,7 @@ packages: typescript: optional: true resolution: - integrity: sha512-9A0/DFZZLlGXn5XA349dWQFwPZxcyYyCFX5X88nWs2uachRDwGeyPz46oTsm9ZJE66EALvEns1lvBwa4d9QxMg== + integrity: sha512-M8+7MbzKC1PvJIA8kR2sSBnex8bsR5auatLCnVlNTJczmJgqRn8M+sAlQfkEq7M4IY3WmaNJ+LJjPVRrREVSHQ== /@typescript-eslint/typescript-estree/4.3.0_typescript@4.0.5: dependencies: '@typescript-eslint/types': 4.3.0 @@ -3464,7 +3454,7 @@ packages: is-glob: 4.0.1 lodash: 4.17.20 semver: 7.3.4 - tsutils: 3.19.1_typescript@4.0.5 + tsutils: 3.20.0_typescript@4.0.5 typescript: 4.0.5 dev: true engines: @@ -3476,15 +3466,15 @@ packages: optional: true resolution: integrity: sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw== - /@typescript-eslint/visitor-keys/4.13.0: + /@typescript-eslint/visitor-keys/4.14.1: dependencies: - '@typescript-eslint/types': 4.13.0 + '@typescript-eslint/types': 4.14.1 eslint-visitor-keys: 2.0.0 dev: true engines: node: ^8.10.0 || ^10.13.0 || >=11.10.1 resolution: - integrity: sha512-6RoxWK05PAibukE7jElqAtNMq+RWZyqJ6Q/GdIxaiUj2Ept8jh8+FUVlbq9WxMYxkmEOPvCE5cRSyupMpwW31g== + integrity: sha512-TAblbDXOI7bd0C/9PE1G+AFo7R5uc+ty1ArDoxmrC1ah61Hn6shURKy7gLdRb1qKJmjHkqu5Oq+e4Kt0jwf1IA== /@typescript-eslint/visitor-keys/4.3.0: dependencies: '@typescript-eslint/types': 4.3.0 @@ -3902,6 +3892,15 @@ packages: uri-js: 4.4.1 resolution: integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + /ajv/7.0.3: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: true + resolution: + integrity: sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ== /all-contributors-cli/6.19.0: dependencies: '@babel/runtime': 7.12.5 @@ -4082,7 +4081,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.0-next.1 + es-abstract: 1.18.0-next.2 get-intrinsic: 1.0.2 is-string: 1.0.5 dev: true @@ -4119,7 +4118,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.0-next.1 + es-abstract: 1.18.0-next.2 dev: true engines: node: '>= 0.4' @@ -4216,11 +4215,11 @@ packages: /autoprefixer/9.8.6: dependencies: browserslist: 4.16.1 - caniuse-lite: 1.0.30001176 + caniuse-lite: 1.0.30001179 colorette: 1.2.1 normalize-range: 0.1.2 num2fraction: 1.2.2 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 4.1.0 dev: true hasBin: true @@ -4460,6 +4459,14 @@ packages: optional: true resolution: integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + /bl/4.0.3: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.0 + dev: true + resolution: + integrity: sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== /blob-util/2.0.2: dev: true resolution: @@ -4611,11 +4618,11 @@ packages: integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== /browserslist/4.16.1: dependencies: - caniuse-lite: 1.0.30001176 + caniuse-lite: 1.0.30001179 colorette: 1.2.1 - electron-to-chromium: 1.3.637 + electron-to-chromium: 1.3.645 escalade: 3.1.1 - node-releases: 1.1.69 + node-releases: 1.1.70 engines: node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 hasBin: true @@ -4659,6 +4666,13 @@ packages: dev: true resolution: integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + /buffer/5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + resolution: + integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== /builtin-modules/3.2.0: dev: true engines: @@ -4707,7 +4721,7 @@ packages: integrity: sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== /cacache/15.0.5: dependencies: - '@npmcli/move-file': 1.0.1 + '@npmcli/move-file': 1.1.0 chownr: 2.0.0 fs-minipass: 2.1.0 glob: 7.1.6 @@ -4809,15 +4823,15 @@ packages: /caniuse-api/3.0.0: dependencies: browserslist: 4.16.1 - caniuse-lite: 1.0.30001176 + caniuse-lite: 1.0.30001179 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true resolution: integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - /caniuse-lite/1.0.30001176: + /caniuse-lite/1.0.30001179: resolution: - integrity: sha512-VWdkYmqdkDLRe0lvfJlZQ43rnjKqIGKHWhWWRbkqMsJIUaYDNf/K/sdZZcVO6YKQklubokdkJY+ujArsuJ5cag== + integrity: sha512-blMmO0QQujuUWZKyVrD1msR4WNDAqb/UPO1Sw2WWsQ7deoM5bJiicKnWJ1Y0NS/aGINSnKPIWBMw5luX+NDUCA== /canonical-path/1.0.0: dev: true resolution: @@ -4905,7 +4919,7 @@ packages: fsevents: 1.2.13 resolution: integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - /chokidar/3.5.0: + /chokidar/3.5.1: dependencies: anymatch: 3.1.1 braces: 3.0.2 @@ -4919,7 +4933,7 @@ packages: optionalDependencies: fsevents: 2.3.1 resolution: - integrity: sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q== + integrity: sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== /chownr/1.1.4: dev: true resolution: @@ -5193,12 +5207,18 @@ packages: node: '>= 6' resolution: integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - /comment-parser/0.7.6: + /commander/7.0.0: dev: true engines: - node: '>= 6.0.0' + node: '>= 10' + resolution: + integrity: sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA== + /comment-parser/1.1.1: + dev: true + engines: + node: '>= 10.0.0' resolution: - integrity: sha512-GKNxVA7/iuTnAqGADlTWX4tkhzxZKXp5fLJqKTlQLHkE65XDUKutZ3BHaJC5IGcper2tT3QRD1xr4o3jNpgXXg== + integrity: sha512-vue7cRi1ZO5/72FJ+wZ5+siTSBlUv3ZksTk8bWD2IkaA6obitzMZP3yI65azTJLckwmi8lxfPP5Sd9oGuZ8e2g== /common-tags/1.8.0: dev: true engines: @@ -5355,6 +5375,12 @@ packages: node: '>= 0.6' resolution: integrity: sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + /copy-anything/2.0.1: + dependencies: + is-what: 3.12.0 + dev: true + resolution: + integrity: sha512-lA57e7viQHOdPQcrytv5jFeudZZOXuyk47lZym279FiDQ8jeZomXiGuVf6ffMKkJ+3TIai3J1J3yi6M+/4U35g== /copy-concurrently/1.0.5: dependencies: aproba: 1.2.0 @@ -5374,7 +5400,7 @@ packages: /copy-webpack-plugin/6.0.3_webpack@4.42.0: dependencies: cacache: 15.0.5 - fast-glob: 3.2.4 + fast-glob: 3.2.5 find-cache-dir: 3.3.1 glob-parent: 5.1.1 globby: 11.0.2 @@ -5395,7 +5421,7 @@ packages: /copy-webpack-plugin/6.2.1_webpack@4.44.2: dependencies: cacache: 15.0.5 - fast-glob: 3.2.4 + fast-glob: 3.2.5 find-cache-dir: 3.3.1 glob-parent: 5.1.1 globby: 11.0.2 @@ -5413,27 +5439,27 @@ packages: webpack: ^4.37.0 || ^5.0.0 resolution: integrity: sha512-VH2ZTMIBsx4p++Lmpg77adZ0KUyM5gFR/9cuTrbneNnJlcQXUFvsNariPqq2dq2kV3F2skHiDGPQCyKWy1+U0Q== - /core-js-compat/3.8.2: + /core-js-compat/3.8.3: dependencies: browserslist: 4.16.1 semver: 7.0.0 resolution: - integrity: sha512-LO8uL9lOIyRRrQmZxHZFl1RV+ZbcsAkFWTktn5SmH40WgLtSNYN4m4W2v9ONT147PxBY/XrRhrWq8TlvObyUjQ== - /core-js-pure/3.8.2: + integrity: sha512-1sCb0wBXnBIL16pfFG1Gkvei6UzvKyTNYpiC41yrdjEv0UoJoq9E/abTMzyYJ6JpTkAj15dLjbqifIzEBDVvog== + /core-js-pure/3.8.3: dev: true requiresBuild: true resolution: - integrity: sha512-v6zfIQqL/pzTVAbZvYUozsxNfxcFb6Ks3ZfEbuneJl3FW9Jb8F6vLWB6f+qTmAu72msUdyb84V8d/yBFf7FNnw== + integrity: sha512-V5qQZVAr9K0xu7jXg1M7qTEwuxUgqr7dUOezGaNa7i+Xn9oXAU/d1fzqD9ObuwpVQOaorO5s70ckyi1woP9lVA== /core-js/3.6.5: dev: true requiresBuild: true resolution: integrity: sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== - /core-js/3.8.2: + /core-js/3.8.3: dev: true requiresBuild: true resolution: - integrity: sha512-FfApuSRgrR6G5s58casCBd9M2k+4ikuu4wbW6pJyYU7bd9zvFc9qf7vr5xmrZOhT9nn+8uwlH1oRR9jTnFoA3A== + integrity: sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q== /core-util-is/1.0.2: resolution: integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= @@ -5463,7 +5489,7 @@ packages: dependencies: '@types/parse-json': 4.0.0 import-fresh: 3.3.0 - parse-json: 5.1.0 + parse-json: 5.2.0 path-type: 4.0.0 yaml: 1.10.0 dev: true @@ -5547,7 +5573,7 @@ packages: integrity: sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= /css-declaration-sorter/4.0.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 timsort: 0.3.0 dev: true engines: @@ -5560,14 +5586,14 @@ packages: cssesc: 3.0.0 icss-utils: 4.1.1 loader-utils: 2.0.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-modules-extract-imports: 2.0.0 postcss-modules-local-by-default: 3.0.3 postcss-modules-scope: 2.2.0 postcss-modules-values: 3.0.0 postcss-value-parser: 4.1.0 schema-utils: 2.7.1 - semver: 7.3.2 + semver: 7.3.4 webpack: 4.44.2 dev: true engines: @@ -5639,7 +5665,7 @@ packages: dependencies: css-declaration-sorter: 4.0.1 cssnano-util-raw-cache: 4.0.1 - postcss: 7.0.32 + postcss: 7.0.35 postcss-calc: 7.0.5 postcss-colormin: 4.0.3 postcss-convert-values: 4.0.1 @@ -5686,7 +5712,7 @@ packages: integrity: sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= /cssnano-util-raw-cache/4.0.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -5703,7 +5729,7 @@ packages: cosmiconfig: 5.2.1 cssnano-preset-default: 4.0.7 is-resolvable: 1.1.0 - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -5768,7 +5794,7 @@ packages: execa: 4.1.0 executable: 4.1.1 extract-zip: 1.7.0 - fs-extra: 9.0.1 + fs-extra: 9.1.0 getos: 3.2.1 is-ci: 2.0.0 is-installed-globally: 0.3.2 @@ -5949,7 +5975,7 @@ packages: is-regex: 1.1.1 object-is: 1.1.4 object-keys: 1.1.1 - regexp.prototype.flags: 1.3.0 + regexp.prototype.flags: 1.3.1 dev: true resolution: integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== @@ -6146,7 +6172,7 @@ packages: /dom-serializer/0.2.2: dependencies: domelementtype: 2.1.0 - entities: 2.1.0 + entities: 2.2.0 dev: true resolution: integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== @@ -6228,9 +6254,9 @@ packages: hasBin: true resolution: integrity: sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w== - /electron-to-chromium/1.3.637: + /electron-to-chromium/1.3.645: resolution: - integrity: sha512-924WXYMYquYybc+7pNApGlhY2RWg3MY3he4BrZ5BUmM2n1MGBsrS+PZxrlo6UAsWuNl4NE66fqFdwsWkBUGgkA== + integrity: sha512-T7mYop3aDpRHIQaUYcmzmh6j9MAe560n6ukqjJMbVC6bVTau7dSpvB18bcsBPPtOSe10cKxhJFtlbEzLa0LL1g== /elegant-spinner/1.0.1: dev: true engines: @@ -6318,10 +6344,10 @@ packages: node: '>=8.6' resolution: integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - /entities/2.1.0: + /entities/2.2.0: dev: true resolution: - integrity: sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== /err-code/1.1.2: dev: true resolution: @@ -6355,10 +6381,12 @@ packages: node: '>= 0.4' resolution: integrity: sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== - /es-abstract/1.18.0-next.1: + /es-abstract/1.18.0-next.2: dependencies: + call-bind: 1.0.2 es-to-primitive: 1.2.1 function-bind: 1.1.1 + get-intrinsic: 1.0.2 has: 1.0.3 has-symbols: 1.0.1 is-callable: 1.2.2 @@ -6373,7 +6401,7 @@ packages: engines: node: '>= 0.4' resolution: - integrity: sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== + integrity: sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw== /es-to-primitive/1.2.1: dependencies: is-callable: 1.2.2 @@ -6509,9 +6537,9 @@ packages: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 resolution: integrity: sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw== - /eslint-plugin-jsdoc/30.7.13_eslint@7.10.0: + /eslint-plugin-jsdoc/31.3.3_eslint@7.10.0: dependencies: - comment-parser: 0.7.6 + comment-parser: 1.1.1 debug: 4.3.1 eslint: 7.10.0 jsdoctypeparser: 9.0.0 @@ -6525,7 +6553,7 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 resolution: - integrity: sha512-YM4WIsmurrp0rHX6XiXQppqKB8Ne5ATiZLJe2+/fkp9l9ExXFr43BbAbjZaVrpCT+tuPYOZ8k1MICARHnURUNQ== + integrity: sha512-7kmYu7qQpwe4gCLTBGSpwkiCzmsDlQui7HNlEArUE6Jbqb6ddWpn4Q4X26bOpcByRsyAwm+0xwZtWmJVSue+kw== /eslint-plugin-prefer-arrow/1.2.2_eslint@7.10.0: dependencies: eslint: 7.10.0 @@ -6907,7 +6935,7 @@ packages: /fast-deep-equal/3.1.3: resolution: integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - /fast-glob/3.2.4: + /fast-glob/3.2.5: dependencies: '@nodelib/fs.stat': 2.0.4 '@nodelib/fs.walk': 1.2.6 @@ -6919,7 +6947,7 @@ packages: engines: node: '>=8' resolution: - integrity: sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== + integrity: sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== /fast-json-stable-stringify/2.1.0: resolution: integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -6935,7 +6963,7 @@ packages: integrity: sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA== /faye-websocket/0.10.0: dependencies: - websocket-driver: 0.6.5 + websocket-driver: 0.7.4 dev: true engines: node: '>=0.4.0' @@ -7170,7 +7198,7 @@ packages: dependencies: babel-code-frame: 6.26.0 chalk: 2.4.2 - chokidar: 3.5.0 + chokidar: 3.5.1 micromatch: 3.1.10 minimatch: 3.0.4 semver: 5.7.1 @@ -7234,17 +7262,17 @@ packages: node: '>=6 <7 || >=8' resolution: integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - /fs-extra/9.0.1: + /fs-extra/9.1.0: dependencies: at-least-node: 1.0.0 graceful-fs: 4.2.4 jsonfile: 6.1.0 - universalify: 1.0.0 + universalify: 2.0.0 dev: true engines: node: '>=10' resolution: - integrity: sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== /fs-minipass/1.2.7: dependencies: minipass: 2.9.0 @@ -7473,7 +7501,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.4 + fast-glob: 3.2.5 ignore: 5.1.8 merge2: 1.4.1 slash: 3.0.0 @@ -7485,7 +7513,7 @@ packages: /globby/6.1.0: dependencies: array-union: 1.0.2 - glob: 7.1.4 + glob: 7.1.6 object-assign: 4.1.1 pify: 2.3.0 pinkie-promise: 2.0.1 @@ -7788,7 +7816,7 @@ packages: dev: true resolution: integrity: sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= - /husky/4.3.7: + /husky/4.3.8: dependencies: chalk: 4.1.0 ci-info: 2.0.0 @@ -7806,7 +7834,7 @@ packages: hasBin: true requiresBuild: true resolution: - integrity: sha512-0fQlcCDq/xypoyYSJvEuzbDPHFf8ZF9IXKJxlrnvxABTSzK1VPT2RKYQKrcgJ+YD39swgoB6sbzywUqFxUiqjw== + integrity: sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow== /iconv-lite/0.4.24: dependencies: safer-buffer: 2.1.2 @@ -7824,7 +7852,7 @@ packages: integrity: sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== /icss-utils/4.1.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>= 6' @@ -7851,7 +7879,6 @@ packages: resolution: integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== /ignore/5.1.8: - dev: true engines: node: '>= 4' resolution: @@ -8403,6 +8430,10 @@ packages: dev: true resolution: integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + /is-what/3.12.0: + dev: true + resolution: + integrity: sha512-2ilQz5/f/o9V7WRWJQmpFYNmQFZ9iM+OXRonZKcYgTkCzjb949Vi4h282PD1UfmgHk666rcWonbRJ++KI41VGw== /is-windows/1.0.2: engines: node: '>=0.10.0' @@ -8473,7 +8504,7 @@ packages: integrity: sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== /istanbul-lib-instrument/4.0.3: dependencies: - '@babel/core': 7.12.3 + '@babel/core': 7.12.10 '@istanbuljs/schema': 0.1.2 istanbul-lib-coverage: 3.0.0 semver: 6.3.0 @@ -8520,10 +8551,10 @@ packages: hasBin: true resolution: integrity: sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A== - /jasmine-marbles/0.6.0_rxjs@6.5.5: + /jasmine-marbles/0.6.0_rxjs@6.6.3: dependencies: lodash: 4.17.20 - rxjs: 6.5.5 + rxjs: 6.6.3 dev: false peerDependencies: rxjs: ^6.4.0 @@ -8708,7 +8739,7 @@ packages: '@jest/environment': 26.6.2 '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 jest-mock: 26.6.2 jest-util: 26.6.2 jsdom: 16.4.0 @@ -8734,7 +8765,7 @@ packages: '@jest/environment': 26.6.2 '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 jest-mock: 26.6.2 jest-util: 26.6.2 dev: true @@ -8784,7 +8815,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@types/graceful-fs': 4.1.4 - '@types/node': 12.12.38 + '@types/node': 12.19.15 anymatch: 3.1.1 fb-watchman: 2.0.1 graceful-fs: 4.2.4 @@ -8832,7 +8863,7 @@ packages: '@jest/source-map': 26.6.2 '@jest/test-result': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 chalk: 4.1.0 co: 4.6.0 expect: 26.6.2 @@ -8934,7 +8965,7 @@ packages: /jest-mock/26.6.2: dependencies: '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 dev: true engines: node: '>= 10.14.2' @@ -8965,9 +8996,9 @@ packages: optional: true resolution: integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== - /jest-preset-angular/8.3.1_c29faa133a6a4b4ab5c55a1fa06c50f9: + /jest-preset-angular/8.3.2_c29faa133a6a4b4ab5c55a1fa06c50f9: dependencies: - '@angular/core': 11.0.9_rxjs@6.5.5+zone.js@0.10.3 + '@angular/core': 11.0.9_rxjs@6.6.3+zone.js@0.11.3 '@angular/platform-browser-dynamic': 11.0.9_8383343813cdfa803f2f916e7857b4c5 jest: 26.2.2_ts-node@9.1.1 pretty-format: 26.6.2 @@ -8981,7 +9012,7 @@ packages: jest: ^26.0.0 typescript: '*' resolution: - integrity: sha512-WhQm+0tXzikkvIF35XErV87DqYbieZI0R0MIGgn7VE/DDhdbXFDmYQxFZ7w4qcA0cGLLvSMTBbIsUtHeE/rFxQ== + integrity: sha512-mdETK9E5tkCJPnPzB7NLXDB7CULbUEwcrA7eKU7WdR0u7ZIJqP0pvQxK5Cc70KBsOEaiwJK6LSGJm7aeqjSYYA== /jest-regex-util/24.9.0: dev: true engines: @@ -9062,7 +9093,7 @@ packages: '@jest/environment': 26.6.2 '@jest/test-result': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 chalk: 4.1.0 emittery: 0.7.2 exit: 0.1.2 @@ -9167,7 +9198,7 @@ packages: integrity: sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== /jest-serializer/26.6.2: dependencies: - '@types/node': 12.12.38 + '@types/node': 12.19.15 graceful-fs: 4.2.4 dev: true engines: @@ -9239,7 +9270,7 @@ packages: /jest-util/26.6.2: dependencies: '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 chalk: 4.1.0 graceful-fs: 4.2.4 is-ci: 2.0.0 @@ -9278,7 +9309,7 @@ packages: dependencies: '@jest/test-result': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 12.12.38 + '@types/node': 12.19.15 ansi-escapes: 4.3.1 chalk: 4.1.0 jest-util: 26.6.2 @@ -9299,7 +9330,7 @@ packages: integrity: sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== /jest-worker/26.5.0: dependencies: - '@types/node': 12.12.38 + '@types/node': 12.19.15 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -9309,7 +9340,7 @@ packages: integrity: sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug== /jest-worker/26.6.2: dependencies: - '@types/node': 12.12.38 + '@types/node': 12.19.15 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -9454,6 +9485,10 @@ packages: /json-schema-traverse/0.4.1: resolution: integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + /json-schema-traverse/1.0.0: + dev: true + resolution: + integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== /json-schema/0.2.3: dev: true resolution: @@ -9613,6 +9648,25 @@ packages: source-map: 0.6.1 resolution: integrity: sha512-+1V2PCMFkL+OIj2/HrtrvZw0BC0sYLMICJfbQjuj/K8CEnlrFX6R5cKKgzzttsZDHyxQNL1jqMREjKN3ja/E3Q== + /less/4.1.0: + dependencies: + copy-anything: 2.0.1 + parse-node-version: 1.0.1 + tslib: 1.14.1 + dev: true + engines: + node: '>=6' + hasBin: true + optionalDependencies: + errno: 0.1.8 + graceful-fs: 4.2.4 + image-size: 0.5.5 + make-dir: 2.1.0 + mime: 1.6.0 + needle: 2.6.0 + source-map: 0.6.1 + resolution: + integrity: sha512-w1Ag/f34g7LwtQ/sMVSGWIyZx+gG9ZOAEtyxeX1fG75is6BMyC2lD5kG+1RueX7PkAvlQBm2Lf2aN2j0JbVr2A== /leven/3.1.0: dev: true engines: @@ -9664,7 +9718,7 @@ packages: dedent: 0.7.0 enquirer: 2.3.6 execa: 4.1.0 - listr2: 3.2.3_enquirer@2.3.6 + listr2: 3.3.0_enquirer@2.3.6 log-symbols: 4.0.0 micromatch: 4.0.2 normalize-path: 3.0.0 @@ -9726,7 +9780,7 @@ packages: node: '>=6' resolution: integrity: sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== - /listr2/3.2.3_enquirer@2.3.6: + /listr2/3.3.0_enquirer@2.3.6: dependencies: chalk: 4.1.0 cli-truncate: 2.1.0 @@ -9737,13 +9791,14 @@ packages: p-map: 4.0.0 rxjs: 6.6.3 through: 2.3.8 + wrap-ansi: 7.0.0 dev: true engines: node: '>=10.0.0' peerDependencies: enquirer: '>= 2.3.0 < 3' resolution: - integrity: sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w== + integrity: sha512-G9IFI/m65icgVlifS0wMQnvn35/8VJGzEb3crpE4NnaegQYQOn/wP7yqi9TTJQ/eoxme4UaPbffBK1XqKP/DOg== /load-json-file/2.0.0: dependencies: graceful-fs: 4.2.4 @@ -10158,13 +10213,13 @@ packages: hasBin: true resolution: integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - /mime/2.4.7: + /mime/2.5.0: dev: true engines: node: '>=4.0.0' hasBin: true resolution: - integrity: sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== + integrity: sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag== /mimic-fn/1.2.0: engines: node: '>=4' @@ -10390,6 +10445,18 @@ packages: dev: true resolution: integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + /needle/2.6.0: + dependencies: + debug: 3.2.7 + iconv-lite: 0.4.24 + sax: 1.2.4 + dev: true + engines: + node: '>= 4.4.x' + hasBin: true + optional: true + resolution: + integrity: sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== /negotiator/0.6.2: dev: true engines: @@ -10404,48 +10471,51 @@ packages: dev: true resolution: integrity: sha1-yobR/ogoFpsBICCOPchCS524NCw= - /ng-packagr/11.0.3_91de3abf2c33a188d811d0c09a5700d2: + /ng-packagr/11.1.2_d5db820be2a97d193023211c377028b4: dependencies: '@angular/compiler': 11.0.9 '@angular/compiler-cli': 11.0.9_3656b9d387a5ec1e283954a14f07f018 - '@rollup/plugin-commonjs': 15.1.0_rollup@2.32.1 - '@rollup/plugin-json': 4.1.0_rollup@2.32.1 - '@rollup/plugin-node-resolve': 10.0.0_rollup@2.32.1 - ajv: 6.12.6 + '@rollup/plugin-commonjs': 17.0.0_rollup@2.38.0 + '@rollup/plugin-json': 4.1.0_rollup@2.38.0 + '@rollup/plugin-node-resolve': 11.1.0_rollup@2.38.0 + ajv: 7.0.3 ansi-colors: 4.1.1 autoprefixer: 9.8.6 browserslist: 4.16.1 - chokidar: 3.5.0 - commander: 6.2.1 + chokidar: 3.5.1 + commander: 7.0.0 cssnano-preset-default: 4.0.7 - fs-extra: 9.0.1 glob: 7.1.6 injection-js: 2.4.0 - less: 3.12.2 + less: 4.1.0 node-sass-tilde-importer: 1.0.2 - ora: 5.1.0 - postcss: 7.0.32 + ora: 5.3.0 + postcss: 7.0.35 postcss-url: 8.0.0 read-pkg-up: 5.0.0 rimraf: 3.0.2 - rollup: 2.32.1 - rollup-plugin-sourcemaps: 0.6.3_35fc90637d50965521bb5834a56a8051 + rollup: 2.38.0 + rollup-plugin-sourcemaps: 0.6.3_eed5ecdf8c698c4cfff75e3a9fe8238b rxjs: 6.6.3 - sass: 1.27.0 + sass: 1.32.5 stylus: 0.54.8 - terser: 5.3.7 + terser: 5.5.1 tslib: 2.1.0 typescript: 4.0.5 dev: true hasBin: true peerDependencies: - '@angular/compiler': ^11.0.0-next.0 - '@angular/compiler-cli': ^11.0.0-next.0 + '@angular/compiler': ^11.0.0 + '@angular/compiler-cli': ^11.0.0 '@types/node': '*' + tsickle: ~0.39.0 tslib: ^2.0.0 - typescript: ^4.0.0 + typescript: '>=4.0 <4.2' + peerDependenciesMeta: + tsickle: + optional: true resolution: - integrity: sha512-wvXy4Xlr1atCdeuddUbLS79yv7k79ZU8R4Gcw2aywTihpt4ZaFr+I/ZoKWAPQenavYl0bykVuTLJ+hZZqNroNw== + integrity: sha512-Ud6DJC4eiiQHDUi3BegW50gJfvUfbXTu9fqR/Hhj0s42PLDOfGzbIAFhz8AhiDNdzptZTsinITvESuKj12CIAA== /nice-try/1.0.5: dev: true resolution: @@ -10526,9 +10596,9 @@ packages: optional: true resolution: integrity: sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA== - /node-releases/1.1.69: + /node-releases/1.1.70: resolution: - integrity: sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA== + integrity: sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw== /node-sass-tilde-importer/1.0.2: dependencies: find-parent-dir: 0.3.0 @@ -10587,7 +10657,7 @@ packages: integrity: sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== /npm-install-checks/4.0.0: dependencies: - semver: 7.3.2 + semver: 7.3.4 dev: true engines: node: '>=10' @@ -10609,7 +10679,7 @@ packages: /npm-package-arg/8.1.0: dependencies: hosted-git-info: 3.0.7 - semver: 7.3.2 + semver: 7.3.4 validate-npm-package-name: 3.0.0 dev: true engines: @@ -10636,7 +10706,7 @@ packages: dependencies: npm-install-checks: 4.0.0 npm-package-arg: 8.1.0 - semver: 7.3.2 + semver: 7.3.4 dev: true resolution: integrity: sha512-ygs4k6f54ZxJXrzT0x34NybRlLeZ4+6nECAIbr2i0foTnijtS1TJiyzpqtuUAJOps/hO0tNDr8fRV5g+BtRlTw== @@ -10763,7 +10833,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.0-next.1 + es-abstract: 1.18.0-next.2 dev: true engines: node: '>= 0.8' @@ -10780,7 +10850,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.0-next.1 + es-abstract: 1.18.0-next.2 has: 1.0.3 dev: true engines: @@ -10892,6 +10962,21 @@ packages: node: '>=10' resolution: integrity: sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w== + /ora/5.3.0: + dependencies: + bl: 4.0.3 + chalk: 4.1.0 + cli-cursor: 3.1.0 + cli-spinners: 2.5.0 + is-interactive: 1.0.0 + log-symbols: 4.0.0 + strip-ansi: 6.0.0 + wcwidth: 1.0.1 + dev: true + engines: + node: '>=10' + resolution: + integrity: sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g== /original/1.0.2: dependencies: url-parse: 1.4.7 @@ -11105,7 +11190,7 @@ packages: node: '>=4' resolution: integrity: sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - /parse-json/5.1.0: + /parse-json/5.2.0: dependencies: '@babel/code-frame': 7.12.11 error-ex: 1.3.2 @@ -11114,7 +11199,13 @@ packages: engines: node: '>=8' resolution: - integrity: sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ== + integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + /parse-node-version/1.0.1: + dev: true + engines: + node: '>= 0.10' + resolution: + integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== /parse5-html-rewriting-stream/6.0.1: dependencies: parse5: 6.0.1 @@ -11373,7 +11464,7 @@ packages: integrity: sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= /postcss-calc/7.0.5: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 postcss-selector-parser: 6.0.4 postcss-value-parser: 4.1.0 dev: true @@ -11384,7 +11475,7 @@ packages: browserslist: 4.16.1 color: 3.1.3 has: 1.0.3 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11393,7 +11484,7 @@ packages: integrity: sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== /postcss-convert-values/4.0.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11402,7 +11493,7 @@ packages: integrity: sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== /postcss-discard-comments/4.0.2: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -11410,7 +11501,7 @@ packages: integrity: sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== /postcss-discard-duplicates/4.0.2: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -11418,7 +11509,7 @@ packages: integrity: sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== /postcss-discard-empty/4.0.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -11426,7 +11517,7 @@ packages: integrity: sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== /postcss-discard-overridden/4.0.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -11434,7 +11525,7 @@ packages: integrity: sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== /postcss-import/12.0.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 read-cache: 1.0.0 resolve: 1.19.0 @@ -11450,7 +11541,7 @@ packages: loader-utils: 2.0.0 postcss: 7.0.32 schema-utils: 3.0.0 - semver: 7.3.2 + semver: 7.3.4 webpack: 4.44.2 dev: true engines: @@ -11463,7 +11554,7 @@ packages: /postcss-merge-longhand/4.0.11: dependencies: css-color-names: 0.0.4 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 stylehacks: 4.0.3 dev: true @@ -11476,7 +11567,7 @@ packages: browserslist: 4.16.1 caniuse-api: 3.0.0 cssnano-util-same-parent: 4.0.1 - postcss: 7.0.32 + postcss: 7.0.35 postcss-selector-parser: 3.1.2 vendors: 1.0.4 dev: true @@ -11486,7 +11577,7 @@ packages: integrity: sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== /postcss-minify-font-values/4.0.2: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11497,7 +11588,7 @@ packages: dependencies: cssnano-util-get-arguments: 4.0.0 is-color-stop: 1.1.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11509,7 +11600,7 @@ packages: alphanum-sort: 1.0.2 browserslist: 4.16.1 cssnano-util-get-arguments: 4.0.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 uniqs: 2.0.0 dev: true @@ -11521,7 +11612,7 @@ packages: dependencies: alphanum-sort: 1.0.2 has: 1.0.3 - postcss: 7.0.32 + postcss: 7.0.35 postcss-selector-parser: 3.1.2 dev: true engines: @@ -11530,7 +11621,7 @@ packages: integrity: sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== /postcss-modules-extract-imports/2.0.0: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>= 6' @@ -11539,7 +11630,7 @@ packages: /postcss-modules-local-by-default/3.0.3: dependencies: icss-utils: 4.1.1 - postcss: 7.0.32 + postcss: 7.0.35 postcss-selector-parser: 6.0.4 postcss-value-parser: 4.1.0 dev: true @@ -11549,7 +11640,7 @@ packages: integrity: sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw== /postcss-modules-scope/2.2.0: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 postcss-selector-parser: 6.0.4 dev: true engines: @@ -11559,13 +11650,13 @@ packages: /postcss-modules-values/3.0.0: dependencies: icss-utils: 4.1.1 - postcss: 7.0.32 + postcss: 7.0.35 dev: true resolution: integrity: sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg== /postcss-normalize-charset/4.0.1: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -11574,7 +11665,7 @@ packages: /postcss-normalize-display-values/4.0.2: dependencies: cssnano-util-get-match: 4.0.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11585,7 +11676,7 @@ packages: dependencies: cssnano-util-get-arguments: 4.0.0 has: 1.0.3 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11596,7 +11687,7 @@ packages: dependencies: cssnano-util-get-arguments: 4.0.0 cssnano-util-get-match: 4.0.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11606,7 +11697,7 @@ packages: /postcss-normalize-string/4.0.2: dependencies: has: 1.0.3 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11616,7 +11707,7 @@ packages: /postcss-normalize-timing-functions/4.0.2: dependencies: cssnano-util-get-match: 4.0.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11626,7 +11717,7 @@ packages: /postcss-normalize-unicode/4.0.1: dependencies: browserslist: 4.16.1 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11637,7 +11728,7 @@ packages: dependencies: is-absolute-url: 2.1.0 normalize-url: 3.3.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11646,7 +11737,7 @@ packages: integrity: sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== /postcss-normalize-whitespace/4.0.2: dependencies: - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11656,7 +11747,7 @@ packages: /postcss-ordered-values/4.1.2: dependencies: cssnano-util-get-arguments: 4.0.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11668,7 +11759,7 @@ packages: browserslist: 4.16.1 caniuse-api: 3.0.0 has: 1.0.3 - postcss: 7.0.32 + postcss: 7.0.35 dev: true engines: node: '>=6.9.0' @@ -11678,7 +11769,7 @@ packages: dependencies: cssnano-util-get-match: 4.0.0 has: 1.0.3 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 dev: true engines: @@ -11709,7 +11800,7 @@ packages: /postcss-svgo/4.0.2: dependencies: is-svg: 3.0.0 - postcss: 7.0.32 + postcss: 7.0.35 postcss-value-parser: 3.3.1 svgo: 1.3.2 dev: true @@ -11720,7 +11811,7 @@ packages: /postcss-unique-selectors/4.0.1: dependencies: alphanum-sort: 1.0.2 - postcss: 7.0.32 + postcss: 7.0.35 uniqs: 2.0.0 dev: true engines: @@ -11729,10 +11820,10 @@ packages: integrity: sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== /postcss-url/8.0.0: dependencies: - mime: 2.4.7 + mime: 2.5.0 minimatch: 3.0.4 mkdirp: 0.5.5 - postcss: 7.0.32 + postcss: 7.0.35 xxhashjs: 0.2.2 dev: true engines: @@ -11767,6 +11858,16 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== + /postcss/7.0.35: + dependencies: + chalk: 2.4.2 + source-map: 0.6.1 + supports-color: 6.1.0 + dev: true + engines: + node: '>=6.0.0' + resolution: + integrity: sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== /prelude-ls/1.1.2: dev: true engines: @@ -12091,7 +12192,7 @@ packages: dependencies: '@types/normalize-package-data': 2.4.0 normalize-package-data: 2.5.0 - parse-json: 5.1.0 + parse-json: 5.2.0 type-fest: 0.6.0 engines: node: '>=8' @@ -12171,7 +12272,7 @@ packages: integrity: sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== /regenerator-transform/0.14.5: dependencies: - '@babel/runtime': 7.12.1 + '@babel/runtime': 7.12.5 resolution: integrity: sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== /regex-not/1.0.2: @@ -12186,15 +12287,15 @@ packages: dev: true resolution: integrity: sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== - /regexp.prototype.flags/1.3.0: + /regexp.prototype.flags/1.3.1: dependencies: + call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.17.7 dev: true engines: node: '>= 0.4' resolution: - integrity: sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + integrity: sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== /regexpp/3.1.0: dev: true engines: @@ -12501,11 +12602,11 @@ packages: dev: true resolution: integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - /rollup-plugin-sourcemaps/0.6.3_35fc90637d50965521bb5834a56a8051: + /rollup-plugin-sourcemaps/0.6.3_eed5ecdf8c698c4cfff75e3a9fe8238b: dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.32.1 - '@types/node': 12.12.38 - rollup: 2.32.1 + '@rollup/pluginutils': 3.1.0_rollup@2.38.0 + '@types/node': 12.12.33 + rollup: 2.38.0 source-map-resolve: 0.6.0 dev: true engines: @@ -12527,6 +12628,15 @@ packages: fsevents: 2.1.3 resolution: integrity: sha512-Op2vWTpvK7t6/Qnm1TTh7VjEZZkN8RWgf0DHbkKzQBwNf748YhXbozHVefqpPp/Fuyk/PQPAnYsBxAEtlMvpUw== + /rollup/2.38.0: + dev: true + engines: + node: '>=10.0.0' + hasBin: true + optionalDependencies: + fsevents: 2.1.3 + resolution: + integrity: sha512-ay9zDiNitZK/LNE/EM2+v5CZ7drkB2xyDljvb1fQJCGnq43ZWRkhxN145oV8GmoW1YNi4sA/1Jdkr2LfawJoXw== /rsvp/4.8.5: dev: true engines: @@ -12548,9 +12658,17 @@ packages: dev: true resolution: integrity: sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + /rxjs-for-await/0.0.2_rxjs@6.6.3: + dependencies: + rxjs: 6.6.3 + peerDependencies: + rxjs: ^6.0.0 + resolution: + integrity: sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw== /rxjs/6.5.5: dependencies: tslib: 1.14.1 + dev: true engines: npm: '>=2.0.0' resolution: @@ -12601,7 +12719,7 @@ packages: neo-async: 2.6.2 sass: 1.27.0 schema-utils: 3.0.0 - semver: 7.3.2 + semver: 7.3.4 webpack: 4.44.2 dev: true engines: @@ -12622,13 +12740,22 @@ packages: integrity: sha512-2LqoNPtKkZq/XbXNQ4C64GFEleSEHKv6NPSI+bMC/l+jpEXGJhiRYkAQToO24MR7NU4JRY2RpLpJ/gjo2Uf13w== /sass/1.27.0: dependencies: - chokidar: 3.5.0 + chokidar: 3.5.1 dev: true engines: node: '>=8.9.0' hasBin: true resolution: integrity: sha512-0gcrER56OkzotK/GGwgg4fPrKuiFlPNitO7eUJ18Bs+/NBlofJfMxmxqpqJxjae9vu0Wq8TZzrSyxZal00WDig== + /sass/1.32.5: + dependencies: + chokidar: 3.5.1 + dev: true + engines: + node: '>=8.9.0' + hasBin: true + resolution: + integrity: sha512-kU1yJ5zUAmPxr7f3q0YXTAd1oZjSR1g3tYyv+xu0HZSl5JiNOaE987eiz7wCUvbm4I9fGWGU2TgApTtcP4GMNQ== /sax/1.2.4: dev: true resolution: @@ -12653,7 +12780,7 @@ packages: integrity: sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== /schema-utils/2.7.1: dependencies: - '@types/json-schema': 7.0.6 + '@types/json-schema': 7.0.7 ajv: 6.12.6 ajv-keywords: 3.5.2_ajv@6.12.6 engines: @@ -12662,7 +12789,7 @@ packages: integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== /schema-utils/3.0.0: dependencies: - '@types/json-schema': 7.0.6 + '@types/json-schema': 7.0.7 ajv: 6.12.6 ajv-keywords: 3.5.2_ajv@6.12.6 dev: true @@ -13302,7 +13429,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.0-next.1 + es-abstract: 1.18.0-next.2 dev: true engines: node: '>= 0.4' @@ -13428,7 +13555,7 @@ packages: /stylehacks/4.0.3: dependencies: browserslist: 4.16.1 - postcss: 7.0.32 + postcss: 7.0.35 postcss-selector-parser: 3.1.2 dev: true engines: @@ -13437,7 +13564,7 @@ packages: integrity: sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== /stylus-loader/4.3.1_stylus@0.54.8+webpack@4.44.2: dependencies: - fast-glob: 3.2.4 + fast-glob: 3.2.5 klona: 2.0.4 loader-utils: 2.0.0 normalize-path: 3.0.0 @@ -13652,12 +13779,12 @@ packages: dependencies: cacache: 15.0.5 find-cache-dir: 3.3.1 - jest-worker: 26.5.0 + jest-worker: 26.6.2 p-limit: 3.1.0 schema-utils: 3.0.0 serialize-javascript: 5.0.1 source-map: 0.6.1 - terser: 5.3.7 + terser: 5.5.1 webpack: 4.44.2 webpack-sources: 1.4.3 dev: true @@ -13671,7 +13798,7 @@ packages: dependencies: commander: 2.20.3 source-map: 0.6.1 - source-map-support: 0.5.16 + source-map-support: 0.5.19 dev: true engines: node: '>=6.0.0' @@ -13689,6 +13816,17 @@ packages: hasBin: true resolution: integrity: sha512-lJbKdfxWvjpV330U4PBZStCT9h3N9A4zZVA5Y4k9sCWXknrpdyxi1oMsRKLmQ/YDMDxSBKIh88v0SkdhdqX06w== + /terser/5.5.1: + dependencies: + commander: 2.20.3 + source-map: 0.7.3 + source-map-support: 0.5.19 + dev: true + engines: + node: '>=10' + hasBin: true + resolution: + integrity: sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== /test-exclude/5.2.3: dependencies: glob: 7.1.6 @@ -13903,6 +14041,30 @@ packages: typescript: '>=3.8 <5.0' resolution: integrity: sha512-ofBzoCqf6Nv/PoWb/ByV3VNKy2KJSikamOBxvR3E6eVdIw10GwAXoyvMWXXjZJK2s6S27ZE8fI+JBTnGaovl6Q== + /ts-jest/26.4.4_jest@26.2.2+typescript@4.0.5: + dependencies: + '@types/jest': 26.0.20 + bs-logger: 0.2.6 + buffer-from: 1.1.1 + fast-json-stable-stringify: 2.1.0 + jest: 26.2.2_ts-node@9.1.1 + jest-util: 26.6.2 + json5: 2.1.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + mkdirp: 1.0.4 + semver: 7.3.4 + typescript: 4.0.5 + yargs-parser: 20.2.4 + dev: true + engines: + node: '>= 10' + hasBin: true + peerDependencies: + jest: '>=26 <27' + typescript: '>=3.8 <5.0' + resolution: + integrity: sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg== /ts-loader/5.4.5_typescript@4.0.5: dependencies: chalk: 2.4.2 @@ -13972,7 +14134,7 @@ packages: /tslib/2.1.0: resolution: integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== - /tsutils/3.19.1_typescript@4.0.5: + /tsutils/3.20.0_typescript@4.0.5: dependencies: tslib: 1.14.1 typescript: 4.0.5 @@ -13982,7 +14144,7 @@ packages: peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' resolution: - integrity: sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw== + integrity: sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg== /tty-browserify/0.0.0: dev: true resolution: @@ -14130,7 +14292,7 @@ packages: integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== /universal-analytics/0.4.23: dependencies: - debug: 4.2.0 + debug: 4.3.1 request: 2.88.2 uuid: 3.4.0 dev: true @@ -14141,12 +14303,6 @@ packages: node: '>= 4.0.0' resolution: integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - /universalify/1.0.0: - dev: true - engines: - node: '>= 10.0.0' - resolution: - integrity: sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== /universalify/2.0.0: dev: true engines: @@ -14350,7 +14506,7 @@ packages: neo-async: 2.6.2 dev: true optionalDependencies: - chokidar: 3.5.0 + chokidar: 3.5.1 watchpack-chokidar2: 2.0.1 resolution: integrity: sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== @@ -14381,13 +14537,13 @@ packages: node: '>=10.4' resolution: integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - /webpack-dev-middleware/3.7.2_webpack@4.44.2: + /webpack-dev-middleware/3.7.2_webpack@4.42.0: dependencies: memory-fs: 0.4.1 - mime: 2.4.7 + mime: 2.5.0 mkdirp: 0.5.5 range-parser: 1.2.1 - webpack: 4.44.2 + webpack: 4.42.0 webpack-log: 2.0.0 dev: true engines: @@ -14396,25 +14552,10 @@ packages: webpack: ^4.0.0 resolution: integrity: sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== - /webpack-dev-middleware/3.7.3_webpack@4.42.0: - dependencies: - memory-fs: 0.4.1 - mime: 2.4.7 - mkdirp: 0.5.5 - range-parser: 1.2.1 - webpack: 4.42.0 - webpack-log: 2.0.0 - dev: true - engines: - node: '>= 6' - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - resolution: - integrity: sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== - /webpack-dev-middleware/3.7.3_webpack@4.44.2: + /webpack-dev-middleware/3.7.2_webpack@4.44.2: dependencies: memory-fs: 0.4.1 - mime: 2.4.7 + mime: 2.5.0 mkdirp: 0.5.5 range-parser: 1.2.1 webpack: 4.44.2 @@ -14423,9 +14564,9 @@ packages: engines: node: '>= 6' peerDependencies: - webpack: ^4.0.0 || ^5.0.0 + webpack: ^4.0.0 resolution: - integrity: sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== + integrity: sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== /webpack-dev-server/3.11.0_webpack@4.42.0: dependencies: ansi-html: 0.0.7 @@ -14458,7 +14599,7 @@ packages: supports-color: 6.1.0 url: 0.11.0 webpack: 4.42.0 - webpack-dev-middleware: 3.7.3_webpack@4.42.0 + webpack-dev-middleware: 3.7.2_webpack@4.42.0 webpack-log: 2.0.0 ws: 6.2.1 yargs: 13.3.2 @@ -14506,7 +14647,7 @@ packages: supports-color: 6.1.0 url: 0.11.0 webpack: 4.44.2 - webpack-dev-middleware: 3.7.3_webpack@4.44.2 + webpack-dev-middleware: 3.7.2_webpack@4.44.2 webpack-log: 2.0.0 ws: 6.2.1 yargs: 13.3.2 @@ -14994,26 +15135,28 @@ packages: node: '>=10' resolution: integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - /zone.js/0.10.3: + /zone.js/0.11.3: + dependencies: + tslib: 2.1.0 dev: false resolution: - integrity: sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg== + integrity: sha512-Y4hTHoh4VcxU5BDGAqEoOnOiyT254w6CiHtpQxAJUSMZPyVgdbKf+5R7Mwz6xsPhMIeBXk5rTopRZDpjssTCUg== specifiers: - '@angular-devkit/build-angular': ~0.1100.6 + '@angular-devkit/build-angular': ~0.1100.1 '@angular-eslint/eslint-plugin': 1.0.0 '@angular-eslint/eslint-plugin-template': 1.0.0 '@angular-eslint/template-parser': 1.0.0 - '@angular/animations': ^11.0.7 - '@angular/cli': ^11.0.6 - '@angular/common': ^11.0.7 - '@angular/compiler': ^11.0.7 - '@angular/compiler-cli': ^11.0.7 - '@angular/core': ^11.0.7 - '@angular/forms': ^11.0.7 - '@angular/language-service': ^11.0.7 - '@angular/platform-browser': ^11.0.7 - '@angular/platform-browser-dynamic': ^11.0.7 - '@angular/router': ^11.0.7 + '@angular/animations': ~11.0.0 + '@angular/cli': ~11.0.1 + '@angular/common': ~11.0.0 + '@angular/compiler': ~11.0.0 + '@angular/compiler-cli': ~11.0.0 + '@angular/core': ~11.0.0 + '@angular/forms': ~11.0.0 + '@angular/language-service': ~11.0.0 + '@angular/platform-browser': ~11.0.0 + '@angular/platform-browser-dynamic': ~11.0.0 + '@angular/router': ~11.0.0 '@commitlint/cli': ^11.0.0 '@commitlint/config-angular': ^11.0.0 '@commitlint/config-conventional': ^11.0.0 @@ -15023,20 +15166,20 @@ specifiers: '@ngrx/schematics': ^10.1.2 '@ngrx/store': ^10.1.2 '@ngrx/store-devtools': ^10.1.2 - '@nrwl/angular': 11.1.1 - '@nrwl/cli': 11.1.1 - '@nrwl/cypress': 11.1.1 - '@nrwl/devkit': 11.0.20 - '@nrwl/eslint-plugin-nx': 11.1.1 - '@nrwl/jest': 11.1.1 - '@nrwl/node': 11.1.1 - '@nrwl/nx-cloud': 11.0.1 - '@nrwl/nx-plugin': 11.1.1 - '@nrwl/tao': 11.1.1 - '@nrwl/workspace': 11.1.1 + '@nrwl/angular': 11.2.0-beta.1 + '@nrwl/cli': 11.2.0-beta.1 + '@nrwl/cypress': 11.2.0-beta.1 + '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/eslint-plugin-nx': 11.2.0-beta.1 + '@nrwl/jest': 11.2.0-beta.1 + '@nrwl/node': 11.2.0-beta.1 + '@nrwl/nx-cloud': 11.0.2 + '@nrwl/nx-plugin': 11.2.0-beta.1 + '@nrwl/tao': 11.2.0-beta.1 + '@nrwl/workspace': 11.2.0-beta.1 '@types/jest': 26.0.8 - '@types/luxon': ^1.25.0 - '@types/node': 12.12.38 + '@types/luxon': ^1.25.1 + '@types/node': 12.12.33 '@typescript-eslint/eslint-plugin': 4.3.0 '@typescript-eslint/parser': 4.3.0 all-contributors-cli: ^6.19.0 @@ -15046,21 +15189,21 @@ specifiers: eslint-config-prettier: 6.0.0 eslint-plugin-cypress: ^2.11.2 eslint-plugin-import: ^2.22.1 - eslint-plugin-jsdoc: ^30.7.13 + eslint-plugin-jsdoc: ^31.3.3 eslint-plugin-prefer-arrow: ^1.2.2 git-cz: ^4.7.6 - husky: ^4.3.7 + husky: ^4.3.8 jest: 26.2.2 - jest-preset-angular: 8.3.1 + jest-preset-angular: 8.3.2 jest-serial-runner: ^1.1.0 json: ^10.0.0 lint-staged: ^10.5.3 luxon: ^1.25.0 - ng-packagr: ^11.0.3 + ng-packagr: ~11.1.2 prettier: 2.1.2 - rxjs: ~6.5.5 - ts-jest: 26.4.0 + rxjs: ~6.6.3 + ts-jest: 26.4.4 ts-node: ~9.1.1 tslib: ^2.1.0 typescript: ~4.0.5 - zone.js: ^0.10.3 + zone.js: ^0.11.3 From 1cc8fd2d8f4fef24000d8c4a7418414f15ae1e43 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Mon, 25 Jan 2021 21:43:50 +0100 Subject: [PATCH 107/113] refactor: remove PNPM e2e CI fix --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 1 - e2e/angular-e2e/tests/use-incremental-build.spec.ts | 1 - packages/internal/e2e-util/src/index.ts | 1 - .../src/lib/fix-pnpm-install-in-ci-pipeline.ts | 11 ----------- 4 files changed, 14 deletions(-) delete mode 100644 packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index bfa1e7a..9a35eb9 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -13,7 +13,6 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular', 'ng-packagr']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - // fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { ['@nrwl/angular']: '11.2.0-beta.1', diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index b9d7c4d..f65ce03 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -5,7 +5,6 @@ describe('@nxworker/angular:use-incremental-build generator e2e', () => { beforeAll(() => { copyNodeModules(['@nrwl/angular']); ensureNxProject('@nxworker/angular', 'dist/packages/angular'); - // fixPnpmInstallInCiPipeline(); addPackages({ devDependencies: { ['@nrwl/angular']: '11.2.0-beta.1', diff --git a/packages/internal/e2e-util/src/index.ts b/packages/internal/e2e-util/src/index.ts index 9daaca7..07ffdd5 100644 --- a/packages/internal/e2e-util/src/index.ts +++ b/packages/internal/e2e-util/src/index.ts @@ -1,4 +1,3 @@ export * from './lib/add-packages'; -export * from './lib/fix-pnpm-install-in-ci-pipeline'; export * from './lib/update-json-file'; export * from './lib/use-default-base-branch'; diff --git a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts b/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts deleted file mode 100644 index 7efc300..0000000 --- a/packages/internal/e2e-util/src/lib/fix-pnpm-install-in-ci-pipeline.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { updateFile } from '@nrwl/nx-plugin/testing'; - -/** - * Fixes a `pnpm install` issue in CI pipelines because the `--frozen-lockfile` - * parameter is enabled when the environment has `CI=true`. - * - * NOTE! Must be called in a `beforeEach` hook. - */ -export function fixPnpmInstallInCiPipeline() { - updateFile('.npmrc', 'prefer-frozen-lockfile=false'); -} From ca34232a031763ff25aec8fee3d36cad1fdd23e8 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 29 Jan 2021 00:51:55 +0100 Subject: [PATCH 108/113] chore: update Nx --- package.json | 22 +++--- pnpm-lock.yaml | 184 +++++++++++++++++++++---------------------------- 2 files changed, 91 insertions(+), 115 deletions(-) diff --git a/package.json b/package.json index 13a17f3..c399076 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@ngrx/entity": "^10.1.2", "@ngrx/router-store": "^10.1.2", "@ngrx/store": "^10.1.2", - "@nrwl/angular": "11.2.0-beta.1", + "@nrwl/angular": "11.2.0-rc.2", "luxon": "^1.25.0", "rxjs": "~6.6.3", "tslib": "^2.1.0", @@ -67,16 +67,16 @@ "@commitlint/config-conventional": "^11.0.0", "@ngrx/schematics": "^10.1.2", "@ngrx/store-devtools": "^10.1.2", - "@nrwl/cli": "11.2.0-beta.1", - "@nrwl/cypress": "11.2.0-beta.1", - "@nrwl/devkit": "11.2.0-beta.1", - "@nrwl/eslint-plugin-nx": "11.2.0-beta.1", - "@nrwl/jest": "11.2.0-beta.1", - "@nrwl/node": "11.2.0-beta.1", - "@nrwl/nx-cloud": "11.0.2", - "@nrwl/nx-plugin": "11.2.0-beta.1", - "@nrwl/tao": "11.2.0-beta.1", - "@nrwl/workspace": "11.2.0-beta.1", + "@nrwl/cli": "11.2.0-rc.2", + "@nrwl/cypress": "11.2.0-rc.2", + "@nrwl/devkit": "11.2.0-rc.2", + "@nrwl/eslint-plugin-nx": "11.2.0-rc.2", + "@nrwl/jest": "11.2.0-rc.2", + "@nrwl/node": "11.2.0-rc.2", + "@nrwl/nx-cloud": "11.1.2", + "@nrwl/nx-plugin": "11.2.0-rc.2", + "@nrwl/tao": "11.2.0-rc.2", + "@nrwl/workspace": "11.2.0-rc.2", "@types/jest": "26.0.8", "@types/luxon": "^1.25.1", "@types/node": "12.12.33", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e113072..efd7bbc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,7 +11,7 @@ dependencies: '@ngrx/entity': 10.1.2_c9984c2d5dfead750ae4944108f89915 '@ngrx/router-store': 10.1.2_4d6084dfa1bb34253ddd107c7f0fa925 '@ngrx/store': 10.1.2_@angular+core@11.0.9+rxjs@6.6.3 - '@nrwl/angular': 11.2.0-beta.1_d6b0abbe2edd0c42ac81d0710b1f1fa8 + '@nrwl/angular': 11.2.0-rc.2_d6b0abbe2edd0c42ac81d0710b1f1fa8 luxon: 1.25.0 rxjs: 6.6.3 tslib: 2.1.0 @@ -29,16 +29,16 @@ devDependencies: '@commitlint/config-conventional': 11.0.0 '@ngrx/schematics': 10.1.2_rxjs@6.6.3+zone.js@0.11.3 '@ngrx/store-devtools': 10.1.2_@ngrx+store@10.1.2+rxjs@6.6.3 - '@nrwl/cli': 11.2.0-beta.1 - '@nrwl/cypress': 11.2.0-beta.1_cypress@5.6.0+typescript@4.0.5 - '@nrwl/devkit': 11.2.0-beta.1 - '@nrwl/eslint-plugin-nx': 11.2.0-beta.1_0a641c819e3f5e2d27a85327fbf21101 - '@nrwl/jest': 11.2.0-beta.1 - '@nrwl/node': 11.2.0-beta.1_typescript@4.0.5 - '@nrwl/nx-cloud': 11.0.2 - '@nrwl/nx-plugin': 11.2.0-beta.1_typescript@4.0.5 - '@nrwl/tao': 11.2.0-beta.1 - '@nrwl/workspace': 11.2.0-beta.1_prettier@2.1.2 + '@nrwl/cli': 11.2.0-rc.2 + '@nrwl/cypress': 11.2.0-rc.2_cypress@5.6.0+typescript@4.0.5 + '@nrwl/devkit': 11.2.0-rc.2 + '@nrwl/eslint-plugin-nx': 11.2.0-rc.2_0a641c819e3f5e2d27a85327fbf21101 + '@nrwl/jest': 11.2.0-rc.2 + '@nrwl/node': 11.2.0-rc.2_typescript@4.0.5 + '@nrwl/nx-cloud': 11.1.2 + '@nrwl/nx-plugin': 11.2.0-rc.2_typescript@4.0.5 + '@nrwl/tao': 11.2.0-rc.2 + '@nrwl/workspace': 11.2.0-rc.2_prettier@2.1.2 '@types/jest': 26.0.8 '@types/luxon': 1.25.1 '@types/node': 12.12.33 @@ -226,20 +226,6 @@ packages: webpack-dev-server: ^3.1.4 resolution: integrity: sha512-/6Hudd1hs/GMHX4C/Qk7jueIMNg8NKFJWDEbvMPMgDzTqUIa680PTD6SNSCcY5Cz9mEpdpYCZo5N31JB7dlpOg== - /@angular-devkit/core/11.0.0: - dependencies: - ajv: 6.12.6 - fast-json-stable-stringify: 2.1.0 - magic-string: 0.25.7 - rxjs: 6.6.3 - source-map: 0.7.3 - dev: true - engines: - node: '>= 10.13.0' - npm: '>= 6.11.0' - yarn: '>= 1.13.0' - resolution: - integrity: sha512-fXZtSs3J4S12hboi3om1FA+QS0e8nuQMyzl2nkmtuhcELUFMmSrEl36dtCni5e7Svs46BUAZ5w8EazIkgGQDJg== /@angular-devkit/core/11.0.7: dependencies: ajv: 6.12.6 @@ -253,18 +239,6 @@ packages: yarn: '>= 1.13.0' resolution: integrity: sha512-1GKnIT++YSUHpzzRx9QC0+8yOw4wy+ZpiJVDlroPSeK4FGrTCJqJKenkfRjVFRFOSrzTiJds+IU6kI4+bFbw9g== - /@angular-devkit/schematics/11.0.0: - dependencies: - '@angular-devkit/core': 11.0.0 - ora: 5.1.0 - rxjs: 6.6.3 - dev: true - engines: - node: '>= 10.13.0' - npm: '>= 6.11.0' - yarn: '>= 1.13.0' - resolution: - integrity: sha512-oCz9E0thA5WdGDuv6biu3X5kw5/vNE4ZZOKT2sHBQMpAuuDYrDpfTYQJjXQtjfXWvmlr8L8aqDD9N4HXsE4Esw== /@angular-devkit/schematics/11.0.7: dependencies: '@angular-devkit/core': 11.0.7 @@ -2824,13 +2798,13 @@ packages: node: '>=10' resolution: integrity: sha512-Iv2iq0JuyYjKeFkSR4LPaCdDZwlGK9X2cP/01nJcp3yMJ1FjNd9vpiEYvLUgzBxKPg2SFmaOhizoQsPc0LWeOQ== - /@nrwl/angular/11.2.0-beta.1_d6b0abbe2edd0c42ac81d0710b1f1fa8: + /@nrwl/angular/11.2.0-rc.2_d6b0abbe2edd0c42ac81d0710b1f1fa8: dependencies: '@angular-devkit/schematics': 11.0.7 - '@nrwl/cypress': 11.2.0-beta.1_cypress@5.6.0+typescript@4.0.5 - '@nrwl/devkit': 11.2.0-beta.1 - '@nrwl/jest': 11.2.0-beta.1 - '@nrwl/linter': 11.2.0-beta.1 + '@nrwl/cypress': 11.2.0-rc.2_cypress@5.6.0+typescript@4.0.5 + '@nrwl/devkit': 11.2.0-rc.2 + '@nrwl/jest': 11.2.0-rc.2 + '@nrwl/linter': 11.2.0-rc.2 '@schematics/angular': 11.0.7 jasmine-marbles: 0.6.0_rxjs@6.6.3 tslib: 2.1.0 @@ -2840,10 +2814,10 @@ packages: rxjs: '*' typescript: '*' resolution: - integrity: sha512-1SXxxpM/krNHTC9aoaGfSlDstGSKMzAUAQ2C/gDMpz5tKDYf7Qh5J8ySI7N5A5QhDdVYDxTNMnjGgETaKV4rOw== - /@nrwl/cli/11.2.0-beta.1: + integrity: sha512-qTn3ubknOGV+Rwcal7TnDV+vOi1ZuKEoYjbhw5a0aey3qzwWUU+uKr4+3Oc+B0fX5SzTzyAiOkHBLsdIdbqIqw== + /@nrwl/cli/11.2.0-rc.2: dependencies: - '@nrwl/tao': 11.2.0-beta.1 + '@nrwl/tao': 11.2.0-rc.2 chalk: 4.1.0 tmp: 0.0.33 yargs: 15.4.1 @@ -2851,14 +2825,14 @@ packages: dev: true hasBin: true resolution: - integrity: sha512-nH7iFHSEfG+laCjfuS30npFMA4/TyDN6Z9I4uKL7YeM2MIVQx/pw+2P+VVwDCbVK5bJTX6bkkOlYMlsmXXNQUQ== - /@nrwl/cypress/11.2.0-beta.1_cypress@5.6.0+typescript@4.0.5: + integrity: sha512-UuFcwZLH+spKEZkGER4KL2Ff1oLPJhkWEkA3nlbZ97/GlnEejSxoKL79SNsK/M0fl1xf+qiq+0L1lMZQXvlU4A== + /@nrwl/cypress/11.2.0-rc.2_cypress@5.6.0+typescript@4.0.5: dependencies: '@angular-devkit/architect': 0.1100.7 '@angular-devkit/core': 11.0.7 '@angular-devkit/schematics': 11.0.7 '@cypress/webpack-preprocessor': 4.1.5 - '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/devkit': 11.2.0-rc.2 cypress: 5.6.0 fork-ts-checker-webpack-plugin: 3.1.1 fs-extra: 7.0.1 @@ -2873,20 +2847,20 @@ packages: cypress: '>= 3 < 7' typescript: '*' resolution: - integrity: sha512-0jTyCAqBmYDq1SiPp54mh9r9JleiPXYhwecF/34fNFzog3dwb+EI80XNUZvKI1vaEEkt6Fr3IrEe2m0gLnsJzA== - /@nrwl/devkit/11.2.0-beta.1: + integrity: sha512-64lhgnUcn/rj8V1f1slX5yxogKiLqU7jtdfH+YQzwWckjhEujzZo7QxYrw0MJnhOQo8FNifP1/IzOGkZtVCJJg== + /@nrwl/devkit/11.2.0-rc.2: dependencies: - '@nrwl/tao': 11.2.0-beta.1 + '@nrwl/tao': 11.2.0-rc.2 ejs: 3.1.5 ignore: 5.1.8 semver: 6.3.0 strip-json-comments: 2.0.1 tslib: 2.1.0 resolution: - integrity: sha512-uvGofzQLgEr975ZY3QpNg71Ja/+NSV+WPIZNWuBPTGTugBln73uRIWRdAfjDPl0BNvelA1CJboiqBaTibuWkHQ== - /@nrwl/eslint-plugin-nx/11.2.0-beta.1_0a641c819e3f5e2d27a85327fbf21101: + integrity: sha512-MYheiE97psI58ihcaxLDDeriJW2n1/t1RliCo0j1YVpItIWUOdN5wSiwM1ZOA7w+oHd9nrNpaDeji4Tpsgr1Jg== + /@nrwl/eslint-plugin-nx/11.2.0-rc.2_0a641c819e3f5e2d27a85327fbf21101: dependencies: - '@angular-devkit/core': 11.0.7 + '@nrwl/devkit': 11.2.0-rc.2 '@typescript-eslint/experimental-utils': 4.14.1_eslint@7.10.0+typescript@4.0.5 '@typescript-eslint/parser': 4.3.0_eslint@7.10.0+typescript@4.0.5 confusing-browser-globals: 1.0.10 @@ -2896,37 +2870,33 @@ packages: eslint: '*' typescript: '*' resolution: - integrity: sha512-uJTvkAFnOLRjjVjHB8ZL9TFsbxmoyKmT37HnmCtlv0cLvSwp7WRhBXp8Z13sUGMa5ytcKbTloZ90sHCrYwCcaQ== - /@nrwl/jest/11.2.0-beta.1: + integrity: sha512-EgZfN1J5+7FW0Z6TvCxQLh3v55E86r5PshCd3miuoF5Eiu1kGOfwQ0Bbd7qJL4s6fCZgqVlxj6y+rU285Qv3Sg== + /@nrwl/jest/11.2.0-rc.2: dependencies: - '@angular-devkit/architect': 0.1100.7 - '@angular-devkit/core': 11.0.7 - '@angular-devkit/schematics': 11.0.7 - '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/devkit': 11.2.0-rc.2 jest-resolve: 26.6.2 rxjs: 6.6.3 strip-json-comments: 2.0.1 tslib: 2.1.0 resolution: - integrity: sha512-yPzUoYMCBIVU6+qivJhR17w+rm0ESFdCaPN1rJsa7RXXq0yLTIkW22F9aStLPrBpaG2ScwZ8yWkpJnHK0cy1AA== - /@nrwl/linter/11.2.0-beta.1: + integrity: sha512-APRIZZEjJ2yx03Llw0W6uJJ9hLWn9t53zJcQE4rZeP7cveW18z00XIM85D9H7VhihTxcvmSMWj6ylz7cB09UIg== + /@nrwl/linter/11.2.0-rc.2: dependencies: - '@angular-devkit/architect': 0.1100.7 - '@nrwl/devkit': 11.2.0-beta.1 + '@nrwl/devkit': 11.2.0-rc.2 glob: 7.1.4 minimatch: 3.0.4 tslib: 2.1.0 resolution: - integrity: sha512-5FQa+vo5UyWa0U04etr+r3ICcWd6beauTTwNO0N8GgFs7QjN5n8wZ5+DIHKkUM1XloaM7iMtN5STatDPlVGb4g== - /@nrwl/node/11.2.0-beta.1_typescript@4.0.5: + integrity: sha512-yrsRcjcilu38WYt5rpC+9nL5tjyoPc+t0RM/33goH9xe77iWTGYetjkx0X+swIn2R2uEh7NecTfJu0Nj+UwQ1w== + /@nrwl/node/11.2.0-rc.2_typescript@4.0.5: dependencies: '@angular-devkit/architect': 0.1100.7 '@angular-devkit/build-webpack': 0.1100.7_f17e7dc3686dc4072a83e169fb8b83a8 '@angular-devkit/core': 11.0.7 '@angular-devkit/schematics': 11.0.7 - '@nrwl/devkit': 11.2.0-beta.1 - '@nrwl/jest': 11.2.0-beta.1 - '@nrwl/linter': 11.2.0-beta.1 + '@nrwl/devkit': 11.2.0-rc.2 + '@nrwl/jest': 11.2.0-rc.2 + '@nrwl/linter': 11.2.0-rc.2 circular-dependency-plugin: 5.2.0_webpack@4.42.0 copy-webpack-plugin: 6.0.3_webpack@4.42.0 fork-ts-checker-webpack-plugin: 3.1.1 @@ -2947,10 +2917,9 @@ packages: peerDependencies: typescript: '*' resolution: - integrity: sha512-tGSNaf82Fjg2g0willju2CHQIwz26ismm24uwR+bPOhahIEbbX6BIgP9z8GPmZwoYrQPHHmOWGR4fkPG4A3A5w== - /@nrwl/nx-cloud/11.0.2: + integrity: sha512-rVGVrC3PzNLHvCY/RY8NVQnZPE9rprrt2Z1TufUyHRB7umaBlJwbIVovQTV5oyIBIz2DCTBiPI/T898iFfNSVg== + /@nrwl/nx-cloud/11.1.2: dependencies: - '@angular-devkit/schematics': 11.0.0 axios: 0.21.1 chalk: 4.1.0 node-machine-id: 1.1.12 @@ -2959,15 +2928,15 @@ packages: uuid: 3.4.0 dev: true resolution: - integrity: sha512-3X/mGGVPN//8ZZw+HqRdMbQcwQF0wwamq0cl5fmwtXmzsxNgAunaU3wGVsK5JXcbGxkQqKWu/0k+pyGjUaKrAA== - /@nrwl/nx-plugin/11.2.0-beta.1_typescript@4.0.5: + integrity: sha512-e2rtUBodOG1CtZSj93p7LT34Q6tPR97o55LT1jNzLUaNlJJKT+eObpoNR10D6OBFMbKDEkHwDN8Z08ov8N0nlQ== + /@nrwl/nx-plugin/11.2.0-rc.2_typescript@4.0.5: dependencies: '@angular-devkit/architect': 0.1100.7 '@angular-devkit/core': 11.0.7 '@angular-devkit/schematics': 11.0.7 - '@nrwl/devkit': 11.2.0-beta.1 - '@nrwl/linter': 11.2.0-beta.1 - '@nrwl/node': 11.2.0-beta.1_typescript@4.0.5 + '@nrwl/devkit': 11.2.0-rc.2 + '@nrwl/linter': 11.2.0-rc.2 + '@nrwl/node': 11.2.0-rc.2_typescript@4.0.5 fs-extra: 7.0.1 inquirer: 6.5.2 rxjs: 6.6.3 @@ -2978,12 +2947,9 @@ packages: peerDependencies: typescript: '*' resolution: - integrity: sha512-W3wkldLuxrW4/Z/DQb+57CKHWujyQU5WwXFvO/yldKe6MhIfTeb7Pzuf6D3p6HA2BHiA2WsdlRS7Zl7hOnw6uw== - /@nrwl/tao/11.2.0-beta.1: + integrity: sha512-N/b9QgBzPswYzRHI+QghsvLLHEzaUAo2CHV8s1KkVhqtFhFCzp2uKiMyKYkevG5CYqakCmHWMeZk0TBGEcx+gA== + /@nrwl/tao/11.2.0-rc.2: dependencies: - '@angular-devkit/architect': 0.1100.7 - '@angular-devkit/core': 11.0.7 - '@angular-devkit/schematics': 11.0.7 chalk: 4.1.0 fs-extra: 7.0.1 inquirer: 6.5.2 @@ -2997,16 +2963,13 @@ packages: yargs-parser: 20.0.0 hasBin: true resolution: - integrity: sha512-2Dszk3SzIW6qCX79fBn9P3Iq5m8WrGXkxok3jt7ZBU+lm+dmHVTJ+0nOKJLvV+gOsYubRKexFx1C8hy0Ufd2pA== - /@nrwl/workspace/11.2.0-beta.1_prettier@2.1.2: + integrity: sha512-6z2uKY/stTUa76PMI+fLnlX67DAB278++U2GmIeqDN7NDkKU0iggMritOvj6m8Mt9WZ10iQ48nB5Ge2X397gjA== + /@nrwl/workspace/11.2.0-rc.2_prettier@2.1.2: dependencies: - '@angular-devkit/architect': 0.1100.7 - '@angular-devkit/core': 11.0.7 - '@angular-devkit/schematics': 11.0.7 - '@nrwl/cli': 11.2.0-beta.1 - '@nrwl/devkit': 11.2.0-beta.1 - '@nrwl/jest': 11.2.0-beta.1 - '@nrwl/linter': 11.2.0-beta.1 + '@nrwl/cli': 11.2.0-rc.2 + '@nrwl/devkit': 11.2.0-rc.2 + '@nrwl/jest': 11.2.0-rc.2 + '@nrwl/linter': 11.2.0-rc.2 axios: 0.21.1 chalk: 4.1.0 cosmiconfig: 4.0.0 @@ -3032,7 +2995,7 @@ packages: peerDependencies: prettier: ^2.0.4 resolution: - integrity: sha512-LYHk1GHp0IlCjIfzUf2S7YBhPaSGpKE9mvUIfet2XMqj33yatFJ90HemdQEFHdEEhnTK/q1cjG/6L+nE8JJH5A== + integrity: sha512-m92QjoWE3QSQL+X1XhCuRPqznbuITFlWs/j8Ran3YbPjsgffLBVcrbXXH25YOZxucAVSWvP5BeUXzOlTBKzjGA== /@rollup/plugin-commonjs/17.0.0_rollup@2.38.0: dependencies: '@rollup/pluginutils': 3.1.0_rollup@2.38.0 @@ -7179,6 +7142,19 @@ packages: optional: true resolution: integrity: sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== + /follow-redirects/1.13.1_debug@4.3.1: + dependencies: + debug: 4.3.1_supports-color@6.1.0 + dev: true + engines: + node: '>=4.0' + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + resolution: + integrity: sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== /for-each/0.3.3: dependencies: is-callable: 1.2.2 @@ -7771,7 +7747,7 @@ packages: /http-proxy/1.18.1_debug@4.3.1: dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.13.1 + follow-redirects: 1.13.1_debug@4.3.1 requires-port: 1.0.0 dev: true engines: @@ -15166,17 +15142,17 @@ specifiers: '@ngrx/schematics': ^10.1.2 '@ngrx/store': ^10.1.2 '@ngrx/store-devtools': ^10.1.2 - '@nrwl/angular': 11.2.0-beta.1 - '@nrwl/cli': 11.2.0-beta.1 - '@nrwl/cypress': 11.2.0-beta.1 - '@nrwl/devkit': 11.2.0-beta.1 - '@nrwl/eslint-plugin-nx': 11.2.0-beta.1 - '@nrwl/jest': 11.2.0-beta.1 - '@nrwl/node': 11.2.0-beta.1 - '@nrwl/nx-cloud': 11.0.2 - '@nrwl/nx-plugin': 11.2.0-beta.1 - '@nrwl/tao': 11.2.0-beta.1 - '@nrwl/workspace': 11.2.0-beta.1 + '@nrwl/angular': 11.2.0-rc.2 + '@nrwl/cli': 11.2.0-rc.2 + '@nrwl/cypress': 11.2.0-rc.2 + '@nrwl/devkit': 11.2.0-rc.2 + '@nrwl/eslint-plugin-nx': 11.2.0-rc.2 + '@nrwl/jest': 11.2.0-rc.2 + '@nrwl/node': 11.2.0-rc.2 + '@nrwl/nx-cloud': 11.1.2 + '@nrwl/nx-plugin': 11.2.0-rc.2 + '@nrwl/tao': 11.2.0-rc.2 + '@nrwl/workspace': 11.2.0-rc.2 '@types/jest': 26.0.8 '@types/luxon': ^1.25.1 '@types/node': 12.12.33 From 237916ee16f7f5f46b4fd04c3ca7b77911afadfb Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 29 Jan 2021 00:59:28 +0100 Subject: [PATCH 109/113] test(angular): update Nx requirements in e2e tests --- e2e/angular-e2e/tests/convert-to-buildable.spec.ts | 2 +- e2e/angular-e2e/tests/use-incremental-build.spec.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts index 9a35eb9..a03ecfe 100644 --- a/e2e/angular-e2e/tests/convert-to-buildable.spec.ts +++ b/e2e/angular-e2e/tests/convert-to-buildable.spec.ts @@ -15,7 +15,7 @@ describe('@nxworker/angular:convert-to-buildable generator e2e', () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); addPackages({ devDependencies: { - ['@nrwl/angular']: '11.2.0-beta.1', + ['@nrwl/angular']: '^11.2.0 || >=11.2.0-rc.2', }, }); }); diff --git a/e2e/angular-e2e/tests/use-incremental-build.spec.ts b/e2e/angular-e2e/tests/use-incremental-build.spec.ts index f65ce03..5587647 100644 --- a/e2e/angular-e2e/tests/use-incremental-build.spec.ts +++ b/e2e/angular-e2e/tests/use-incremental-build.spec.ts @@ -1,5 +1,11 @@ import { addPackages, useDefaultBaseBranch } from '@internal/e2e-util'; -import { copyNodeModules, ensureNxProject, runCommandAsync, runNxCommandAsync, uniq } from '@nrwl/nx-plugin/testing'; +import { + copyNodeModules, + ensureNxProject, + runCommandAsync, + runNxCommandAsync, + uniq, +} from '@nrwl/nx-plugin/testing'; describe('@nxworker/angular:use-incremental-build generator e2e', () => { beforeAll(() => { @@ -7,7 +13,7 @@ describe('@nxworker/angular:use-incremental-build generator e2e', () => { ensureNxProject('@nxworker/angular', 'dist/packages/angular'); addPackages({ devDependencies: { - ['@nrwl/angular']: '11.2.0-beta.1', + ['@nrwl/angular']: '^11.2.0 || >=11.2.0-rc.2', }, }); useDefaultBaseBranch('main'); From 2ed1f7ae882d60c7d76b63c04ed124e2287ababe Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Fri, 29 Jan 2021 01:10:12 +0100 Subject: [PATCH 110/113] style: refer disabled code to PR --- .../update-application-build-target.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts index 3b7036e..de9cf67 100644 --- a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts +++ b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts @@ -47,6 +47,7 @@ export function updateApplicationBuildTarget( executor: incrementalBuildExecutor, options: { ...(buildTarget.options ?? {}), + // guarded by schema, see https://github.com/nrwl/nx/pull/4548 // parallel: true, // withDeps: true, }, From 48346f322f112fb4bcb955b7c8238e443f7eb641 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 30 Jan 2021 02:15:59 +0100 Subject: [PATCH 111/113] fix(angular): fix writeJson --- .../generators/update-build-scripts/util/write-json.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts index 3afc472..88e3485 100644 --- a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts +++ b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/util/write-json.ts @@ -6,5 +6,5 @@ export function writeJson( mapper: (json: TJson) => TJson ): void { const json = readJson(host, file); - host.write('package.json', JSON.stringify(mapper(json), null, 2)); + host.write(file, JSON.stringify(mapper(json), null, 2)); } From 9bcd4ca430b2a1aabab6953cdc6c1c7b139e2bc5 Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 30 Jan 2021 02:16:38 +0100 Subject: [PATCH 112/113] test(angular): cover updateApplicationBuildTarget --- .../executors.ts | 3 + .../update-application-build-target.spec.ts | 137 ++++++++++++++++++ .../update-application-build-target.ts | 16 +- 3 files changed, 145 insertions(+), 11 deletions(-) create mode 100644 packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/executors.ts create mode 100644 packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.spec.ts diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/executors.ts b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/executors.ts new file mode 100644 index 0000000..9a30287 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/executors.ts @@ -0,0 +1,3 @@ +export const defaultAngularBuildExecutor = + '@angular-devkit/build-angular:browser'; +export const incrementalBuildExecutor = '@nrwl/angular:webpack-browser'; diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.spec.ts b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.spec.ts new file mode 100644 index 0000000..229b231 --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.spec.ts @@ -0,0 +1,137 @@ +// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries +import { addAngularApplication, createProjectName } from '@internal/test-util'; +import { readProjectConfiguration, TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; + +import { NormalizedSchema, normalizeOptions } from '../../util'; +import { incrementalBuildExecutor } from './executors'; +import { updateApplicationBuildTarget } from './update-application-build-target'; + +function readBuildTarget( + host: Tree, + projectName: string +): TargetConfiguration | undefined { + return readProjectConfiguration(host, projectName).targets.build; +} + +function removeBuildTarget(host: Tree, projectName: string): void { + const project = readProjectConfiguration(host, projectName); + + delete project.targets.build; + + updateProjectConfiguration(host, projectName, project); +} + +function useBuildExecutor( + executor: string, + host: Tree, + projectName: string +): void { + const project = readProjectConfiguration(host, projectName); + + project.targets.build = { + executor: incrementalBuildExecutor, + }; + + updateProjectConfiguration(host, projectName, project); +} + +describe(updateApplicationBuildTarget.name, () => { + beforeEach(() => { + host = createTreeWithEmptyWorkspace(); + const name = 'feature-seat-listing'; + const directory = 'seatmap'; + projectName = createProjectName({ + directory, + name, + }); + addAngularApplication(host, { + directory, + name, + }); + options = normalizeOptions(host, { + project: projectName, + }); + }); + + let host: Tree; + let options: NormalizedSchema; + let projectName: string; + + it('configures the incremental build executor when the application configuration is valid', () => { + const initialBuildTarget = readBuildTarget(host, projectName); + const expectedBuildTarget: TargetConfiguration = { + ...initialBuildTarget, + executor: '@nrwl/angular:webpack-browser', + }; + + updateApplicationBuildTarget(host, options); + + const actualBuildTarget = readBuildTarget(host, projectName); + expect(actualBuildTarget).toEqual(expectedBuildTarget); + }); + + describe('when the application configuration has no build target', () => { + beforeEach(() => { + removeBuildTarget(host, projectName); + options = normalizeOptions(host, { + project: projectName, + }); + }); + + it('does not add a build target', () => { + updateApplicationBuildTarget(host, options); + + const actualBuildTarget = readBuildTarget(host, projectName); + expect(actualBuildTarget).toBeUndefined(); + }); + + it('outputs a warning', () => { + const warnSpy = spyOn(console, 'warn'); + + updateApplicationBuildTarget(host, options); + + expect(warnSpy).toHaveBeenCalledTimes(1); + const warnMessage = warnSpy.calls.mostRecent().args[0]; + expect(warnMessage).toContain('Skipping...'); + }); + }); + + describe('when the application uses incremental build', () => { + beforeEach(() => { + useBuildExecutor(incrementalBuildExecutor, host, projectName); + options = normalizeOptions(host, { + project: projectName, + }); + }); + + it('outputs an info message', () => { + const infoSpy = spyOn(console, 'info'); + + updateApplicationBuildTarget(host, options); + + expect(infoSpy).toHaveBeenCalledTimes(1); + const infoMessage = infoSpy.calls.mostRecent().args[0]; + expect(infoMessage).toContain('Skipping...'); + }); + }); + + describe('when the application uses an unknown build executor', () => { + beforeEach(() => { + useBuildExecutor('@test/executor:run', host, projectName); + options = normalizeOptions(host, { + project: projectName, + }); + }); + + it('outputs an error message', () => { + const infoSpy = spyOn(console, 'info'); + + updateApplicationBuildTarget(host, options); + + expect(infoSpy).toHaveBeenCalledTimes(1); + const infoMessage = infoSpy.calls.mostRecent().args[0]; + expect(infoMessage).toContain('Skipping...'); + }); + }); +}); diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts index de9cf67..bff9d7a 100644 --- a/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts +++ b/packages/angular/src/generators/use-incremental-build/generators/update-application-build-target/update-application-build-target.ts @@ -1,20 +1,14 @@ -import { - TargetConfiguration, - Tree, - updateProjectConfiguration, -} from '@nrwl/devkit'; +import { TargetConfiguration, Tree, updateProjectConfiguration } from '@nrwl/devkit'; import { NormalizedSchema } from '../../util'; - -const defaultAngularBuildExecutor = '@angular-devkit/build-angular:browser'; -const incrementalBuildExecutor = '@nrwl/angular:webpack-browser'; +import { defaultAngularBuildExecutor, incrementalBuildExecutor } from './executors'; export function updateApplicationBuildTarget( host: Tree, { projectConfiguration, projectName }: NormalizedSchema ): void { - const { targets: executionTargets } = projectConfiguration; - const { build: buildTarget } = executionTargets; + const { targets } = projectConfiguration; + const { build: buildTarget } = targets; if (!buildTarget) { console.warn( @@ -56,7 +50,7 @@ export function updateApplicationBuildTarget( updateProjectConfiguration(host, projectName, { ...projectConfiguration, targets: { - ...executionTargets, + ...targets, build: incrementalBuildTarget, }, }); From a53b9bf78dbc47e158d5bacb26ecd3e50719987c Mon Sep 17 00:00:00 2001 From: Lars Gyrup Brink Nielsen Date: Sat, 30 Jan 2021 02:34:37 +0100 Subject: [PATCH 113/113] test(angular): cover happy paths of updateBuildScripts --- .../update-build-scripts.spec.ts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.spec.ts diff --git a/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.spec.ts b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.spec.ts new file mode 100644 index 0000000..a690dcf --- /dev/null +++ b/packages/angular/src/generators/use-incremental-build/generators/update-build-scripts/update-build-scripts.spec.ts @@ -0,0 +1,38 @@ +import { readJson, Tree } from '@nrwl/devkit'; +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import { WorkspaceRootPackageJson } from 'packages/angular/src/file-types'; + +import { updateBuildScripts } from './update-build-scripts'; + +function readScript(scriptName: string, host: Tree): string { + const { scripts = {} } = readJson( + host, + 'package.json' + ); + + return scripts[scriptName]; +} + +describe(updateBuildScripts.name, () => { + beforeEach(() => { + host = createTreeWithEmptyWorkspace(); + }); + + let host: Tree; + + it('adds incremental build parameters to the affected:build script', () => { + updateBuildScripts(host); + + const affectedBuildScript = readScript('affected:build', host); + expect(affectedBuildScript).toBe( + 'nx affected:build --with-deps --parallel' + ); + }); + + it('adds incremental build parameters to the build script', () => { + updateBuildScripts(host); + + const affectedBuildScript = readScript('build', host); + expect(affectedBuildScript).toBe('nx build --with-deps --parallel'); + }); +});