@ms-cloudpack/common-types 0.6.2 → 0.7.1

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.
@@ -19,13 +19,13 @@ export interface PackageSettings {
19
19
  /**
20
20
  * The dependencies which should be included when computing the import map. This is primarily used when
21
21
  * devDependencies are needed by the app. This often happens when a library has a demo app which relies
22
- * on devDependencies. Accepts `devDependencies` as a special value to include all devDependencies.
22
+ * on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies.
23
23
  */
24
24
  includedDependencies?: string[];
25
25
  /**
26
26
  * The dependencies which should be ignored by Cloudpack verbs. For example, if "react-native" is a dependency
27
27
  * which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.
28
- * Accepts `peerDependencies` as a special value to exclude all peerDependencies.
28
+ * Accepts `$peerDependencies` as a special value to exclude all peerDependencies.
29
29
  */
30
30
  excludedDependencies?: string[];
31
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJsonExports } from './PackageJson.js';\n\n/**\n * Settings which apply to a single package (app or library) as it pertains to the Cloudpack start experience.\n */\nexport interface PackageSettings {\n /**\n * A match to indicate the target for the settings to be applied to.\n */\n match:\n | {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. \"\\@scope/*\").\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n */\n version?: string;\n }\n // Match can be a string, which is a shortcut for the name.\n | string;\n\n /**\n * The dependencies which should be included when computing the import map. This is primarily used when\n * devDependencies are needed by the app. This often happens when a library has a demo app which relies\n * on devDependencies. Accepts `devDependencies` as a special value to include all devDependencies.\n */\n includedDependencies?: string[];\n\n /**\n * The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency\n * which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.\n * Accepts `peerDependencies` as a special value to exclude all peerDependencies.\n */\n excludedDependencies?: string[];\n\n /**\n * Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for libraries which\n * are small and don't need to be loaded separately, or ones which have issues being resolved by the browser.\n */\n inlinedDependencies?: string[];\n\n /**\n * The exports map that should be used for this package, ignoring entries which are defined in the original\n * package.json. This is useful for libraries which have a missing or broken exports map, or when we want to\n * trim the exports to reduce the api surface we expose to the inner loop experience.\n */\n exports?: PackageJsonExports;\n\n /**\n * Forces the package to be bundled using a specific bundler.\n */\n bundlerType?: string;\n\n /**\n * Options to pass to the bundler.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults to `[/src/**, *.json]` and excludes node_modules.\n * Use `...` to include the default paths.\n */\n inputPaths?: string[];\n\n /**\n * Controls the behavior of the `verifyExports` feature when checking consumed exports from this package:\n * - If true, don't check this package's exports at all.\n * - If an object, this is a mapping from package import paths to export names to ignore. Examples:\n * - To ignore top-level exports: `{ \".\": [\"badName\"] }`\n * - To ignore exports from another path: `{ \"./lib/foo\": [\"badName\"] }`\n */\n ignoreMissingExports?: boolean | Record<string, string[]>;\n\n /**\n * Only relevant for packages bundled with rollup: globs of files that include dynamic (async)\n * imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to\n * that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)).\n * Files matching `*.dynamic.*` are automatically included.\n *\n * This is not needed for ori/esbuild and webpack because they should handle these types of imports automatically.\n */\n dynamicImports?: string[];\n\n /**\n * Ignore these warning messages from the bundler (partial string matches).\n * This is intended for non-actionable messages from external dependencies which can't easily\n * be fixed, to avoid confusing users.\n */\n ignoredBundlerWarnings?: string[];\n}\n"]}
1
+ {"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJsonExports } from './PackageJson.js';\n\n/**\n * Settings which apply to a single package (app or library) as it pertains to the Cloudpack start experience.\n */\nexport interface PackageSettings {\n /**\n * A match to indicate the target for the settings to be applied to.\n */\n match:\n | {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. \"\\@scope/*\").\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n */\n version?: string;\n }\n // Match can be a string, which is a shortcut for the name.\n | string;\n\n /**\n * The dependencies which should be included when computing the import map. This is primarily used when\n * devDependencies are needed by the app. This often happens when a library has a demo app which relies\n * on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies.\n */\n includedDependencies?: string[];\n\n /**\n * The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency\n * which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.\n * Accepts `$peerDependencies` as a special value to exclude all peerDependencies.\n */\n excludedDependencies?: string[];\n\n /**\n * Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for libraries which\n * are small and don't need to be loaded separately, or ones which have issues being resolved by the browser.\n */\n inlinedDependencies?: string[];\n\n /**\n * The exports map that should be used for this package, ignoring entries which are defined in the original\n * package.json. This is useful for libraries which have a missing or broken exports map, or when we want to\n * trim the exports to reduce the api surface we expose to the inner loop experience.\n */\n exports?: PackageJsonExports;\n\n /**\n * Forces the package to be bundled using a specific bundler.\n */\n bundlerType?: string;\n\n /**\n * Options to pass to the bundler.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults to `[/src/**, *.json]` and excludes node_modules.\n * Use `...` to include the default paths.\n */\n inputPaths?: string[];\n\n /**\n * Controls the behavior of the `verifyExports` feature when checking consumed exports from this package:\n * - If true, don't check this package's exports at all.\n * - If an object, this is a mapping from package import paths to export names to ignore. Examples:\n * - To ignore top-level exports: `{ \".\": [\"badName\"] }`\n * - To ignore exports from another path: `{ \"./lib/foo\": [\"badName\"] }`\n */\n ignoreMissingExports?: boolean | Record<string, string[]>;\n\n /**\n * Only relevant for packages bundled with rollup: globs of files that include dynamic (async)\n * imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to\n * that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)).\n * Files matching `*.dynamic.*` are automatically included.\n *\n * This is not needed for ori/esbuild and webpack because they should handle these types of imports automatically.\n */\n dynamicImports?: string[];\n\n /**\n * Ignore these warning messages from the bundler (partial string matches).\n * This is intended for non-actionable messages from external dependencies which can't easily\n * be fixed, to avoid confusing users.\n */\n ignoredBundlerWarnings?: string[];\n}\n"]}
@@ -23,6 +23,7 @@ export declare const allFeatures: {
23
23
  useSingleWebServer: Feature;
24
24
  /** Enables the verification of exports during init. */
25
25
  verifyExports: Feature;
26
+ removeUnusedExports: Feature;
26
27
  /** Automatically updates the generated config when an unknown import path is used during start. */
27
28
  autoUpdateEntries: Feature;
28
29
  /** Enables the syncing of internal packages. */
@@ -1 +1 @@
1
- {"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;IAGtB,2DAA2D;;IAG3D,sEAAsE;;IAGtE,6FAA6F;;IAK7F;;;OAGG;;IAMH,kEAAkE;;IAGlE,sCAAsC;;IAGtC,2DAA2D;;IAG3D,uDAAuD;;IAGvD,mGAAmG;;IAKnG,gDAAgD;;CAEjD,CAAC"}
1
+ {"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;IAGtB,2DAA2D;;IAG3D,sEAAsE;;IAGtE,6FAA6F;;IAK7F;;;OAGG;;IAMH,kEAAkE;;IAGlE,sCAAsC;;IAGtC,2DAA2D;;IAG3D,uDAAuD;;;IASvD,mGAAmG;;IAKnG,gDAAgD;;CAEjD,CAAC"}
@@ -27,6 +27,10 @@ export const allFeatures = {
27
27
  useSingleWebServer: { description: 'Use a single server for both bundles and app assets.' },
28
28
  /** Enables the verification of exports during init. */
29
29
  verifyExports: { description: 'Enables the verification of exports during init.' },
30
+ /* When enabled, adds null entries in generated config for unused exports. */
31
+ removeUnusedExports: {
32
+ description: 'Creates null entries for unused exports in generated config so that they are not included when bundling.',
33
+ },
30
34
  /** Automatically updates the generated config when an unknown import path is used during start. */
31
35
  autoUpdateEntries: {
32
36
  description: 'Automatically updates the generated config when an unknown import path is used during start.',
@@ -1 +1 @@
1
- {"version":3,"file":"allFeatures.js","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,8FAA8F;IAE9F,2DAA2D;IAC3D,iBAAiB,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAa;IAErG,sEAAsE;IACtE,mBAAmB,EAAE,EAAE,WAAW,EAAE,iEAAiE,EAAa;IAElH,6FAA6F;IAC7F,sBAAsB,EAAE;QACtB,WAAW,EAAE,wFAAwF;KAC3F;IAEZ;;;OAGG;IACH,oBAAoB,EAAE;QACpB,WAAW,EACT,iKAAiK;KACzJ;IAEZ,kEAAkE;IAClE,oBAAoB,EAAE,EAAE,WAAW,EAAE,6DAA6D,EAAa;IAE/G,sCAAsC;IACtC,WAAW,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAa;IAE1E,2DAA2D;IAC3D,kBAAkB,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAa;IAEtG,uDAAuD;IACvD,aAAa,EAAE,EAAE,WAAW,EAAE,kDAAkD,EAAa;IAE7F,mGAAmG;IACnG,iBAAiB,EAAE;QACjB,WAAW,EAAE,8FAA8F;KACjG;IAEZ,gDAAgD;IAChD,oBAAoB,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAa;CAC9F,CAAC","sourcesContent":["import type { Feature } from './Feature.js';\n\n/**\n * A set of options for configuring the experience.\n * Features can be set to true to change the default behavior.\n */\nexport const allFeatures = {\n // The comments provide intellisense, and the description strings are used in the help output.\n\n /** Disables the generation of source-maps during build. */\n disableSourceMaps: { description: 'Disables the generation of source-maps during build.' } as Feature,\n\n /** Enables the preemptive enqueueing of dependencies during build. */\n enqueueDependencies: { description: 'Enables the preemptive enqueueing of dependencies during build.' } as Feature,\n\n /** Check for dynamic (async) imports with non-literal paths in bundle output during init. */\n evaluateDynamicImports: {\n description: 'Check for dynamic (async) imports with non-literal paths in bundle output during init.',\n } as Feature,\n\n /**\n * Excludes unused dependencies in the generated config during an init run.\n * This helps trim the dependency graph, reduce the import map, and speed up performance.\n */\n optimizeDependencies: {\n description:\n 'Excludes unused dependencies in the generated config during an init run. This helps trim the dependency graph, reduce the import map, and speed up performance.',\n } as Feature,\n\n /** Enables React Native type resolution of .web.ts extensions. */\n resolveWebExtensions: { description: 'Enables React Native type resolution of .web.ts extensions.' } as Feature,\n\n /** Enables the syncing of bundles. */\n syncBundles: { description: 'Enables the syncing of bundles.' } as Feature,\n\n /** Use a single server for both bundles and app assets. */\n useSingleWebServer: { description: 'Use a single server for both bundles and app assets.' } as Feature,\n\n /** Enables the verification of exports during init. */\n verifyExports: { description: 'Enables the verification of exports during init.' } as Feature,\n\n /** Automatically updates the generated config when an unknown import path is used during start. */\n autoUpdateEntries: {\n description: 'Automatically updates the generated config when an unknown import path is used during start.',\n } as Feature,\n\n /** Enables the syncing of internal packages. */\n syncInternalPackages: { description: 'Enables the syncing of internal packages.' } as Feature,\n};\n"]}
1
+ {"version":3,"file":"allFeatures.js","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,8FAA8F;IAE9F,2DAA2D;IAC3D,iBAAiB,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAa;IAErG,sEAAsE;IACtE,mBAAmB,EAAE,EAAE,WAAW,EAAE,iEAAiE,EAAa;IAElH,6FAA6F;IAC7F,sBAAsB,EAAE;QACtB,WAAW,EAAE,wFAAwF;KAC3F;IAEZ;;;OAGG;IACH,oBAAoB,EAAE;QACpB,WAAW,EACT,iKAAiK;KACzJ;IAEZ,kEAAkE;IAClE,oBAAoB,EAAE,EAAE,WAAW,EAAE,6DAA6D,EAAa;IAE/G,sCAAsC;IACtC,WAAW,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAa;IAE1E,2DAA2D;IAC3D,kBAAkB,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAa;IAEtG,uDAAuD;IACvD,aAAa,EAAE,EAAE,WAAW,EAAE,kDAAkD,EAAa;IAE7F,6EAA6E;IAC7E,mBAAmB,EAAE;QACnB,WAAW,EACT,0GAA0G;KAClG;IAEZ,mGAAmG;IACnG,iBAAiB,EAAE;QACjB,WAAW,EAAE,8FAA8F;KACjG;IAEZ,gDAAgD;IAChD,oBAAoB,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAa;CAC9F,CAAC","sourcesContent":["import type { Feature } from './Feature.js';\n\n/**\n * A set of options for configuring the experience.\n * Features can be set to true to change the default behavior.\n */\nexport const allFeatures = {\n // The comments provide intellisense, and the description strings are used in the help output.\n\n /** Disables the generation of source-maps during build. */\n disableSourceMaps: { description: 'Disables the generation of source-maps during build.' } as Feature,\n\n /** Enables the preemptive enqueueing of dependencies during build. */\n enqueueDependencies: { description: 'Enables the preemptive enqueueing of dependencies during build.' } as Feature,\n\n /** Check for dynamic (async) imports with non-literal paths in bundle output during init. */\n evaluateDynamicImports: {\n description: 'Check for dynamic (async) imports with non-literal paths in bundle output during init.',\n } as Feature,\n\n /**\n * Excludes unused dependencies in the generated config during an init run.\n * This helps trim the dependency graph, reduce the import map, and speed up performance.\n */\n optimizeDependencies: {\n description:\n 'Excludes unused dependencies in the generated config during an init run. This helps trim the dependency graph, reduce the import map, and speed up performance.',\n } as Feature,\n\n /** Enables React Native type resolution of .web.ts extensions. */\n resolveWebExtensions: { description: 'Enables React Native type resolution of .web.ts extensions.' } as Feature,\n\n /** Enables the syncing of bundles. */\n syncBundles: { description: 'Enables the syncing of bundles.' } as Feature,\n\n /** Use a single server for both bundles and app assets. */\n useSingleWebServer: { description: 'Use a single server for both bundles and app assets.' } as Feature,\n\n /** Enables the verification of exports during init. */\n verifyExports: { description: 'Enables the verification of exports during init.' } as Feature,\n\n /* When enabled, adds null entries in generated config for unused exports. */\n removeUnusedExports: {\n description:\n 'Creates null entries for unused exports in generated config so that they are not included when bundling.',\n } as Feature,\n\n /** Automatically updates the generated config when an unknown import path is used during start. */\n autoUpdateEntries: {\n description: 'Automatically updates the generated config when an unknown import path is used during start.',\n } as Feature,\n\n /** Enables the syncing of internal packages. */\n syncInternalPackages: { description: 'Enables the syncing of internal packages.' } as Feature,\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/common-types",
3
- "version": "0.6.2",
3
+ "version": "0.7.1",
4
4
  "description": "Common types for Cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -547,6 +547,9 @@
547
547
  "verifyExports": {
548
548
  "type": "boolean"
549
549
  },
550
+ "removeUnusedExports": {
551
+ "type": "boolean"
552
+ },
550
553
  "autoUpdateEntries": {
551
554
  "type": "boolean"
552
555
  },
@@ -590,14 +593,14 @@
590
593
  "items": {
591
594
  "type": "string"
592
595
  },
593
- "description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies. Accepts `devDependencies` as a special value to include all devDependencies."
596
+ "description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies."
594
597
  },
595
598
  "excludedDependencies": {
596
599
  "type": "array",
597
600
  "items": {
598
601
  "type": "string"
599
602
  },
600
- "description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it. Accepts `peerDependencies` as a special value to exclude all peerDependencies."
603
+ "description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it. Accepts `$peerDependencies` as a special value to exclude all peerDependencies."
601
604
  },
602
605
  "inlinedDependencies": {
603
606
  "type": "array",
@@ -56,14 +56,14 @@
56
56
  "items": {
57
57
  "type": "string"
58
58
  },
59
- "description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies. Accepts `devDependencies` as a special value to include all devDependencies."
59
+ "description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies."
60
60
  },
61
61
  "excludedDependencies": {
62
62
  "type": "array",
63
63
  "items": {
64
64
  "type": "string"
65
65
  },
66
- "description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it. Accepts `peerDependencies` as a special value to exclude all peerDependencies."
66
+ "description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it. Accepts `$peerDependencies` as a special value to exclude all peerDependencies."
67
67
  },
68
68
  "inlinedDependencies": {
69
69
  "type": "array",
@@ -548,6 +548,9 @@
548
548
  "verifyExports": {
549
549
  "type": "boolean"
550
550
  },
551
+ "removeUnusedExports": {
552
+ "type": "boolean"
553
+ },
551
554
  "autoUpdateEntries": {
552
555
  "type": "boolean"
553
556
  },
@@ -591,14 +594,14 @@
591
594
  "items": {
592
595
  "type": "string"
593
596
  },
594
- "description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies. Accepts `devDependencies` as a special value to include all devDependencies."
597
+ "description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies."
595
598
  },
596
599
  "excludedDependencies": {
597
600
  "type": "array",
598
601
  "items": {
599
602
  "type": "string"
600
603
  },
601
- "description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it. Accepts `peerDependencies` as a special value to exclude all peerDependencies."
604
+ "description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it. Accepts `$peerDependencies` as a special value to exclude all peerDependencies."
602
605
  },
603
606
  "inlinedDependencies": {
604
607
  "type": "array",