Skip to content

Add digest to js files in the apps package#2992

Merged
Bjvanminnen merged 15 commits into
stagingfrom
apps-digest
Jul 6, 2015
Merged

Add digest to js files in the apps package#2992
Bjvanminnen merged 15 commits into
stagingfrom
apps-digest

Conversation

@joshlory

Copy link
Copy Markdown
Contributor

This changes adds a md5 digest of the file contents to each js file in the apps package. Fixes the bug where old modules can be cached by users' browsers.

Content files (css and images) don't currently have a digest, but it could be added (assetUrl knows about the digestManifest so they just need to be added to the grunt digest file list).

TODO:

  • Make it work with grunt dev server.
  • Don't create duplicate digested files.
  • Keep digestManifest internal to apps and only export the loader.

Tested Blockly levels, Droplet levels, embed_blocks (/s/allthethings/stage/13/puzzle/3) and the required block popup.

Comment thread apps/Gruntfile.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'd prefer to see all requires at the top of the file

@Bjvanminnen

Copy link
Copy Markdown
Contributor

Generally lgtm to me. I would like to avoid putting our manifest in the global namespace if we can avoid it though.

Comment thread shared/js/initApp.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Up to here, the diff for this file should mostly just be indentation changes (and wrapping with the apps namespace).

@Bjvanminnen

Copy link
Copy Markdown
Contributor

lgtm

@joshlory

joshlory commented Jul 2, 2015

Copy link
Copy Markdown
Contributor Author

I'm out-of-office next week so @Bjvanminnen will merge on Monday. Thanks!

Bjvanminnen added a commit that referenced this pull request Jul 6, 2015
Add digest to js files in the apps package
@Bjvanminnen Bjvanminnen merged commit 6ad6441 into staging Jul 6, 2015
@Bjvanminnen Bjvanminnen deleted the apps-digest branch July 6, 2015 18:29
deploy-code-org added a commit that referenced this pull request Jul 6, 2015
commit 6ad6441
Merge: fac267e 562c1da
Author: Bjvanminnen <Bjvanminnen@gmail.com>
Date:   Mon Jul 6 11:29:45 2015 -0700

    Merge pull request #2992 from code-dot-org/apps-digest

    Add digest to js files in the apps package

commit fac267e
Merge: 00ae30f d7e92da
Author: Laurel <laurel.fan@gmail.com>
Date:   Mon Jul 6 10:44:36 2015 -0700

    Merge pull request #3022 from code-dot-org/poste

    change Poste Stats/Opens/Clicks to load data for only one mail to mak…

commit d7e92da
Author: Laurel Fan <laurel@code.org>
Date:   Mon Jul 6 10:45:20 2015 -0700

    change Poste Stats/Opens/Clicks to load data for only one mail to make it fast enough to actually load in prod

