Skip to content

Release: Use an in-repository dist README fixture #4614

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 2 commits into from
Mar 2, 2020

Conversation

mgol
Copy link
Member

@mgol mgol commented Feb 24, 2020

Summary

Use a dist README fixture kept in the jQuery repository instead of modifying
an existing one. This makes the jQuery repository the single source of truth
when it comes to jQuery releases and it makes it easier to make changes to
README without worrying how it will affect older jQuery lines.

jquery/jquery-release#103 is a pre-requisite to make this PR work.

Checklist


npmTags = Release.npmTags;
const npmTags = Release.npmTags;
Copy link
Member Author

Choose a reason for hiding this comment

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

@timmywil We had a talk a while ago about the onevar rule in ESLint. You said you don't want to remove/change the rule so that code using the preset doesn't need to adapt. However:

  1. The rule is not actually enabled in the jQuery preset. AFAIK it was removed because Jörn didn't want it in jQuery UI or QUnit due to Git diff issues etc.
  2. While we adhere to this way of declaring variables in jQuery code, I'd argue it's actually harmful when used for const/let. This is because for vars we were emulating how the JS engine interprets those declarations; in case of const/let the declarations are not hoisted and it's common to put them in the middle of the function where they are needed.
  3. Other ES6 code in our repo already uses separate declarations per variable so we have some history here. That also means we don't have history of requiring this rule for const/let so not applying it shouldn't cause issues with code refactorings.

Copy link
Member

Choose a reason for hiding this comment

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

The onevar rule can technically differentiate between var, const, and let. I'd be immediately in favor of specifying that we only require onevar for var. As for var, I'm not sure it's worth the large diffs and blame overrides.

Copy link
Member Author

Choose a reason for hiding this comment

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

@timmywil Makes sense, I didn't know it can be configured just for var. We can add it to our own ESLint config since it was rejected as a general rule for the jQuery preset.

Copy link
Member Author

Choose a reason for hiding this comment

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

@timmywil Done in #4615.

var $ = require( "jquery" );
```

#### AMD (Asynchronous Module Definition)
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll submit a separate PR adding info about our new ES modules. Since we only want it on the 4.x branch, this PR will be useful here. :)

mgol added 2 commits February 28, 2020 18:41
Use a dist README fixture kept in the jQuery repository instead of modifying
an existing one. This makes the jQuery repository the single source of truth
when it comes to jQuery releases and it makes it easier to make changes to
README without worrying how it will affect older jQuery lines.
@mgol mgol removed the Needs review label Mar 2, 2020
@mgol mgol added this to the 3.5.0 milestone Mar 2, 2020
@mgol mgol merged commit 358b769 into jquery:master Mar 2, 2020
@mgol mgol deleted the jquery-dist-fixtures branch March 2, 2020 21:42
mgol added a commit that referenced this pull request Mar 2, 2020
Use a dist README fixture kept in the jQuery repository instead of modifying
an existing one. This makes the jQuery repository the single source of truth
when it comes to jQuery releases and it makes it easier to make changes to
README without worrying how it will affect older jQuery lines.

The commit also ES6ifies build/release.js & build/release/dist.js

Closes gh-4614

(cherry picked from commit 358b769)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants