Delete consolidateBundleSizes script (#20724)
This was ported to the new workflow by #20720
Andrew Clark committed
Feb 3, 2021 at 10:45 UTC
0935a1db3d2c1b9c2b09ea348d0db929757f9de0
2 files changed
-61
.circleci/config.yml
-36
@@ -23,31 +23,6 @@ aliases:
23
- &attach_workspace
24
at: build
25
26
- - &process_artifacts
27
- docker: *docker
28
- environment: *environment
29
- steps:
30
- - checkout
31
- - attach_workspace: *attach_workspace
32
- - run: yarn workspaces info | head -n -1 > workspace_info.txt
33
- - *restore_node_modules
34
- - run: node ./scripts/rollup/consolidateBundleSizes.js
35
- - run: ./scripts/circleci/pack_and_store_artifact.sh
36
- - store_artifacts:
37
- path: ./node_modules.tgz
38
- - store_artifacts:
39
- path: ./build.tgz
40
- - store_artifacts:
41
- path: ./build/bundle-sizes.json
42
- - store_artifacts:
43
- # TODO: Update release script to use local file instead of pulling
44
- # from artifacts.
45
- path: ./scripts/error-codes/codes.json
46
- - persist_to_workspace:
47
- root: build
48
- paths:
49
- - bundle-sizes.json
50
-
26
jobs:
27
setup:
28
docker: *docker
@@ -282,11 +257,6 @@ jobs:
257
cd packages/react-devtools-scheduling-profiler
258
yarn vercel deploy dist --prod --confirm --token $SCHEDULING_PROFILER_DEPLOY_VERCEL_TOKEN
259
285
- # These jobs are named differently so we can distinguish the stable and
286
- # and experimental artifacts
287
- process_artifacts: *process_artifacts
288
- process_artifacts_experimental: *process_artifacts
289
-
260
yarn_lint_build:
261
docker: *docker
262
environment: *environment
@@ -385,9 +355,6 @@ workflows:
355
- RELEASE_CHANNEL_stable_yarn_build:
356
requires:
357
- setup
388
- - process_artifacts:
389
- requires:
390
- - RELEASE_CHANNEL_stable_yarn_build
358
- RELEASE_CHANNEL_stable_yarn_lint_build:
359
requires:
360
- RELEASE_CHANNEL_stable_yarn_build
@@ -401,9 +368,6 @@ workflows:
368
- yarn_build:
369
requires:
370
- setup
404
- - process_artifacts_experimental:
405
- requires:
406
- - yarn_build
371
- yarn_lint_build:
372
requires:
373
- yarn_build
scripts/rollup/consolidateBundleSizes.js
deleted
-25
@@ -1,25 +0,0 @@
1
-'use strict';
2
-
3
-// Script that combines bundle size information for each build into a single
4
-// JSON file for easier storage and processing.
5
-
6
-const fs = require('fs');
7
-const path = require('path');
8
-
9
-const BUILD_DIR = path.join(__dirname, '../../build');
10
-
11
-const filenames = fs.readdirSync(path.join(BUILD_DIR, 'sizes'));
12
-
13
-let bundleSizes = [];
14
-for (let i = 0; i < filenames.length; i++) {
15
- const filename = filenames[i];
16
- if (filename.endsWith('.json')) {
17
- const json = fs.readFileSync(path.join(BUILD_DIR, 'sizes', filename));
18
- bundleSizes.push(...JSON.parse(json).bundleSizes);
19
- }
20
-}
21
-
22
-const outputFilename = path.join(BUILD_DIR, 'bundle-sizes.json');
23
-const outputContents = JSON.stringify({bundleSizes}, null, 2);
24
-
25
-fs.writeFileSync(outputFilename, outputContents);