Skip to content

Commit 0f317a8

Browse files
committed
chore: remove SizeAuditor task for @fluentui/react-components
1 parent 8ebf2d4 commit 0f317a8

File tree

3 files changed

+1
-109
lines changed

3 files changed

+1
-109
lines changed

apps/test-bundles/webpack.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const {
33
buildEntries,
44
buildEntry,
55
createWebpackConfig,
6-
createFluentConvergedFixtures,
76
createFluentNorthstarFixtures,
87
createFluentReactFixtures,
98
createEntry,
@@ -15,9 +14,6 @@ let entries;
1514
if (package === '@fluentui/react-northstar') {
1615
createFluentNorthstarFixtures();
1716
entries = buildEntries('@fluentui/react-northstar');
18-
} else if (package === '@fluentui/react-components') {
19-
createFluentConvergedFixtures();
20-
entries = buildEntries('@fluentui/react-components');
2117
} else if (package === '@fluentui/react') {
2218
createFluentReactFixtures();
2319
createEntry('@fluentui/keyboard-key');

apps/test-bundles/webpackUtils.js

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -98,64 +98,6 @@ function createFluentNorthstarFixtures() {
9898
});
9999
}
100100

101-
/**
102-
* Webpack will remove any unused import as a dead code (tree shaking).
103-
* Thus we are creating temporary JS files with top-level component imports
104-
* and console logging them. This will ensure that the code is active
105-
* and that webpack bundles it correctly.
106-
*/
107-
function createFluentConvergedFixtures() {
108-
const packageName = '@fluentui/react-components';
109-
110-
// Imports definition is temporary manual, we should find a better way and automate it
111-
const imports = [
112-
// components
113-
'Accordion',
114-
'Avatar',
115-
'Badge',
116-
'Button',
117-
'CompoundButton',
118-
'Divider',
119-
'Image',
120-
'Label',
121-
'Link',
122-
'Menu',
123-
'MenuButton',
124-
'Portal',
125-
'ToggleButton',
126-
'Tooltip',
127-
128-
// Provider-related
129-
'FluentProvider',
130-
'useFluent',
131-
132-
// themes
133-
'teamsLightTheme',
134-
'webLightTheme',
135-
136-
// makeStyles
137-
'mergeClasses',
138-
'makeStyles',
139-
'makeStaticStyles',
140-
'__styles',
141-
142-
// utils
143-
// 'usePopper',
144-
];
145-
146-
imports.forEach(importName => {
147-
const importStatement = `import { ${importName} } from '${packageName}'; console.log(${importName})`;
148-
try {
149-
const folderName = getFolderName(packageName);
150-
const entryPath = path.join(FIXTURE_PATH, folderName, `${importName}.js`);
151-
152-
fs.outputFileSync(entryPath, importStatement, 'utf-8');
153-
} catch (err) {
154-
console.log(err);
155-
}
156-
});
157-
}
158-
159101
// Files which should not be considered top-level entries.
160102
const TopLevelEntryFileExclusions = ['index.js', 'version.js', 'index.bundle.js'];
161103

@@ -238,7 +180,6 @@ function getFolderName(packageName) {
238180
module.exports = {
239181
buildEntries,
240182
buildEntry,
241-
createFluentConvergedFixtures,
242183
createFluentNorthstarFixtures,
243184
createFluentReactFixtures,
244185
createEntry,

azure-pipelines.bundlesize.yml

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -91,44 +91,6 @@ jobs:
9191

9292
- template: .devops/templates/cleanup.yml
9393

94-
- job: build_converged
95-
workspace:
96-
clean: all
97-
timeoutInMinutes: 75
98-
pool: 'Self Host Ubuntu'
99-
steps:
100-
- template: .devops/templates/tools.yml
101-
102-
- task: Bash@3
103-
inputs:
104-
filePath: yarn-ci.sh
105-
displayName: yarn
106-
107-
- script: yarn build --to @fluentui/react-components --no-cache
108-
displayName: yarn build to @fluentui/react-components
109-
110-
- script: yarn workspace test-bundles bundle:size
111-
displayName: yarn bundle test-bundles
112-
env:
113-
PACKAGE: '@fluentui/react-components'
114-
115-
- script: yarn bundlesizecollect
116-
displayName: 'Collate Bundle Size Information'
117-
118-
- task: PublishBuildArtifacts@1
119-
displayName: 'Publish Bundle Size information to Azure Dev Ops Artifacts'
120-
inputs:
121-
PathtoPublish: 'apps/test-bundles/dist/bundlesize.json'
122-
ArtifactName: bundlesize-converged
123-
124-
- task: PublishBuildArtifacts@1
125-
displayName: 'Publish Artifact dist folder upon build for debug'
126-
inputs:
127-
PathtoPublish: 'apps/test-bundles/dist'
128-
ArtifactName: distdrop-converged
129-
130-
- template: .devops/templates/cleanup.yml
131-
13294
- job: build_northstar
13395
workspace:
13496
clean: all
@@ -172,7 +134,6 @@ jobs:
172134
vmImage: 'windows-2019'
173135
dependsOn:
174136
- build_northstar
175-
- build_converged
176137
- build_react
177138
steps:
178139
- checkout: none
@@ -183,12 +144,6 @@ jobs:
183144
artifactName: 'bundlesize-react'
184145
targetPath: '$(Build.ArtifactStagingDirectory)/react'
185146

186-
- task: DownloadPipelineArtifact@2
187-
displayName: 'Download Pipeline Artifact: @fluentui/react-components'
188-
inputs:
189-
artifactName: 'bundlesize-converged'
190-
targetPath: '$(Build.ArtifactStagingDirectory)/react-converged'
191-
192147
- task: DownloadPipelineArtifact@2
193148
displayName: 'Download Pipeline Artifact: @fluentui/react-northstar'
194149
inputs:
@@ -198,7 +153,7 @@ jobs:
198153
- script: 'chocolatey install jq'
199154
displayName: 'Install jq'
200155

201-
- script: jq -c -s "reduce .[] as $item ({}; . * $item)" $(Build.ArtifactStagingDirectory)/react-converged/bundlesize.json $(Build.ArtifactStagingDirectory)/react-northstar/bundlesize.json $(Build.ArtifactStagingDirectory)/react/bundlesize.json > $(Build.ArtifactStagingDirectory)/bundlesizes.json
156+
- script: jq -c -s "reduce .[] as $item ({}; . * $item)" $(Build.ArtifactStagingDirectory)/react-northstar/bundlesize.json $(Build.ArtifactStagingDirectory)/react/bundlesize.json > $(Build.ArtifactStagingDirectory)/bundlesizes.json
202157
displayName: 'Merge @fluentui/react, @fluentui/react-components & @fluentui/react-northstar to bundlesizes.json'
203158

204159
- task: PublishBuildArtifacts@1

0 commit comments

Comments
 (0)