Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORE] cleanup build #6818

Merged
merged 1 commit into from
Nov 28, 2019
Merged

[CHORE] cleanup build #6818

merged 1 commit into from
Nov 28, 2019

Conversation

runspired
Copy link
Contributor

Refactor to use _findHost and provide a shared mechanism for accessing EmberData config.

Also removes test-infra's VERSION module from our production output if we aren't in a testing environment.

@runspired runspired requested a review from rwjblue November 27, 2019 19:37
@runspired runspired added Infra/CI/DX 🏷️ chore This PR primarily refactors code or updates dependencies CI labels Nov 27, 2019
@github-actions
Copy link

Asset Size Report for 43cb4ed

EmberData shrank by 186.0 B (18.0 B compressed)

If any packages had changed sizes they would be listed here.

Changeset


EmberData 160.31 KB -186.0 B (34.14 KB -18.0 B compressed)
    @ember-data/unpublished-test-infra 0.0 B -186.0 B (0.0 B -39.59 B compressed)
        @ember-data/unpublished-test-infra/version 0.0 B -186.0 B (0.0 B -39.59 B compressed)

Full Asset Analysis

Asset Size Report
=================


Library: EmberData
┌────────────┬─────────────┐
│  (index)   │   Values    │
├────────────┼─────────────┤
│   bytes    │ '160.31 KB' │
│ compressed │ '34.23 KB'  │
│  packages  │      9      │
│  modules   │     47      │
└────────────┴─────────────┘

Package: @ember-data/store
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '71.04 KB' │
│  compressed  │ '15.17 KB' │
│ % Of Library │   '44.3'   │
└──────────────┴────────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/store/-private                    | 70.13 KB  | 14.97 KB   | 98.7          | 43.7
	@ember-data/store/index                       | 936.00 B  | 199.86 B   | 1.3           | 0.6

Package: @ember-data/record-data
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '22.97 KB' │
│  compressed  │ '4.91 KB'  │
│ % Of Library │   '14.3'   │
└──────────────┴────────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/record-data/-private              | 22.97 KB  | 4.91 KB    | 100.0         | 14.3

Package: @ember-data/serializer
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '19.30 KB' │
│  compressed  │ '4.12 KB'  │
│ % Of Library │   '12.0'   │
└──────────────┴────────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/serializer/json                   | 7.10 KB   | 1.52 KB    | 36.8          | 4.4
	@ember-data/serializer/-private               | 5.36 KB   | 1.14 KB    | 27.8          | 3.3
	@ember-data/serializer/json-api               | 3.71 KB   | 810.54 B   | 19.2          | 2.3
	@ember-data/serializer/rest                   | 2.68 KB   | 585.70 B   | 13.9          | 1.7
	@ember-data/serializer/index                  | 243.00 B  | 51.88 B    | 1.2           | 0.1
	@ember-data/serializer/transform              | 215.00 B  | 45.90 B    | 1.1           | 0.1

Package: @ember-data/adapter
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '14.57 KB' │
│  compressed  │ '3.11 KB'  │
│ % Of Library │   '9.1'    │
└──────────────┴────────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/adapter/rest                      | 7.65 KB   | 1.63 KB    | 52.5          | 4.8
	@ember-data/adapter/-private                  | 3.50 KB   | 765.28 B   | 24.0          | 2.2
	@ember-data/adapter/error                     | 1.91 KB   | 418.29 B   | 13.1          | 1.2
	@ember-data/adapter/json-api                  | 830.00 B  | 177.22 B   | 5.6           | 0.5
	@ember-data/adapter/index                     | 719.00 B  | 153.52 B   | 4.8           | 0.4

Package: @ember-data/model
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '11.08 KB' │
│  compressed  │ '2.36 KB'  │
│ % Of Library │   '6.9'    │
└──────────────┴────────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/model/-private                    | 10.60 KB  | 2.26 KB    | 95.7          | 6.6
	@ember-data/model/index                       | 486.00 B  | 103.77 B   | 4.3           | 0.3