commit 00ae30f
Author: Continuous Integration <dev@code.org>
Date:   Mon Jul 6 16:26:53 2015 +0000

    Automatically built.

    commit c713990
    Merge: 7813112 c95edef
    Author: Bjvanminnen <Bjvanminnen@gmail.com>
    Date:   Mon Jul 6 09:19:03 2015 -0700

        Merge pull request #3018 from code-dot-org/dragElements

        [Finishes #95928060] Drag elements in design mode

    commit 7813112
    Author: Josh Lory <josh.lory@code.org>
    Date:   Fri Jul 3 17:30:49 2015 -0700

        Temporarily turn off incremental seed

        Fixes video_key on External levels for Monday CSP PD.

    commit c95edef
    Author: Brent Van Minnen <bjvanminnen@gmail.com>
    Date:   Thu Jul 2 16:46:52 2015 -0700

        optional param

    commit 68529a4
    Author: Continuous Integration <dev@code.org>
    Date:   Thu Jul 2 23:46:03 2015 +0000

        Automatically built.

        commit 232ad5e
        Merge: 9ad61cd 5b2cd1d
        Author: Continuous Integration <dev@code.org>
        Date:   Thu Jul 2 23:36:44 2015 +0000

            Merge branch 'staging' of github.com:code-dot-org/code-dot-org into staging

    commit 232ad5e
    Merge: 9ad61cd 5b2cd1d
    Author: Continuous Integration <dev@code.org>
    Date:   Thu Jul 2 23:36:44 2015 +0000

        Merge branch 'staging' of github.com:code-dot-org/code-dot-org into staging

    commit 5b2cd1d
    Author: Brent Van Minnen <bjvanminnen@gmail.com>
    Date:   Thu Jul 2 16:38:30 2015 -0700

        allow backspace on number inputs

    commit 8f9531b
    Author: Brent Van Minnen <bjvanminnen@gmail.com>
    Date:   Thu Jul 2 16:11:17 2015 -0700

        address some cross browser issues

commit c713990
Merge: 7813112 c95edef
Author: Bjvanminnen <Bjvanminnen@gmail.com>
Date:   Mon Jul 6 09:19:03 2015 -0700

    Merge pull request #3018 from code-dot-org/dragElements

    [Finishes #95928060] Drag elements in design mode

commit 7813112
Author: Josh Lory <josh.lory@code.org>
Date:   Fri Jul 3 17:30:49 2015 -0700

    Temporarily turn off incremental seed

    Fixes video_key on External levels for Monday CSP PD.

commit c95edef
Author: Brent Van Minnen <bjvanminnen@gmail.com>
Date:   Thu Jul 2 16:46:52 2015 -0700

    optional param

commit 68529a4
Author: Continuous Integration <dev@code.org>
Date:   Thu Jul 2 23:46:03 2015 +0000

    Automatically built.

    commit 232ad5e
    Merge: 9ad61cd 5b2cd1d
    Author: Continuous Integration <dev@code.org>
    Date:   Thu Jul 2 23:36:44 2015 +0000

        Merge branch 'staging' of github.com:code-dot-org/code-dot-org into staging

commit 232ad5e
Merge: 9ad61cd 5b2cd1d
Author: Continuous Integration <dev@code.org>
Date:   Thu Jul 2 23:36:44 2015 +0000

    Merge branch 'staging' of github.com:code-dot-org/code-dot-org into staging

commit 5b2cd1d
Author: Brent Van Minnen <bjvanminnen@gmail.com>
Date:   Thu Jul 2 16:38:30 2015 -0700

    allow backspace on number inputs

commit 8f9531b
Author: Brent Van Minnen <bjvanminnen@gmail.com>
Date:   Thu Jul 2 16:11:17 2015 -0700

    address some cross browser issues

commit 9ad61cd
Author: Continuous Integration <dev@code.org>
Date:   Thu Jul 2 23:17:04 2015 +0000

    dropbox and gsheet changes

commit 562c1da
Author: Josh Lory <josh.lory@code.org>
Date:   Thu Jul 2 15:38:19 2015 -0700

    Code review feedback [ci skip]

commit dbb4331
Merge: 6bda798 5246473
Author: Brendan Reville <brendan@code.org>
Date:   Thu Jul 2 15:28:03 2015 -0700

    Merge branch 'staging' of github.com:code-dot-org/code-dot-org into staging

commit 6bda798
Author: Brendan Reville <brendan@code.org>
Date:   Thu Jul 2 15:27:37 2015 -0700

    Adjust /promote state counts and texts.

commit bdbbeb7
Author: Josh Lory <josh.lory@code.org>
Date:   Thu Jul 2 15:04:21 2015 -0700

    Get `grunt dev` working without asset fingerprints

    [ci skip]
Bjvanminnen added a commit that referenced this pull request Jul 6, 2015
This reverts commit 6ad6441, reversing
changes made to fac267e.
deploy-code-org added a commit that referenced this pull request Jul 6, 2015
commit 370f507
Author: Brent Van Minnen <bjvanminnen@gmail.com>
Date:   Mon Jul 6 11:35:10 2015 -0700

    Revert "Merge pull request #2992 from code-dot-org/apps-digest"

    This reverts commit 6ad6441, reversing
    changes made to fac267e.
deploy-code-org added a commit that referenced this pull request Jul 6, 2015
commit 29d37cd
Merge: 3df4252 a42a3da
Author: Bjvanminnen <Bjvanminnen@gmail.com>
Date:   Mon Jul 6 12:03:12 2015 -0700

    Merge pull request #3019 from code-dot-org/imageResize

    [Finishes #98332908] setImageURL shouldn't resize

commit 3df4252
Author: Continuous Integration <dev@code.org>
Date:   Mon Jul 6 18:33:40 2015 +0000

    Automatically built.

    commit 370f507
    Author: Brent Van Minnen <bjvanminnen@gmail.com>
    Date:   Mon Jul 6 11:35:10 2015 -0700

        Revert "Merge pull request #2992 from code-dot-org/apps-digest"

        This reverts commit 6ad6441, reversing
        changes made to fac267e.

commit 370f507
Author: Brent Van Minnen <bjvanminnen@gmail.com>
Date:   Mon Jul 6 11:35:10 2015 -0700

    Revert "Merge pull request #2992 from code-dot-org/apps-digest"

    This reverts commit 6ad6441, reversing
    changes made to fac267e.
Bjvanminnen added a commit that referenced this pull request Jul 6, 2015
deploy-code-org added a commit that referenced this pull request Jul 6, 2015
commit a05fd0f
Merge: db4cf08 20b544a
Author: Bjvanminnen <Bjvanminnen@gmail.com>
Date:   Mon Jul 6 12:28:54 2015 -0700

    Merge pull request #3023 from code-dot-org/sharingCodeless

    able to properly share project without code

commit db4cf08
Author: Continuous Integration <dev@code.org>
Date:   Mon Jul 6 19:10:55 2015 +0000

    Automatically built.

    commit 29d37cd
    Merge: 3df4252 a42a3da
    Author: Bjvanminnen <Bjvanminnen@gmail.com>
    Date:   Mon Jul 6 12:03:12 2015 -0700

        Merge pull request #3019 from code-dot-org/imageResize

        [Finishes #98332908] setImageURL shouldn't resize

    commit 3df4252
    Author: Continuous Integration <dev@code.org>
    Date:   Mon Jul 6 18:33:40 2015 +0000

        Automatically built.

        commit 370f507
        Author: Brent Van Minnen <bjvanminnen@gmail.com>
        Date:   Mon Jul 6 11:35:10 2015 -0700

            Revert "Merge pull request #2992 from code-dot-org/apps-digest"

            This reverts commit 6ad6441, reversing
            changes made to fac267e.

    commit 370f507
    Author: Brent Van Minnen <bjvanminnen@gmail.com>
    Date:   Mon Jul 6 11:35:10 2015 -0700

        Revert "Merge pull request #2992 from code-dot-org/apps-digest"

        This reverts commit 6ad6441, reversing
        changes made to fac267e.
Bjvanminnen added a commit that referenced this pull request Jul 7, 2015
Revert "Revert "Merge pull request #2992 from code-dot-org/apps-digest""
deploy-code-org added a commit that referenced this pull request Jul 7, 2015
commit 71f2fb9
Merge: 960e9d2 358ba5b
Author: Bjvanminnen <Bjvanminnen@gmail.com>
Date:   Tue Jul 7 08:59:23 2015 -0700

    Merge pull request #3026 from code-dot-org/apps-digest

    Revert "Revert "Merge pull request #2992 from code-dot-org/apps-digest""

commit 358ba5b
Author: Brent Van Minnen <bjvanminnen@gmail.com>
Date:   Mon Jul 6 18:03:55 2015 -0700

    code review feedback

commit 960e9d2
Author: Continuous Integration <dev@code.org>
Date:   Tue Jul 7 00:33:10 2015 +0000

    Dropbox changes

commit eb14492
Merge: d6112a6 99226b0
Author: Laurel <laurel.fan@gmail.com>
Date:   Mon Jul 6 17:03:53 2015 -0700

    Merge pull request #2999 from code-dot-org/hoc-map-crontab

    add hoc map updating script to prod crontab
deploy-code-org added a commit that referenced this pull request Jul 7, 2015
commit 71f2fb9
Merge: 960e9d2 358ba5b
Author: Bjvanminnen <Bjvanminnen@gmail.com>
Date:   Tue Jul 7 08:59:23 2015 -0700

    Merge pull request #3026 from code-dot-org/apps-digest

    Revert "Revert "Merge pull request #2992 from code-dot-org/apps-digest""

commit 358ba5b
Author: Brent Van Minnen <bjvanminnen@gmail.com>
Date:   Mon Jul 6 18:03:55 2015 -0700

    code review feedback

commit 960e9d2
Author: Continuous Integration <dev@code.org>
Date:   Tue Jul 7 00:33:10 2015 +0000

    Dropbox changes

commit eb14492
Merge: d6112a6 99226b0
Author: Laurel <laurel.fan@gmail.com>
Date:   Mon Jul 6 17:03:53 2015 -0700

    Merge pull request #2999 from code-dot-org/hoc-map-crontab

    add hoc map updating script to prod crontab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants