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

Bump py-emmet from 1.1.10 to 1.2.0 #243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 20, 2023

Bumps py-emmet from 1.1.10 to 1.2.0.

Changelog

Sourced from py-emmet's changelog.

1.2.0 (2023-01-19)

Attributes override

This release features options to override attribute names for # (id) and . (class) shortcuts, which is especially useful for JSX/Vue.

In previous versions, the . shortcut created class attribute in element, which in turn was forcibly replaced with className in JSX mode. In v1.2.0, you can configure attribute names for # and . shortcuts per syntax. E.g. you can set . to be my-super-class in HTML and styleName in JSX. Additionally, it’s possible to specify custom value for doubled shortcuts (## and ..).

This is especially useful for JSX and Vue developers, which support multiple ways of specifying styles in element. For example, in JSX a common output for .my-class Emmet abbreviation is <div className="my-class"></div>. However, some developers prefer to use CSS Modules with custom Babel plugin, which expects the following syntax: <div styleName="myClass"></div>.

In order to not break backward compatibility, a user may specify different attribute name for . and .. shortcuts so that .my-class expands to <div className="my-class"></div>, but ..myClass to <div styleName="myClass"></div>. Another example is Vue, where static class name should be defined as class="" attribute, but dynamic one as :class="": you can assign .. to :class attribute as well.

Another common JSX workflow is to have a special styles object which holds class names generated by CSS-in-JS solution. In this case, you had to write something like [class={styles.foo}] to get <div className={style.foo}>: you can’t write .styles.foo since . is a class shortcut and default output is a string, not expression. In v1.2.0, you can specify a custom value prefix for attribute values. For example, you can specify styles prefix for class attribute so that .foo will produce <div className={styles.foo}>: note that attribute value is automatically converted to expression. And Emmet is smart enough to expand .my-class to <div className={style['my-class']}>.

To configure this feature, use markup.attributes config option to override attribute names and 'markup.valuePrefix to specify value prefixes. Note that you can override any attribute name and prefix. In order to override values for ## and .. shortcuts, use id* and class* attribute names respectively.

See config as an example and feature discussion at emmetio/emmet#589.

Other improvements

  • Removed extra spaces in CSS snippet output with parentheses in value (emmetio/emmet#647).
  • Added script:module HTML snippet.
  • Added g (gap) CSS snippet, replaced dc with display: contents instead of invalid display: compact.
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [py-emmet](https://github.com/emmetio/py-emmet) from 1.1.10 to 1.2.0.
- [Release notes](https://github.com/emmetio/py-emmet/releases)
- [Changelog](https://github.com/emmetio/py-emmet/blob/master/CHANGELOG.md)
- [Commits](emmetio/py-emmet@v1.1.10...v1.2.0)

---
updated-dependencies:
- dependency-name: py-emmet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 20, 2023
@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #243 (c207328) into main (9c3476f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##                main        #243   +/-   ##
=============================================
  Coverage   79.05117%   79.05117%           
=============================================
  Files             22          22           
  Lines           1876        1876           
=============================================
  Hits            1483        1483           
  Misses           393         393           

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants