ng-packagr 11.2.3 → 11.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,7 +75,7 @@ class NgPackage {
75
75
  const alwaysInclude = ['tslib'];
76
76
  // remove in the future, after deprecation phase
77
77
  const deprecatedPropList = this.whitelistedNonPeerDependencies;
78
- if (deprecatedPropList.length) {
78
+ if (deprecatedPropList === null || deprecatedPropList === void 0 ? void 0 : deprecatedPropList.length) {
79
79
  return Array.from(new Set([
80
80
  ...deprecatedPropList,
81
81
  ...alwaysInclude,
@@ -1 +1 @@
1
- {"version":3,"file":"package.js","sourceRoot":"","sources":["../../../src/lib/ng-package/package.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,SAAS;IACpB,YACmB,QAAgB;IACjC;;OAEG;IACa,OAAqB;IACrC;;OAEG;IACa,cAA8B,EAAE;QAR/B,aAAQ,GAAR,QAAQ,CAAQ;QAIjB,YAAO,GAAP,OAAO,CAAc;QAIrB,gBAAW,GAAX,WAAW,CAAqB;IAC/C,CAAC;IAEJ,wGAAwG;IACxG,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,sCAAsC;IACtC,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC7C,CAAC;IAED,4DAA4D;IAC5D,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,oBAAoB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAC5D,CAAC;IACD,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAW,8BAA8B;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAa,CAAC;IACzE,CAAC;IAED,IAAW,0BAA0B;QACnC,MAAM,aAAa,GAAG,CAAC,OAAO,CAAC,CAAC;QAEhC,gDAAgD;QAChD,MAAM,kBAAkB,GAAG,IAAI,CAAC,8BAA8B,CAAC;QAE/D,IAAG,kBAAkB,CAAC,MAAM,EAAE;YAC5B,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CAAC;gBACN,GAAG,kBAAkB;gBACrB,GAAG,aAAa;aACjB,CAAC,CACH,CAAC;SACH;QAED,MAAM,0BAA0B,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,CAAa,CAAC;QAE/F,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CAAC;YACN,GAAG,0BAA0B;YAC7B,GAAG,aAAa;SACjB,CAAC,CACH,CAAC;IACJ,CAAC;IAEO,uBAAuB,CAAC,GAAW;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEM,UAAU,CAAC,QAAgB;QAChC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;IAClG,CAAC;CACF;AA1ED,8BA0EC","sourcesContent":["import * as path from 'path';\nimport { NgEntryPoint } from './entry-point/entry-point';\n\n/**\n * A package being built. Quoting Angular Package Format, a package is:\n *\n * > the smallest set of files that are published to NPM and installed together, for example\n * > `@angular/core`. (..) The package is installed with `npm install @angular/core`.\n *\n * #### Package and Entry Points\n *\n * A package is composed of several (one or more) entry points.\n * A package must contain at least the primary entry point but can have many secondary entry\n * points.\n * The module ID of the primary entry point, e.g. `@angular/core`, matches the package name, e.g.\n * the package name is given to the command `npm install @angular/core`.\n * The source code files within a package are referenced by the entry points.\n *\n * #### Representation in the domain\n *\n * A _Package_ is reflected by `NgPackage`.\n * An _Entry Point_ is reflected by `NgEntryPoint`.\n * One `NgPackage` relates to one (or many) `NgEntryPoint`,\n * one `NgEntryPoint` relates to one `NgPackage`.\n *\n * #### Watch Out\n *\n * The user's configuration `ngPackage` suggests that it reflects a `NgPackage`.\n * However, the values given in the `lib` property reflect an `NgEntryPoint`.\n * In case the package contains only one entry point, `ngPackage.lib` reflects the primary entry\n * point.\n *\n * @link https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/edit#\n */\nexport class NgPackage {\n constructor(\n private readonly basePath: string,\n /**\n * A reference to the primary entry point.\n */\n public readonly primary: NgEntryPoint,\n /**\n * An array of secondary entry points.\n */\n public readonly secondaries: NgEntryPoint[] = [],\n ) {}\n\n /** Absolute path of the package's source folder, derived from the user's (primary) package location. */\n public get src(): string {\n return this.basePath;\n }\n\n /** Delete output path before build */\n public get deleteDestPath(): boolean {\n return this.primary.$get('deleteDestPath');\n }\n\n /** Absolute path of the package's destination directory. */\n public get dest(): string {\n return this.absolutePathFromPrimary('dest');\n }\n\n public get keepLifecycleScripts(): boolean {\n return this.primary.$get('keepLifecycleScripts') === true;\n }\n public get assets(): string[] {\n return this.primary.$get('assets');\n }\n\n /**\n * @deprecated Use allowedNonPeerDependencies instead.\n */\n public get whitelistedNonPeerDependencies(): string[] {\n return this.primary.$get('whitelistedNonPeerDependencies') as string[];\n }\n\n public get allowedNonPeerDependencies(): string[] {\n const alwaysInclude = ['tslib'];\n\n // remove in the future, after deprecation phase\n const deprecatedPropList = this.whitelistedNonPeerDependencies;\n\n if(deprecatedPropList.length) {\n return Array.from(\n new Set([\n ...deprecatedPropList,\n ...alwaysInclude,\n ])\n );\n }\n\n const allowedNonPeerDependencies = this.primary.$get('allowedNonPeerDependencies') as string[];\n \n return Array.from(\n new Set([\n ...allowedNonPeerDependencies,\n ...alwaysInclude,\n ])\n );\n }\n\n private absolutePathFromPrimary(key: string) {\n return path.resolve(this.basePath, this.primary.$get(key));\n }\n\n public entryPoint(moduleId: string): NgEntryPoint {\n return [this.primary, ...this.secondaries].find(entryPoint => entryPoint.moduleId === moduleId);\n }\n}\n"]}
1
+ {"version":3,"file":"package.js","sourceRoot":"","sources":["../../../src/lib/ng-package/package.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,SAAS;IACpB,YACmB,QAAgB;IACjC;;OAEG;IACa,OAAqB;IACrC;;OAEG;IACa,cAA8B,EAAE;QAR/B,aAAQ,GAAR,QAAQ,CAAQ;QAIjB,YAAO,GAAP,OAAO,CAAc;QAIrB,gBAAW,GAAX,WAAW,CAAqB;IAC/C,CAAC;IAEJ,wGAAwG;IACxG,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,sCAAsC;IACtC,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC7C,CAAC;IAED,4DAA4D;IAC5D,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,oBAAoB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAC5D,CAAC;IACD,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAW,8BAA8B;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAa,CAAC;IACzE,CAAC;IAED,IAAW,0BAA0B;QACnC,MAAM,aAAa,GAAG,CAAC,OAAO,CAAC,CAAC;QAEhC,gDAAgD;QAChD,MAAM,kBAAkB,GAAG,IAAI,CAAC,8BAA8B,CAAC;QAE/D,IAAG,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,EAAE;YAC7B,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CAAC;gBACN,GAAG,kBAAkB;gBACrB,GAAG,aAAa;aACjB,CAAC,CACH,CAAC;SACH;QAED,MAAM,0BAA0B,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,CAAa,CAAC;QAE/F,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CAAC;YACN,GAAG,0BAA0B;YAC7B,GAAG,aAAa;SACjB,CAAC,CACH,CAAC;IACJ,CAAC;IAEO,uBAAuB,CAAC,GAAW;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEM,UAAU,CAAC,QAAgB;QAChC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;IAClG,CAAC;CACF;AA1ED,8BA0EC","sourcesContent":["import * as path from 'path';\nimport { NgEntryPoint } from './entry-point/entry-point';\n\n/**\n * A package being built. Quoting Angular Package Format, a package is:\n *\n * > the smallest set of files that are published to NPM and installed together, for example\n * > `@angular/core`. (..) The package is installed with `npm install @angular/core`.\n *\n * #### Package and Entry Points\n *\n * A package is composed of several (one or more) entry points.\n * A package must contain at least the primary entry point but can have many secondary entry\n * points.\n * The module ID of the primary entry point, e.g. `@angular/core`, matches the package name, e.g.\n * the package name is given to the command `npm install @angular/core`.\n * The source code files within a package are referenced by the entry points.\n *\n * #### Representation in the domain\n *\n * A _Package_ is reflected by `NgPackage`.\n * An _Entry Point_ is reflected by `NgEntryPoint`.\n * One `NgPackage` relates to one (or many) `NgEntryPoint`,\n * one `NgEntryPoint` relates to one `NgPackage`.\n *\n * #### Watch Out\n *\n * The user's configuration `ngPackage` suggests that it reflects a `NgPackage`.\n * However, the values given in the `lib` property reflect an `NgEntryPoint`.\n * In case the package contains only one entry point, `ngPackage.lib` reflects the primary entry\n * point.\n *\n * @link https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/edit#\n */\nexport class NgPackage {\n constructor(\n private readonly basePath: string,\n /**\n * A reference to the primary entry point.\n */\n public readonly primary: NgEntryPoint,\n /**\n * An array of secondary entry points.\n */\n public readonly secondaries: NgEntryPoint[] = [],\n ) {}\n\n /** Absolute path of the package's source folder, derived from the user's (primary) package location. */\n public get src(): string {\n return this.basePath;\n }\n\n /** Delete output path before build */\n public get deleteDestPath(): boolean {\n return this.primary.$get('deleteDestPath');\n }\n\n /** Absolute path of the package's destination directory. */\n public get dest(): string {\n return this.absolutePathFromPrimary('dest');\n }\n\n public get keepLifecycleScripts(): boolean {\n return this.primary.$get('keepLifecycleScripts') === true;\n }\n public get assets(): string[] {\n return this.primary.$get('assets');\n }\n\n /**\n * @deprecated Use allowedNonPeerDependencies instead.\n */\n public get whitelistedNonPeerDependencies(): string[] {\n return this.primary.$get('whitelistedNonPeerDependencies') as string[];\n }\n\n public get allowedNonPeerDependencies(): string[] {\n const alwaysInclude = ['tslib'];\n\n // remove in the future, after deprecation phase\n const deprecatedPropList = this.whitelistedNonPeerDependencies;\n\n if(deprecatedPropList?.length) {\n return Array.from(\n new Set([\n ...deprecatedPropList,\n ...alwaysInclude,\n ])\n );\n }\n\n const allowedNonPeerDependencies = this.primary.$get('allowedNonPeerDependencies') as string[];\n \n return Array.from(\n new Set([\n ...allowedNonPeerDependencies,\n ...alwaysInclude,\n ])\n );\n }\n\n private absolutePathFromPrimary(key: string) {\n return path.resolve(this.basePath, this.primary.$get(key));\n }\n\n public entryPoint(moduleId: string): NgEntryPoint {\n return [this.primary, ...this.secondaries].find(entryPoint => entryPoint.moduleId === moduleId);\n }\n}\n"]}
@@ -37,8 +37,7 @@
37
37
  "type": "array",
38
38
  "items": {
39
39
  "type": "string"
40
- },
41
- "default": []
40
+ }
42
41
  },
43
42
  "assets": {
44
43
  "type": "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-packagr",
3
- "version": "11.2.3",
3
+ "version": "11.2.4",
4
4
  "description": "Compile and package Angular libraries in Angular Package Format (APF)",
5
5
  "keywords": [
6
6
  "apf",