Package: ember-data
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '9.72 KB' │
│  compressed  │ '2.08 KB' │
│ % Of Library │   '6.1'   │
└──────────────┴───────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-data/index                              | 2.42 KB   | 529.33 B   | 24.9          | 1.5
	ember-data/-private                           | 1.98 KB   | 433.24 B   | 20.4          | 1.2
	ember-data/adapters/errors                    | 1.19 KB   | 259.86 B   | 12.2          | 0.7
	ember-data/setup-container                    | 503.00 B  | 107.40 B   | 5.1           | 0.3
	ember-data/store                              | 406.00 B  | 86.69 B    | 4.1           | 0.2
	ember-data/relationships                      | 318.00 B  | 67.90 B    | 3.2           | 0.2
	ember-data/serializers/embedded-records-mixin | 274.00 B  | 58.50 B    | 2.8           | 0.2
	ember-data/serializers/json-api               | 251.00 B  | 53.59 B    | 2.5           | 0.2
	ember-data/adapters/json-api                  | 245.00 B  | 52.31 B    | 2.5           | 0.1
	ember-data/serializers/json                   | 243.00 B  | 51.88 B    | 2.4           | 0.1
	ember-data/serializers/rest                   | 243.00 B  | 51.88 B    | 2.4           | 0.1
	ember-data/transform                          | 241.00 B  | 51.46 B    | 2.4           | 0.1
	ember-data/adapters/rest                      | 237.00 B  | 50.60 B    | 2.4           | 0.1
	ember-data/serializer                         | 232.00 B  | 49.53 B    | 2.3           | 0.1
	ember-data/adapter                            | 226.00 B  | 48.25 B    | 2.3           | 0.1
	ember-data/model                              | 222.00 B  | 47.40 B    | 2.2           | 0.1
	ember-data/attr                               | 218.00 B  | 46.54 B    | 2.2           | 0.1
	ember-data/initialize-store-service           | 207.00 B  | 44.20 B    | 2.1           | 0.1
	ember-data/version                            | 162.00 B  | 34.59 B    | 1.6           | 0.1

Package: ember-inflector
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '7.90 KB' │
│  compressed  │ '1.69 KB' │
│ % Of Library │   '4.9'   │
└──────────────┴───────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-inflector/lib/system/inflector          | 2.75 KB   | 601.50 B   | 34.8          | 1.7
	ember-inflector/lib/system/inflections        | 1.57 KB   | 343.77 B   | 19.9          | 1.0
	ember-inflector/index                         | 1.12 KB   | 245.12 B   | 14.2          | 0.7
	ember-inflector/lib/ext/string                | 783.00 B  | 167.19 B   | 9.7           | 0.5
	ember-inflector/lib/system                    | 452.00 B  | 96.51 B    | 5.6           | 0.3
	ember-inflector/lib/system/string             | 351.00 B  | 74.94 B    | 4.3           | 0.2
	ember-inflector/lib/helpers/pluralize         | 348.00 B  | 74.30 B    | 4.3           | 0.2
	ember-inflector/lib/utils/make-helper         | 308.00 B  | 65.76 B    | 3.8           | 0.2
	ember-inflector/lib/helpers/singularize       | 271.00 B  | 57.86 B    | 3.4           | 0.2

Package: @ember-data/debug
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '2.68 KB'  │
│  compressed  │ '585.70 B' │
│ % Of Library │   '1.7'    │
└──────────────┴────────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/debug/index                       | 2.19 KB   | 479.15 B   | 81.8          | 1.4
	@ember-data/debug/setup                       | 499.00 B  | 106.55 B   | 18.2          | 0.3

Package: @ember/ordered-set
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '1.05 KB'  │
│  compressed  │ '230.18 B' │
│ % Of Library │   '0.7'    │
└──────────────┴────────────┘
	Module                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember/ordered-set/index                      | 1.05 KB   | 230.18 B   | 100.0         | 0.7

Copy link
Contributor Author

@runspired runspired left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shipping this because I need the work for the deprecation-infra and the change is small and relatively safe. If there are any cleanup comments I'm happy to submit another cleanup for this cleanup?

@runspired runspired merged commit f53992a into master Nov 28, 2019
@delete-merged-branch delete-merged-branch bot deleted the chore/cleanup-build branch November 28, 2019 07:56
const options = this.setupOptions();
const env = getApp(this).env;
const options = this.getEmberDataConfig();
const env = process.env.EMBER_ENV;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What caused this change? Do we not need to do getApp for env?

@igorT
Copy link
Member

igorT commented Dec 1, 2019

Seems reasonable to me, but @rwjblue would be a much better set of 👀

@runspired runspired removed the CI label Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infra/CI/DX 🏷️ chore This PR primarily refactors code or updates dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants