Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build: add commit SHAs and last runs to comparisons#5329

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
timmywil wants to merge5 commits intojquery:mainfromtimmywil:compare

Conversation

timmywil
Copy link
Member

@timmywiltimmywil commentedSep 20, 2023
edited
Loading

Fixesgh-5327

Summary

  • [BREAKING] changes the format of .sizecache.json. Delete your local .sizecache.json before running comparisons.
{"branch": {"meta": {"commit":"87de182dada4df850a64f3f062fe656b7d589ed9"    },"files": {"dist/jquery.min.js": {"raw":79053,"gz":27701      }    }  }}
  • The commit SHA is now saved for branches and printed with comparisons in gray.
  • every run is now saved as" last run". The leading space is intentional to avoid any possible collisions.
  • compare_size was removed the banner for comparisons, but@mgol made me realize all the exclusions can make a noticeable difference in the size so should be included. However, the short SHA varies by commit and we'd like to be able to compare exactly across commits. Also,.dirty is removed for comparisons because we'd like to be able to compare local changes (i.e. dirty git directory") to all branches and last runs that were clean.
  • Added a version number check that will automatically rewrite the cache on version mismatch.

I can make another PR if preferred, but I tacked on another change here to add the factory files that were just added to the main branch to the dist eslint.

Checklist

Copy link
Member

@mgolmgol left a comment

Choose a reason for hiding this comment

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

One remark

@timmywil
Copy link
MemberAuthor

timmywil commentedSep 20, 2023
edited
Loading

Rather than making us manually delete the cache if the format changes, I've added a version number check, which will automatically rewrite the cache on version mismatch. The version number is now saved in the "meta" of the last run.

Copy link
Member

@mgolmgol left a comment

Choose a reason for hiding this comment

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

One suggestion. LGTM overall, though.

sizeCache[ " last run" ] = {
meta: { version: VERSION },
Copy link
Member

Choose a reason for hiding this comment

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

[Suggestion] It's a bit weird that the version of the whole schema is under the last run key instead of in a globalmeta section. You may consider moving that.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I considered it, but last run always gets saved and this is just a little smaller, saving another object. Practically, I think the difference is minimal.

Copy link
Member

Choose a reason for hiding this comment

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

OK, this was just a suggestion, I don't insist. 🙂

@mgolmgol added this to the4.0.0 milestoneSep 20, 2023
@mgolmgol added the Build labelSep 20, 2023
@timmywiltimmywil deleted the compare branchSeptember 20, 2023 19:44
mgol referenced this pull requestSep 20, 2023
Updated tasks include:- lint- npmcopy- build, minify, and process for distribution.- new custom build command using yargs- compare size of minified/gzip built files- pretest scripts, including qunit-fixture, babel transpilation, and npmcopy- node smoke tests- promises aplus tests- new watch task using `rollup.watch` directlyAlso:- upgraded husky and added the new lint command- updated lint config to use new "flat" config format. Seehttps://eslint.org/docs/latest/use/configure/configuration-files-new- Temporarily disabled one lint rule until flat config is supported by eslint-plugin-import. Seeimport-js/eslint-plugin-import#2556- committed package-lock.json- updated all test scripts to use the new build- added an express test server that uses middleware-mockserver (this can be used to run tests without karma)- build-all-variants is now build:allClosegh-5318
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mgolmgolmgol approved these changes

Assignees
No one assigned
Labels
Milestone
4.0.0
Development

Successfully merging this pull request may close these issues.

New build system: re-add commit hashes in compare_size
2 participants
@timmywil@mgol

[8]ページ先頭

©2009-2025 Movatter.jp