@ms-cloudpack/config 0.33.28 → 0.33.29
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtInSettings.d.ts","sourceRoot":"","sources":["../../src/builtInSettings/builtInSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG/E,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAC7D;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,CAAC;CACnE;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqL1B,CAAC"}
|
|
@@ -71,6 +71,28 @@ export const builtInSettings = deepFreeze({
|
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
|
+
'html-dom-parser': {
|
|
75
|
+
'>=0 <6.0.0': {
|
|
76
|
+
// Old versions of this package are CJS,
|
|
77
|
+
// and newer versions have an ESM entry that imports CJS code with `require`.
|
|
78
|
+
// This causes the runtime issue "Dynamic require of {package} is not supported" when bundling with ori,
|
|
79
|
+
// so we need to use rollup instead.
|
|
80
|
+
packageSettings: {
|
|
81
|
+
bundler: 'rollup',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
'html-react-parser': {
|
|
86
|
+
// Old versions of this package are CJS,
|
|
87
|
+
// and newer versions have an ESM entry that imports CJS code with `require`.
|
|
88
|
+
// This causes the runtime issue "Dynamic require of {package} is not supported" when bundling with ori,
|
|
89
|
+
// so we need to use rollup instead.
|
|
90
|
+
'>=0 <6.0.0': {
|
|
91
|
+
packageSettings: {
|
|
92
|
+
bundler: 'rollup',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
74
96
|
htmlparser2: {
|
|
75
97
|
// Issue below starts in 8.0.1 and continues in 9
|
|
76
98
|
'^8.0.1 || ^9.0.0': {
|
|
@@ -122,6 +144,18 @@ export const builtInSettings = deepFreeze({
|
|
|
122
144
|
},
|
|
123
145
|
},
|
|
124
146
|
},
|
|
147
|
+
'style-to-object': {
|
|
148
|
+
// Old versions of this package are CJS,
|
|
149
|
+
// and newer versions have an ESM entry that imports CJS code with `require`.
|
|
150
|
+
// This causes the runtime issue "Dynamic require of {package} is not supported" when bundling with ori,
|
|
151
|
+
// so we need to use rollup instead.
|
|
152
|
+
'>=0 <2.0.0': {
|
|
153
|
+
// Package is
|
|
154
|
+
packageSettings: {
|
|
155
|
+
bundler: 'rollup',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
125
159
|
tslib: {
|
|
126
160
|
'>=0 <2.5.3': {
|
|
127
161
|
// Remove unneeded exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtInSettings.js","sourceRoot":"","sources":["../../src/builtInSettings/builtInSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAgB7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAMvC;IACA,uCAAuC,EAAE;QACvC,QAAQ,EAAE;YACR,mGAAmG;YACnG,sDAAsD;YACtD,wEAAwE;YACxE,WAAW,EAAE;gBACX,OAAO,EAAE,0CAA0C;aACpD;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ACP,GAAG,EAAE,YAAY;oBACjB,WAAW,EAAE,cAAc;iBAC5B;aACF;SACF;QACD,iBAAiB,EAAE;YACjB,oCAAoC;YACpC,yDAAyD;YACzD,WAAW,EAAE;gBACX,OAAO,EAAE,YAAY;aACtB;SACF;KACF;IAED,kBAAkB,EAAE;QAClB,QAAQ,EAAE;YACR,0BAA0B;YAC1B,2DAA2D;YAC3D,WAAW,EAAE;gBACX,OAAO,EAAE,sBAAsB;aAChC;SACF;KACF;IAED,KAAK,EAAE;QACL,YAAY,EAAE;YACZ,0BAA0B;YAC1B,oDAAoD;YACpD,WAAW,EAAE;gBACX,OAAO,EAAE,gBAAgB;aAC1B;SACF;QACD,QAAQ,EAAE;YACR,0BAA0B;YAC1B,oDAAoD;YACpD,WAAW,EAAE;gBACX,OAAO,EAAE,iBAAiB;aAC3B;SACF;KACF;IAED,wDAAwD;CACzD,CAAC,CAAC","sourcesContent":["import type { PackageJson, PackageSettings } from '@ms-cloudpack/common-types';\nimport { deepFreeze } from './deepFreeze.js';\n\nexport interface BuiltInSettings {\n /**\n * Package settings to automatically apply for this package name/version.\n * (These are merged by `getPackageSettings`, mostly as called by `createPackageSettingsTransform`.)\n */\n packageSettings?: Omit<PackageSettings, 'match' | 'exports'>;\n /**\n * package.json settings to automatically apply for this package name/version.\n * These **overwrite** original properties of the `package.json` and are applied by\n * `PackageDefinitions` using `createBuiltInSettingsTransform`.\n */\n packageJson?: Omit<PackageJson, 'name' | 'version' | 'cloudpack'>;\n}\n\n/**\n * Mapping from package name to version range to built-in settings.\n *\n * This object is frozen to prevent accidental modification.\n *\n * The reason we're handling package.json modifications (just `exports` as of writing) and\n * `PackageSettings` separately is mainly to get around issues with merging exports maps.\n * https://github.com/microsoft/cloudpack/pull/2452#discussion_r1835192676\n * (If the exports merging issue is fixed in the future, and we don't find any cases where we want\n * to override other package.json properties, they could potentially be combined and handled with\n * only package settings.)\n */\nexport const builtInSettings = deepFreeze<\n Partial<{\n [packageName: string]: {\n [versionRange: string]: BuiltInSettings;\n };\n }>\n>({\n '@microsoft/recognizers-text-date-time': {\n '^1.0.0': {\n // This has a \"browser\" entry which doesn't provide exports correctly in the browser when bundled??\n // Switching to the regular entry point makes it work.\n // https://unpkg.com/browse/@microsoft/recognizers-text-date-time@1.3.2/\n packageJson: {\n exports: './dist/recognizers-text-date-time.es5.js',\n },\n },\n },\n\n asap: {\n '^2.0.0': {\n // This package has different browser and non-browser versions in the \"browser\" field.\n // Trying to bundle it with rollup (which creates an ESM stub) gives this error:\n // [ESM stub generation] /<repo path>/node_modules/asap/browser-asap.js:10:33\n // Error creating stub for entry \"./browser-asap\":\n // TypeError: rawAsap.makeRequestCallFromTimer is not a function\n // It's not clear why this happens, but bundling this CJS package with ori works okay\n // since the package doesn't require() any dependencies.\n // https://unpkg.com/browse/asap@2.0.6/\n packageSettings: {\n bundler: 'ori',\n },\n },\n },\n\n brotli: {\n '^1.0.0': {\n // index.js also imports a compress entry point with a reference to nonexistent Browser global\n // https://unpkg.com/browse/brotli@1.3.3/\n packageJson: {\n exports: {\n './decompress.js': './decompress.js',\n },\n },\n },\n },\n\n bson: {\n '^5.0.0 || ^6.0.0': {\n // Package conditionally references \"crypto\", causing an error even though it's never used.\n // Bundle with rollup instead, and ignore the warning about the empty crypto stub.\n packageSettings: {\n bundler: 'rollup',\n ignoredBundlerWarnings: ['Generated an empty chunk: \"_polyfill-node.crypto\"'],\n },\n },\n },\n\n 'gql.tada': {\n '^1.0.0': {\n // This package has a combination of browser and CLI code.\n // Remove the dependencies and entries which aren't needed in the browser.\n // https://unpkg.com/browse/gql.tada@1.8.10/\n packageSettings: {\n excludedDependencies: ['@0no-co/graphqlsp', '@gql.tada/cli-utils', '@gql.tada/internal', 'typescript'],\n },\n packageJson: {\n exports: './dist/gql-tada.mjs',\n },\n },\n },\n\n htmlparser2: {\n // Issue below starts in 8.0.1 and continues in 9\n '^8.0.1 || ^9.0.0': {\n // This has an additional ./lib/WritableStream exports map entry which uses node stream\n // https://unpkg.com/browse/htmlparser2@9.1.0/\n packageJson: {\n exports: './lib/esm/index.js',\n },\n },\n },\n\n react: {\n '^16.14.0 || ^17.0.0': {\n // Package is missing an exports map\n // https://unpkg.com/browse/react@17/package.json\n packageJson: {\n exports: {\n '.': './index.js',\n './jsx-runtime': './jsx-runtime.js',\n './jsx-dev-runtime': './jsx-dev-runtime.js',\n },\n },\n },\n },\n\n scheduler: {\n '>=0 <0.21.0': {\n // Package is missing an exports map\n // https://unpkg.com/browse/scheduler@0.20.x/package.json\n packageJson: {\n exports: {\n '.': './index.js',\n './tracing': './tracing.js',\n },\n },\n },\n '>=0.21.0 <1.0.0': {\n // Package is missing an exports map\n // https://unpkg.com/browse/scheduler@0.21.0/package.json\n packageJson: {\n exports: './index.js',\n },\n },\n },\n\n 'socket.io-client': {\n '^4.4.1': {\n // Remove unneeded exports\n // https://unpkg.com/browse/socket.io-client@4/package.json\n packageJson: {\n exports: './build/esm/index.js',\n },\n },\n },\n\n tslib: {\n '>=0 <2.5.3': {\n // Remove unneeded exports\n // https://unpkg.com/browse/tslib@2.5.2/package.json\n packageJson: {\n exports: './tslib.es6.js',\n },\n },\n '^2.5.3': {\n // Remove unneeded exports\n // https://unpkg.com/browse/tslib@2.5.3/package.json\n packageJson: {\n exports: './tslib.es6.mjs',\n },\n },\n },\n\n // Please add new entries in alphabetical order by name!\n});\n"]}
|
|
1
|
+
{"version":3,"file":"builtInSettings.js","sourceRoot":"","sources":["../../src/builtInSettings/builtInSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAgB7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAMvC;IACA,uCAAuC,EAAE;QACvC,QAAQ,EAAE;YACR,mGAAmG;YACnG,sDAAsD;YACtD,wEAAwE;YACxE,WAAW,EAAE;gBACX,OAAO,EAAE,0CAA0C;aACpD;SACF;KACF;IAED,IAAI,EAAE;QACJ,QAAQ,EAA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rB,oCAAoC;YACpC,iDAAiD;YACjD,WAAW,EAAE;gBACX,OAAO,EAAE;oBACP,GAAG,EAAE,YAAY;oBACjB,eAAe,EAAE,kBAAkB;oBACnC,mBAAmB,EAAE,sBAAsB;iBAC5C;aACF;SACF;KACF;IAED,SAAS,EAAE;QACT,aAAa,EAAE;YACb,oCAAoC;YACpC,yDAAyD;YACzD,WAAW,EAAE;gBACX,OAAO,EAAE;oBACP,GAAG,EAAE,YAAY;oBACjB,WAAW,EAAE,cAAc;iBAC5B;aACF;SACF;QACD,iBAAiB,EAAE;YACjB,oCAAoC;YACpC,yDAAyD;YACzD,WAAW,EAAE;gBACX,OAAO,EAAE,YAAY;aACtB;SACF;KACF;IAED,kBAAkB,EAAE;QAClB,QAAQ,EAAE;YACR,0BAA0B;YAC1B,2DAA2D;YAC3D,WAAW,EAAE;gBACX,OAAO,EAAE,sBAAsB;aAChC;SACF;KACF;IAED,iBAAiB,EAAE;QACjB,wCAAwC;QACxC,6EAA6E;QAC7E,wGAAwG;QACxG,oCAAoC;QACpC,YAAY,EAAE;YACZ,aAAa;YACb,eAAe,EAAE;gBACf,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IAED,KAAK,EAAE;QACL,YAAY,EAAE;YACZ,0BAA0B;YAC1B,oDAAoD;YACpD,WAAW,EAAE;gBACX,OAAO,EAAE,gBAAgB;aAC1B;SACF;QACD,QAAQ,EAAE;YACR,0BAA0B;YAC1B,oDAAoD;YACpD,WAAW,EAAE;gBACX,OAAO,EAAE,iBAAiB;aAC3B;SACF;KACF;IAED,wDAAwD;CACzD,CAAC,CAAC","sourcesContent":["import type { PackageJson, PackageSettings } from '@ms-cloudpack/common-types';\nimport { deepFreeze } from './deepFreeze.js';\n\nexport interface BuiltInSettings {\n /**\n * Package settings to automatically apply for this package name/version.\n * (These are merged by `getPackageSettings`, mostly as called by `createPackageSettingsTransform`.)\n */\n packageSettings?: Omit<PackageSettings, 'match' | 'exports'>;\n /**\n * package.json settings to automatically apply for this package name/version.\n * These **overwrite** original properties of the `package.json` and are applied by\n * `PackageDefinitions` using `createBuiltInSettingsTransform`.\n */\n packageJson?: Omit<PackageJson, 'name' | 'version' | 'cloudpack'>;\n}\n\n/**\n * Mapping from package name to version range to built-in settings.\n *\n * This object is frozen to prevent accidental modification.\n *\n * The reason we're handling package.json modifications (just `exports` as of writing) and\n * `PackageSettings` separately is mainly to get around issues with merging exports maps.\n * https://github.com/microsoft/cloudpack/pull/2452#discussion_r1835192676\n * (If the exports merging issue is fixed in the future, and we don't find any cases where we want\n * to override other package.json properties, they could potentially be combined and handled with\n * only package settings.)\n */\nexport const builtInSettings = deepFreeze<\n Partial<{\n [packageName: string]: {\n [versionRange: string]: BuiltInSettings;\n };\n }>\n>({\n '@microsoft/recognizers-text-date-time': {\n '^1.0.0': {\n // This has a \"browser\" entry which doesn't provide exports correctly in the browser when bundled??\n // Switching to the regular entry point makes it work.\n // https://unpkg.com/browse/@microsoft/recognizers-text-date-time@1.3.2/\n packageJson: {\n exports: './dist/recognizers-text-date-time.es5.js',\n },\n },\n },\n\n asap: {\n '^2.0.0': {\n // This package has different browser and non-browser versions in the \"browser\" field.\n // Trying to bundle it with rollup (which creates an ESM stub) gives this error:\n // [ESM stub generation] /<repo path>/node_modules/asap/browser-asap.js:10:33\n // Error creating stub for entry \"./browser-asap\":\n // TypeError: rawAsap.makeRequestCallFromTimer is not a function\n // It's not clear why this happens, but bundling this CJS package with ori works okay\n // since the package doesn't require() any dependencies.\n // https://unpkg.com/browse/asap@2.0.6/\n packageSettings: {\n bundler: 'ori',\n },\n },\n },\n\n brotli: {\n '^1.0.0': {\n // index.js also imports a compress entry point with a reference to nonexistent Browser global\n // https://unpkg.com/browse/brotli@1.3.3/\n packageJson: {\n exports: {\n './decompress.js': './decompress.js',\n },\n },\n },\n },\n\n bson: {\n '^5.0.0 || ^6.0.0': {\n // Package conditionally references \"crypto\", causing an error even though it's never used.\n // Bundle with rollup instead, and ignore the warning about the empty crypto stub.\n packageSettings: {\n bundler: 'rollup',\n ignoredBundlerWarnings: ['Generated an empty chunk: \"_polyfill-node.crypto\"'],\n },\n },\n },\n\n 'gql.tada': {\n '^1.0.0': {\n // This package has a combination of browser and CLI code.\n // Remove the dependencies and entries which aren't needed in the browser.\n // https://unpkg.com/browse/gql.tada@1.8.10/\n packageSettings: {\n excludedDependencies: ['@0no-co/graphqlsp', '@gql.tada/cli-utils', '@gql.tada/internal', 'typescript'],\n },\n packageJson: {\n exports: './dist/gql-tada.mjs',\n },\n },\n },\n\n 'html-dom-parser': {\n '>=0 <6.0.0': {\n // Old versions of this package are CJS,\n // and newer versions have an ESM entry that imports CJS code with `require`.\n // This causes the runtime issue \"Dynamic require of {package} is not supported\" when bundling with ori,\n // so we need to use rollup instead.\n packageSettings: {\n bundler: 'rollup',\n },\n },\n },\n\n 'html-react-parser': {\n // Old versions of this package are CJS,\n // and newer versions have an ESM entry that imports CJS code with `require`.\n // This causes the runtime issue \"Dynamic require of {package} is not supported\" when bundling with ori,\n // so we need to use rollup instead.\n '>=0 <6.0.0': {\n packageSettings: {\n bundler: 'rollup',\n },\n },\n },\n\n htmlparser2: {\n // Issue below starts in 8.0.1 and continues in 9\n '^8.0.1 || ^9.0.0': {\n // This has an additional ./lib/WritableStream exports map entry which uses node stream\n // https://unpkg.com/browse/htmlparser2@9.1.0/\n packageJson: {\n exports: './lib/esm/index.js',\n },\n },\n },\n\n react: {\n '^16.14.0 || ^17.0.0': {\n // Package is missing an exports map\n // https://unpkg.com/browse/react@17/package.json\n packageJson: {\n exports: {\n '.': './index.js',\n './jsx-runtime': './jsx-runtime.js',\n './jsx-dev-runtime': './jsx-dev-runtime.js',\n },\n },\n },\n },\n\n scheduler: {\n '>=0 <0.21.0': {\n // Package is missing an exports map\n // https://unpkg.com/browse/scheduler@0.20.x/package.json\n packageJson: {\n exports: {\n '.': './index.js',\n './tracing': './tracing.js',\n },\n },\n },\n '>=0.21.0 <1.0.0': {\n // Package is missing an exports map\n // https://unpkg.com/browse/scheduler@0.21.0/package.json\n packageJson: {\n exports: './index.js',\n },\n },\n },\n\n 'socket.io-client': {\n '^4.4.1': {\n // Remove unneeded exports\n // https://unpkg.com/browse/socket.io-client@4/package.json\n packageJson: {\n exports: './build/esm/index.js',\n },\n },\n },\n\n 'style-to-object': {\n // Old versions of this package are CJS,\n // and newer versions have an ESM entry that imports CJS code with `require`.\n // This causes the runtime issue \"Dynamic require of {package} is not supported\" when bundling with ori,\n // so we need to use rollup instead.\n '>=0 <2.0.0': {\n // Package is\n packageSettings: {\n bundler: 'rollup',\n },\n },\n },\n\n tslib: {\n '>=0 <2.5.3': {\n // Remove unneeded exports\n // https://unpkg.com/browse/tslib@2.5.2/package.json\n packageJson: {\n exports: './tslib.es6.js',\n },\n },\n '^2.5.3': {\n // Remove unneeded exports\n // https://unpkg.com/browse/tslib@2.5.3/package.json\n packageJson: {\n exports: './tslib.es6.mjs',\n },\n },\n },\n\n // Please add new entries in alphabetical order by name!\n});\n"]}
|