Skip to content

Add new build rule for gendeps script #3440

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

Merged
merged 5 commits into from
Jul 22, 2020
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Jul 20, 2020

This is required since the Node build now uses UMD and the Browser builds are mangled. As such, we no longer have a nice build to look at to generate the list of dependencies.

Unfortunately, using the rollup.shared.js file in the new script meant that I had to convert it into CommonJS.

I also checked in the script/*.js file and removed the prebuilt step (for development speed). Furthermore, I removed the verify-depedencies.test.ts tests since I only ever looked at the JSON files itself (these tests are pretty slow).

@changeset-bot
Copy link

changeset-bot bot commented Jul 20, 2020

💥 No Changeset

Latest commit: f7c4bcb

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@changeset-bot
Copy link

changeset-bot bot commented Jul 20, 2020

💥 No Changeset

Latest commit: 0172925

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@schmidt-sebastian schmidt-sebastian changed the title Add new build rule for gendeps script WIP Add new build rule for gendeps script Jul 20, 2020
@schmidt-sebastian schmidt-sebastian force-pushed the mrschmidt/builddeps branch 2 times, most recently from 719ba92 to 13a2c89 Compare July 20, 2020 21:52
@schmidt-sebastian schmidt-sebastian changed the title WIP Add new build rule for gendeps script Add new build rule for gendeps script Jul 20, 2020
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 20, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (7d5678b) Head (67d4854) Diff
    browser 246 kB 246 kB -502 B (-0.2%)
    esm2017 193 kB 193 kB -75 B (-0.0%)
    main 469 kB 469 kB +5 B (+0.0%)
    module 244 kB 244 kB -492 B (-0.2%)
    react-native 194 kB 193 kB -75 B (-0.0%)
  • @firebase/firestore/exp

    Type Base (7d5678b) Head (67d4854) Diff
    browser 187 kB 187 kB -75 B (-0.0%)
    main 508 kB 508 kB -10 B (-0.0%)
    react-native 187 kB 187 kB -75 B (-0.0%)
  • @firebase/firestore/lite

    Type Base (7d5678b) Head (67d4854) Diff
    main 494 kB 494 kB -10 B (-0.0%)
  • @firebase/firestore/memory

    Type Base (7d5678b) Head (67d4854) Diff
    browser 185 kB 185 kB +93 B (+0.1%)
    esm2017 145 kB 145 kB +103 B (+0.1%)
    main 344 kB 344 kB +279 B (+0.1%)
    module 183 kB 183 kB +93 B (+0.1%)
    react-native 145 kB 145 kB +103 B (+0.1%)
  • @firebase/storage

    Type Base (7d5678b) Head (67d4854) Diff
    esm2017 56.4 kB 54.9 kB -1.50 kB (-2.7%)
    main 62.8 kB 61.3 kB -1.46 kB (-2.3%)
    module 62.6 kB 61.1 kB -1.47 kB (-2.4%)
  • firebase

    Type Base (7d5678b) Head (67d4854) Diff
    firebase-firestore.js 285 kB 284 kB -525 B (-0.2%)
    firebase-firestore.memory.js 224 kB 224 kB +86 B (+0.0%)
    firebase-storage.js 40.9 kB 39.9 kB -1.02 kB (-2.5%)
    firebase.js 820 kB 818 kB -1.55 kB (-0.2%)

Test Logs

@schmidt-sebastian
Copy link
Contributor Author

Hm, I need to look at the size increase. Very strange.

@schmidt-sebastian
Copy link
Contributor Author

Hm, I need to look at the size increase. Very strange.

Fixed

@Feiyang1
Copy link
Member

Feiyang1 commented Jul 21, 2020

Instead of checking in js files, can you use ts-node to run the ts files directly to avoid the compilation step? then you also don't need to make rollup.shared cjs.

You can create a tsconfig.json in the script folder, setting the target module to cjs, then run the scripts using ts-node-script which will use the correct tsconfig.json file.

@schmidt-sebastian
Copy link
Contributor Author

schmidt-sebastian commented Jul 21, 2020

These scripts are used in transformers, as such I don't think we can use ts-node.

@schmidt-sebastian schmidt-sebastian merged commit 9788c43 into master Jul 22, 2020
@firebase firebase locked and limited conversation to collaborators Aug 22, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/builddeps branch November 9, 2020 22:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants