@fluentui/bundle-size
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Thu, 12 May 2022 07:41:39 GMT", | ||
"date": "Wed, 28 Sep 2022 07:36:56 GMT", | ||
"tag": "@fluentui/bundle-size_v1.1.7", | ||
"version": "1.1.7", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"author": "martinhochel@microsoft.com", | ||
"package": "@fluentui/bundle-size", | ||
"commit": "b7fc0c2998a2ed7584b6b7ca8a969b17793afd28", | ||
"comment": "fix: bump workspace-tools and add options to collectLocalReport api" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 12 May 2022 07:41:44 GMT", | ||
"tag": "@fluentui/bundle-size_v1.1.6", | ||
@@ -8,0 +23,0 @@ "version": "1.1.6", |
# Change Log - @fluentui/bundle-size | ||
This log was last generated on Thu, 12 May 2022 07:41:39 GMT and should not be manually modified. | ||
This log was last generated on Wed, 28 Sep 2022 07:36:56 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [1.1.7](https://github.com/microsoft/fluentui/tree/@fluentui/bundle-size_v1.1.7) | ||
Wed, 28 Sep 2022 07:36:56 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/bundle-size_v1.1.6..@fluentui/bundle-size_v1.1.7) | ||
### Patches | ||
- fix: bump workspace-tools and add options to collectLocalReport api ([PR #24891](https://github.com/microsoft/fluentui/pull/24891) by martinhochel@microsoft.com) | ||
## [1.1.6](https://github.com/microsoft/fluentui/tree/@fluentui/bundle-size_v1.1.6) | ||
Thu, 12 May 2022 07:41:39 GMT | ||
Thu, 12 May 2022 07:41:44 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/bundle-size_v1.1.5..@fluentui/bundle-size_v1.1.6) | ||
@@ -11,0 +20,0 @@ |
{ | ||
"name": "@fluentui/bundle-size", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"bin": { | ||
@@ -26,3 +26,3 @@ "bundle-size": "./bin/bundle-size.js" | ||
"webpack": "^5.21.2", | ||
"workspace-tools": "^0.16.2", | ||
"workspace-tools": "^0.27.0", | ||
"ci-info": "^3.2.0", | ||
@@ -29,0 +29,0 @@ "node-fetch": "^2.6.1", |
@@ -42,11 +42,16 @@ const fs = require('fs').promises; | ||
const collectLocalReportDefaultOptions = { | ||
root: /** @type {string | undefined} */ (undefined), | ||
reportFilesGlob: 'packages/**/dist/bundle-size/bundle-size.json', | ||
}; | ||
/** | ||
* Collects all reports for packages to a single one. | ||
* | ||
* @param {Partial<typeof collectLocalReportDefaultOptions>} options | ||
* @return {Promise<BundleSizeReport>} | ||
*/ | ||
async function collectLocalReport() { | ||
/** @type {string[]} */ | ||
const reportFiles = glob.sync('packages/**/dist/bundle-size/bundle-size.json', { | ||
cwd: /** @type {string} */ (findGitRoot(process.cwd())), | ||
async function collectLocalReport(options = {}) { | ||
const { reportFilesGlob, root = findGitRoot(process.cwd()) } = { ...collectLocalReportDefaultOptions, ...options }; | ||
const reportFiles = glob.sync(reportFilesGlob, { | ||
cwd: root, | ||
}); | ||
@@ -53,0 +58,0 @@ |
@@ -19,5 +19,2 @@ const fs = require('fs').promises; | ||
/** | ||
* @return {string} | ||
*/ | ||
function mkPackagesDir() { | ||
@@ -32,6 +29,3 @@ const projectDir = tmp.dirSync({ prefix: 'collectLocalReport', unsafeCleanup: true }); | ||
// is required as root directory is determined based on Git project | ||
tmp.dirSync({ dir: projectDir.name, name: '.git', unsafeCleanup: true }); | ||
return packagesDir.name; | ||
return { packagesDir: packagesDir.name, rootDir: projectDir.name }; | ||
} | ||
@@ -58,3 +52,3 @@ | ||
it('aggregates all local reports to a single one', async () => { | ||
const packagesDir = mkPackagesDir(); | ||
const { packagesDir, rootDir } = mkPackagesDir(); | ||
@@ -81,3 +75,3 @@ const reportAPath = mkReportDir(tmp.dirSync({ dir: packagesDir, name: 'package-a', unsafeCleanup: true }).name); | ||
expect(await collectLocalReport()).toMatchInlineSnapshot(` | ||
expect(await collectLocalReport({ root: rootDir })).toMatchInlineSnapshot(` | ||
Array [ | ||
@@ -117,3 +111,3 @@ Object { | ||
it('throws an error if a report file contains invalid JSON', async () => { | ||
const packagesDir = mkPackagesDir(); | ||
const { packagesDir, rootDir } = mkPackagesDir(); | ||
@@ -135,4 +129,4 @@ const reportAPath = mkReportDir(tmp.dirSync({ dir: packagesDir, name: 'package-a', unsafeCleanup: true }).name); | ||
await expect(collectLocalReport()).rejects.toThrow(/Failed to read JSON/); | ||
await expect(collectLocalReport({ root: rootDir })).rejects.toThrow(/Failed to read JSON/); | ||
}); | ||
}); |
@@ -37,3 +37,3 @@ const fs = require('fs').promises; | ||
const config = await readConfig(); | ||
const config = await readConfig(true); | ||
@@ -44,3 +44,3 @@ expect(config.webpack({})).toEqual({ foo: 'bar' }); | ||
it('should return default webpack config if no config file defined', async () => { | ||
const config = await readConfig(); | ||
const config = await readConfig(true); | ||
@@ -54,5 +54,5 @@ expect(config.webpack({})).toEqual({}); | ||
await setup(`module.exports = { webpack: (config) => config }`); | ||
const firstConfig = await readConfig(); | ||
const firstConfig = await readConfig(true); | ||
await setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`); | ||
const config = await readConfig(); | ||
const config = await readConfig(true); | ||
@@ -67,3 +67,3 @@ expect(firstConfig).toBe(config); | ||
await setup(`module.exports = { webpack: (config) => { config.foo = 'bar'; return config; } }`, nesting); | ||
const config = await readConfig(); | ||
const config = await readConfig(true); | ||
@@ -70,0 +70,0 @@ expect(config.webpack({})).toEqual({ foo: 'bar' }); |
69008
1693
+ Addedgit-up@7.0.0(transitive)
+ Addedgit-url-parse@13.1.1(transitive)
+ Addedparse-path@7.0.0(transitive)
+ Addedparse-url@8.1.0(transitive)
+ Addedworkspace-tools@0.27.0(transitive)
- Removed@types/minimatch@3.0.5(transitive)
- Removedarr-diff@4.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedarray-differ@3.0.0(transitive)
- Removedarray-unique@0.3.2(transitive)
- Removedarrify@2.0.1(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedat-least-node@1.0.0(transitive)
- Removedatob@2.1.2(transitive)
- Removedbase@0.11.2(transitive)
- Removedbraces@2.3.2(transitive)
- Removedcache-base@1.0.1(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedclass-utils@0.3.6(transitive)
- Removedcollection-visit@1.0.0(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedcopy-descriptor@0.1.1(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-property@0.2.51.0.02.0.2(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedexpand-brackets@2.1.4(transitive)
- Removedextend-shallow@2.0.13.0.2(transitive)
- Removedextglob@2.0.4(transitive)
- Removedfill-range@4.0.0(transitive)
- Removedfilter-obj@1.1.0(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedfind-yarn-workspace-root@1.2.1(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfragment-cache@0.2.1(transitive)
- Removedfs-extra@4.0.39.1.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedget-value@2.0.6(transitive)
- Removedgit-up@4.0.5(transitive)
- Removedgit-url-parse@11.6.0(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-value@0.3.11.0.0(transitive)
- Removedhas-values@0.1.41.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-descriptor@0.1.71.0.3(transitive)
- Removedis-extendable@0.1.11.0.1(transitive)
- Removedis-number@3.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisobject@2.1.03.0.1(transitive)
- Removedjsonfile@4.0.06.1.0(transitive)
- Removedkind-of@3.2.24.0.06.0.3(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmap-visit@1.0.0(transitive)
- Removedmicromatch@3.1.10(transitive)
- Removedmixin-deep@1.3.2(transitive)
- Removedms@2.0.0(transitive)
- Removedmultimatch@4.0.0(transitive)
- Removednanomatch@1.2.13(transitive)
- Removednormalize-url@6.1.0(transitive)
- Removedobject-copy@0.1.0(transitive)
- Removedobject-inspect@1.13.1(transitive)
- Removedobject-visit@1.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedparse-path@4.0.4(transitive)
- Removedparse-url@6.0.5(transitive)
- Removedpascalcase@0.1.1(transitive)
- Removedposix-character-classes@0.1.1(transitive)
- Removedprotocols@1.4.8(transitive)
- Removedqs@6.12.1(transitive)
- Removedquery-string@6.14.1(transitive)
- Removedread-yaml-file@2.1.0(transitive)
- Removedregex-not@1.0.2(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedret@0.1.15(transitive)
- Removedsafe-regex@1.1.0(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-value@2.0.1(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedsnapdragon@0.8.2(transitive)
- Removedsnapdragon-node@2.1.1(transitive)
- Removedsnapdragon-util@3.0.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedsplit-on-first@1.1.0(transitive)
- Removedsplit-string@3.1.0(transitive)
- Removedstatic-extend@0.1.2(transitive)
- Removedstrict-uri-encode@2.0.0(transitive)
- Removedstrip-bom@4.0.0(transitive)
- Removedto-object-path@0.3.0(transitive)
- Removedto-regex@3.0.2(transitive)
- Removedto-regex-range@2.1.1(transitive)
- Removedunion-value@1.0.1(transitive)
- Removeduniversalify@0.1.22.0.1(transitive)
- Removedunset-value@1.0.0(transitive)
- Removedurix@0.1.0(transitive)
- Removeduse@3.1.1(transitive)
- Removedworkspace-tools@0.16.2(transitive)
Updatedworkspace-tools@^0.27.0