@fluentui/bundle-size
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Thu, 21 Apr 2022 07:36:02 GMT", | ||
"date": "Thu, 12 May 2022 07:41:39 GMT", | ||
"tag": "@fluentui/bundle-size_v1.1.6", | ||
"version": "1.1.6", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"author": "olfedias@microsoft.com", | ||
"package": "@fluentui/bundle-size", | ||
"commit": "6cc697e86b48eddb8bdadd3bcff72594305c72de", | ||
"comment": "fix: update glob for collecting reports" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 21 Apr 2022 07:36:48 GMT", | ||
"tag": "@fluentui/bundle-size_v1.1.5", | ||
@@ -8,0 +23,0 @@ "version": "1.1.5", |
# Change Log - @fluentui/bundle-size | ||
This log was last generated on Thu, 21 Apr 2022 07:36:02 GMT and should not be manually modified. | ||
This log was last generated on Thu, 12 May 2022 07:41:39 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [1.1.6](https://github.com/microsoft/fluentui/tree/@fluentui/bundle-size_v1.1.6) | ||
Thu, 12 May 2022 07:41:39 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/bundle-size_v1.1.5..@fluentui/bundle-size_v1.1.6) | ||
### Patches | ||
- fix: update glob for collecting reports ([PR #22937](https://github.com/microsoft/fluentui/pull/22937) by olfedias@microsoft.com) | ||
## [1.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/bundle-size_v1.1.5) | ||
Thu, 21 Apr 2022 07:36:02 GMT | ||
Thu, 21 Apr 2022 07:36:48 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/bundle-size_v1.1.4..@fluentui/bundle-size_v1.1.5) | ||
@@ -11,0 +20,0 @@ |
{ | ||
"name": "@fluentui/bundle-size", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"bin": { | ||
@@ -5,0 +5,0 @@ "bundle-size": "./bin/bundle-size.js" |
@@ -49,3 +49,3 @@ const fs = require('fs').promises; | ||
/** @type {string[]} */ | ||
const reportFiles = glob.sync('packages/*/dist/bundle-size/bundle-size.json', { | ||
const reportFiles = glob.sync('packages/**/dist/bundle-size/bundle-size.json', { | ||
cwd: /** @type {string} */ (findGitRoot(process.cwd())), | ||
@@ -52,0 +52,0 @@ }); |
const fs = require('fs').promises; | ||
const path = require('path'); | ||
const process = require('process'); | ||
@@ -12,2 +13,3 @@ const tmp = require('tmp'); | ||
'packages/package-b/dist/bundle-size/bundle-size.json', | ||
'packages/components/package-c/dist/bundle-size/bundle-size.json', | ||
], | ||
@@ -25,2 +27,4 @@ })); | ||
tmp.dirSync({ dir: packagesDir.name, name: 'components', unsafeCleanup: true }); | ||
const spy = jest.spyOn(process, 'cwd'); | ||
@@ -58,2 +62,5 @@ spy.mockReturnValue(projectDir.name); | ||
const reportBPath = mkReportDir(tmp.dirSync({ dir: packagesDir, name: 'package-b', unsafeCleanup: true }).name); | ||
const reportCPath = mkReportDir( | ||
tmp.dirSync({ dir: path.resolve(packagesDir, 'components'), name: 'package-c', unsafeCleanup: true }).name, | ||
); | ||
@@ -67,5 +74,8 @@ /** @type {import('../utils/buildFixture').BuildResult[]} */ | ||
const reportB = [{ name: 'fixtureB', path: 'path/fixtureB.js', minifiedSize: 10, gzippedSize: 5 }]; | ||
/** @type {import('../utils/buildFixture').BuildResult[]} */ | ||
const reportC = [{ name: 'fixtureC', path: 'path/fixtureC.js', minifiedSize: 4, gzippedSize: 2 }]; | ||
await fs.writeFile(reportAPath, JSON.stringify(reportA)); | ||
await fs.writeFile(reportBPath, JSON.stringify(reportB)); | ||
await fs.writeFile(reportCPath, JSON.stringify(reportC)); | ||
@@ -95,2 +105,9 @@ expect(await collectLocalReport()).toMatchInlineSnapshot(` | ||
}, | ||
Object { | ||
"gzippedSize": 2, | ||
"minifiedSize": 4, | ||
"name": "fixtureC", | ||
"packageName": "package-c", | ||
"path": "path/fixtureC.js", | ||
}, | ||
] | ||
@@ -105,8 +122,14 @@ `); | ||
const reportBPath = mkReportDir(tmp.dirSync({ dir: packagesDir, name: 'package-b', unsafeCleanup: true }).name); | ||
const reportCPath = mkReportDir( | ||
tmp.dirSync({ dir: path.resolve(packagesDir, 'components'), name: 'package-c', unsafeCleanup: true }).name, | ||
); | ||
/** @type {import('../utils/buildFixture').BuildResult[]} */ | ||
const reportB = [{ name: 'fixtureB', path: 'path/fixtureB.js', minifiedSize: 10, gzippedSize: 5 }]; | ||
/** @type {import('../utils/buildFixture').BuildResult[]} */ | ||
const reportC = [{ name: 'fixtureC', path: 'path/fixtureC.js', minifiedSize: 4, gzippedSize: 2 }]; | ||
await fs.writeFile(reportAPath, '{ name: "fixture", }'); | ||
await fs.writeFile(reportBPath, JSON.stringify(reportB)); | ||
await fs.writeFile(reportCPath, JSON.stringify(reportC)); | ||
@@ -113,0 +136,0 @@ await expect(collectLocalReport()).rejects.toThrow(/Failed to read JSON/); |
67906
1678