Skip to content

Version Packages#324

Merged
mattcompiles merged 3 commits intomasterfrom
changeset-release/master
Aug 27, 2021
Merged

Version Packages#324
mattcompiles merged 3 commits intomasterfrom
changeset-release/master

Conversation

@seek-oss-ci
Copy link
Contributor

@seek-oss-ci seek-oss-ci commented Aug 27, 2021

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

@vanilla-extract/esbuild-plugin@2.0.0

Major Changes

  • #323 1e7d647 Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via the identifiers option which accepts either short or debug.

    • short identifiers are a 7+ character hash. e.g. hnw5tz3
    • debug identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g. somefile_mystyle_hnw5tz3
    import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin';
    
    vanillaExtractPlugin({ identifiers: 'short' });

    BREAKING CHANGE

    Previously identifiers were formatted as short when process.env.NODE_ENV was set to "production". By default, they will now be formatted according to esbuild's minify config.

Patch Changes

  • Updated dependencies [1e7d647]:
    • @vanilla-extract/integration@1.2.0

@vanilla-extract/snowpack-plugin@2.0.0

Major Changes

  • #323 1e7d647 Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via the identifiers option which accepts either short or debug.

    • short identifiers are a 7+ character hash. e.g. hnw5tz3
    • debug identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g. somefile_mystyle_hnw5tz3
    import { vanillaExtractPlugin } from '@vanilla-extract/snowpack-plugin';
    
    const snowpackConfig = {
      plugins: [['@vanilla-extract/snowpack-plugin', { identifiers: 'short' }]],
    };

    BREAKING CHANGE

    Previously identifiers were formatted as short when process.env.NODE_ENV was set to "production". By default, they will now be formatted according to Snowpacks's mode config.

Patch Changes

  • Updated dependencies [1e7d647]:
    • @vanilla-extract/integration@1.2.0

@vanilla-extract/vite-plugin@2.0.0

Major Changes

  • #323 1e7d647 Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via the identifiers option which accepts either short or debug.

    • short identifiers are a 7+ character hash. e.g. hnw5tz3
    • debug identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g. somefile_mystyle_hnw5tz3
    import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
    
    vanillaExtractPlugin({ identifiers: 'short' });

    BREAKING CHANGE

    Previously identifiers were formatted as short when process.env.NODE_ENV was set to "production". By default, they will now be formatted according to Vite's mode config.

Patch Changes

  • Updated dependencies [1e7d647]:
    • @vanilla-extract/integration@1.2.0

@vanilla-extract/webpack-plugin@2.0.0

Major Changes

  • #323 1e7d647 Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via the identifiers option which accepts either short or debug.

    • short identifiers are a 7+ character hash. e.g. hnw5tz3
    • debug identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g. somefile_mystyle_hnw5tz3
    import { vanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
    
    vanillaExtractPlugin({ identifiers: 'short' });

    BREAKING CHANGE

    Previously identifiers were formatted as short when process.env.NODE_ENV was set to "production". By default, they will now be formatted according to webpack's mode config.

Patch Changes

  • Updated dependencies [1e7d647]:
    • @vanilla-extract/integration@1.2.0

@vanilla-extract/css@1.3.0

Minor Changes

  • #319 26832f1 Thanks @nicksrandall! - Add createGlobalThemeContract function

    Creates a contract of globally scoped variable names for themes to implement.

    💡 This is useful if you want to make your theme contract available to non-JavaScript environments.

    // themes.css.ts
    import {
      createGlobalThemeContract,
      createGlobalTheme,
    } from '@vanilla-extract/css';
    
    export const vars = createGlobalThemeContract({
      color: {
        brand: 'color-brand',
      },
      font: {
        body: 'font-body',
      },
    });
    
    createGlobalTheme(':root', vars, {
      color: {
        brand: 'blue',
      },
      font: {
        body: 'arial',
      },
    });

    You can also provide a map function as the second argument which has access to the value and the object path.

    For example, you can automatically prefix all variable names.

    // themes.css.ts
    import {
      createGlobalThemeContract,
      createGlobalTheme,
    } from '@vanilla-extract/css';
    
    export const vars = createGlobalThemeContract(
      {
        color: {
          brand: 'color-brand',
        },
        font: {
          body: 'font-body',
        },
      },
      value => `prefix-${value}`,
    );

    You can also use the map function to automatically generate names from the object path, joining keys with a hyphen.

    // themes.css.ts
    import {
      createGlobalThemeContract,
      createGlobalTheme,
    } from '@vanilla-extract/css';
    
    export const vars = createGlobalThemeContract(
      {
        color: {
          brand: null,
        },
        font: {
          body: null,
        },
      },
      (_value, path) => `prefix-${path.join('-')}`,
    );
  • #323 1e7d647 Thanks @mattcompiles! - Support configurable identifier types

@vanilla-extract/integration@1.2.0

Minor Changes

Patch Changes

@seek-oss-ci seek-oss-ci requested a review from a team as a code owner August 27, 2021 04:12
@seek-oss-ci seek-oss-ci force-pushed the changeset-release/master branch from 7c91211 to 8db5e99 Compare August 27, 2021 04:26
@mattcompiles mattcompiles enabled auto-merge (squash) August 27, 2021 04:32
@mattcompiles mattcompiles merged commit a25cb16 into master Aug 27, 2021
@mattcompiles mattcompiles deleted the changeset-release/master branch August 27, 2021 04:33
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