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

feat: support postcss process options #551

Merged
merged 4 commits into from Jan 24, 2019

Conversation

Projects
None yet
2 participants
@tivac
Copy link
Owner

commented Jan 24, 2019

Description

Adds support for passing any of the .process() options directly to the underlying postcss instance.

Motivation and Context

Fixes #550

How Has This Been Tested?

Added a test using sugarss to ensure it would be parsed & output correctly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@tivac tivac self-assigned this Jan 24, 2019

@TravisBuddy

This comment has been minimized.

Copy link

commented Jan 24, 2019

Travis tests have failed

Hey @tivac,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

Node.js: 8

View build log

npm test -- --verbose --ci
> modular-css@0.0.0 pretest /home/travis/build/tivac/modular-css
> npm run parser


> modular-css@0.0.0 parser /home/travis/build/tivac/modular-css
> pegjs packages/processor/parsers/parser.pegjs


> modular-css@0.0.0 test /home/travis/build/tivac/modular-css
> jest "--verbose" "--ci"

PASS lint packages/rollup/test/rollup.test.js
  ● Console

  console.warn 
    
    /home/travis/build/tivac/modular-css/packages/rollup/test/rollup.test.js
      627:9  warning  Skipped test  jest/no-disabled-tests
    
    ✖ 1 problem (0 errors, 1 warning)
    

  ✓ ESLint (419ms)

PASS lint packages/processor/test/options.test.js
  ✓ ESLint (125ms)

PASS lint packages/processor/test/api.test.js
  ✓ ESLint (103ms)

PASS lint packages/rollup/rollup.js
  ✓ ESLint (110ms)

PASS lint packages/rollup/test/watch.test.js
  ● Console

  console.warn 
    
    /home/travis/build/tivac/modular-css/packages/rollup/test/watch.test.js
      318:9  warning  Skipped test  jest/no-disabled-tests
    
    ✖ 1 problem (0 errors, 1 warning)
    

  ✓ ESLint (55ms)

PASS lint packages/processor/processor.js
  ✓ ESLint (102ms)

PASS lint packages/rollup/test/splitting.test.js
  ✓ ESLint (62ms)

PASS lint packages/webpack/test/webpack.test.js
  ✓ ESLint (84ms)

PASS lint packages/browserify/browserify.js
  ✓ ESLint (39ms)

PASS lint packages/browserify/test/factor-bundle.test.js
  ✓ ESLint (32ms)

PASS lint packages/svelte/test/svelte.test.js
  ✓ ESLint (28ms)

PASS lint packages/browserify/test/browserify.test.js
  ✓ ESLint (38ms)

PASS lint packages/processor/test/composition.test.js
  ✓ ESLint (37ms)

PASS lint packages/svelte/svelte.js
  ✓ ESLint (26ms)

PASS lint packages/rollup-rewriter/test/rewriter.test.js
  ✓ ESLint (23ms)

PASS lint packages/postcss/test/postcss.test.js
  ✓ ESLint (26ms)

PASS lint packages/browserify/test/watchify.test.js
  ✓ ESLint (20ms)

PASS lint packages/processor/test/values.test.js
  ✓ ESLint (37ms)

PASS lint packages/processor/plugins/composition.js
  ✓ ESLint (32ms)

PASS lint packages/www/index.js
  ✓ ESLint (34ms)

PASS lint packages/processor/plugins/scoping.js
  ✓ ESLint (24ms)

PASS lint packages/processor/plugins/values-replace.js
  ✓ ESLint (29ms)

PASS lint packages/webpack/plugin.js
  ✓ ESLint (42ms)

PASS lint packages/aliases/test/aliases.test.js
  ✓ ESLint (29ms)

PASS lint packages/rollup-rewriter/rewriter.js
  ✓ ESLint (24ms)

PASS lint packages/processor/test/scoping.test.js
  ✓ ESLint (25ms)

PASS lint packages/browserify/test/issue-58.test.js
  ✓ ESLint (16ms)

PASS lint packages/processor/test/keyframes.test.js
  ✓ ESLint (24ms)

PASS lint packages/browserify/test/issue-313.test.js
  ✓ ESLint (25ms)

PASS lint packages/cli/test/cli.test.js
  ✓ ESLint (16ms)

PASS lint packages/paths/test/paths.test.js
  ✓ ESLint (13ms)

PASS lint packages/processor/plugins/externals.js
  ✓ ESLint (20ms)

PASS lint packages/www/webpack.config.js
  ✓ ESLint (27ms)

PASS lint packages/processor/test/externals.test.js
  ✓ ESLint (15ms)

PASS lint packages/processor/plugins/graph-nodes.js
  ✓ ESLint (19ms)

PASS lint packages/www/components/input.js
  ✓ ESLint (28ms)

PASS lint packages/webpack/loader.js
  ✓ ESLint (16ms)

PASS lint packages/cli/cli.js
  ✓ ESLint (28ms)

PASS lint packages/browserify/test/issue-105.test.js
  ● Console

  console.warn 
    
    /home/travis/build/tivac/modular-css/packages/browserify/test/issue-105.test.js
      16:13  warning  Skipped test  jest/no-disabled-tests
      23:13  warning  Skipped test  jest/no-disabled-tests
    
    ✖ 2 problems (0 errors, 2 warnings)
    

  ✓ ESLint (14ms)

PASS lint packages/namer/test/namer.test.js
  ✓ ESLint (27ms)

PASS lint packages/glob/test/glob.test.js
  ✓ ESLint (15ms)

PASS lint packages/postcss/postcss.js
  ✓ ESLint (13ms)

PASS lint packages/processor/test/exports.test.js
  ✓ ESLint (12ms)

PASS lint packages/namer/namer.js
  ✓ ESLint (30ms)

PASS lint packages/processor/test/getters.test.js
  ✓ ESLint (11ms)

PASS lint packages/www/state.js
  ✓ ESLint (19ms)

PASS lint packages/processor/test/issues/issue-191.test.js
  ✓ ESLint (15ms)

PASS lint packages/www/process.js
  ✓ ESLint (27ms)

PASS lint packages/processor/test/issues/issue-56.test.js
  ✓ ESLint (17ms)

PASS lint packages/processor/test/issues/issue-24.test.js
  ✓ ESLint (31ms)

PASS lint packages/processor/test/issues/issue-98.test.js
  ✓ ESLint (16ms)

PASS lint packages/processor/plugins/values-local.js
  ✓ ESLint (23ms)

PASS lint packages/processor/plugins/values-composed.js
  ✓ ESLint (12ms)

PASS lint packages/rollup/parser.js
  ✓ ESLint (16ms)

PASS lint packages/processor/plugins/values-namespaced.js
  ✓ ESLint (10ms)

PASS lint packages/www/components/editor.js
  ✓ ESLint (13ms)

PASS lint packages/processor/plugins/values-imported.js
  ✓ ESLint (13ms)

PASS lint packages/processor/plugins/values-export.js
  ✓ ESLint (13ms)

PASS lint packages/processor/plugins/keyframes.js
  ✓ ESLint (17ms)

PASS lint packages/rollup-rewriter/formats/amd.js
  ✓ ESLint (9ms)

PASS lint packages/processor/test/unicode.test.js
  ✓ ESLint (10ms)

PASS lint packages/aliases/aliases.js
  ✓ ESLint (12ms)

PASS lint packages/processor/lib/graph-tiers.js
  ✓ ESLint (11ms)

PASS lint packages/rollup-rewriter/formats/system.js
  ✓ ESLint (10ms)

PASS lint packages/glob/glob.js
  ✓ ESLint (11ms)

PASS lint packages/test-utils/logs.js
  ✓ ESLint (18ms)

PASS lint packages/processor/lib/resolve.js
  ✓ ESLint (11ms)

PASS lint packages/processor/lib/output.js
  ✓ ESLint (11ms)

PASS lint packages/test-utils/rollup-build-snapshot.js
  ✓ ESLint (12ms)

PASS lint packages/processor/test/issues/issue-66.test.js
  ✓ ESLint (9ms)

PASS lint packages/processor/test/issues/issue-261.test.js
  ✓ ESLint (12ms)

PASS lint packages/test-utils/rollup-code-snapshot.js
  ✓ ESLint (9ms)

PASS lint packages/test-utils/read-dir.js
  ✓ ESLint (14ms)

PASS lint packages/processor/lib/identifiers.js
  ✓ ESLint (15ms)

PASS lint packages/paths/paths.js
  ✓ ESLint (9ms)

PASS lint packages/browserify/test/lib/bundle.js
  ✓ ESLint (9ms)

PASS lint packages/processor/lib/normalize.js
  ✓ ESLint (11ms)

PASS lint packages/rollup-rewriter/formats/es.js
  ✓ ESLint (9ms)

PASS lint packages/test-utils/relative.js
  ✓ ESLint (12ms)

PASS lint packages/test-utils/write.js
  ✓ ESLint (9ms)

PASS lint packages/test-utils/rollup-watching.js
  ✓ ESLint (10ms)

PASS lint packages/processor/lib/message.js
  ✓ ESLint (9ms)

PASS lint packages/www/components/errors.js
  ✓ ESLint (19ms)

PASS lint packages/processor/lib/relative.js
  ✓ ESLint (10ms)

PASS lint packages/test-utils/read.js
  ✓ ESLint (7ms)

PASS lint packages/test-utils/exists.js
  ✓ ESLint (10ms)

PASS lint packages/test-utils/warn.js
  ✓ ESLint (8ms)

PASS lint packages/test-utils/prefix.js
  ✓ ESLint (7ms)

PASS lint packages/test-utils/namer.js
  ✓ ESLint (7ms)

PASS lint packages/www/stubs/fs.js
  ✓ ESLint (16ms)

PASS lint packages/www/stubs/generic.js
  ✓ ESLint (9ms)

PASS tests packages/rollup/test/rollup.test.js
  /rollup.js
    ✓ should be a function (3ms)
    ✓ should generate exports (432ms)
    ✓ should be able to tree-shake results (14ms)
    ✓ should generate CSS (15ms)
    ✓ should handle assetFileNames being undefined (11ms)
    ✓ should correctly pass to/from params for relative paths (18ms)
    ✓ should correctly handle hashed output (32ms)
    ✓ should correctly handle hashed output with external source maps & json files (16ms)
    ✓ should avoid generating empty CSS (4ms)
    ✓ should generate JSON (18ms)
    ✓ should generate JSON with a custom name (11ms)
    ✓ should use the common arg for unreferenced CSS (14ms)
    ✓ should provide named exports (11ms)
    ✓ should provide style export (8ms)
    ✓ should warn that styleExport and done aren't compatible (6ms)
    ✓ should generate external source maps (12ms)
    ✓ should warn & not export individual keys when they are not valid identifiers (10ms)
    ✓ should allow disabling of named exports (9ms)
    ✓ shouldn't disable sourcemap generation (10ms)
    ✓ should not output sourcemaps when they are disabled (9ms)
    ✓ should respect the CSS dependency tree (24ms)
    ✓ should accept an existing processor instance (11ms)
    ✓ should accept an existing processor instance (no css in bundle) (6ms)
    ✓ should output a proxy in dev mode (16ms)
    ✓ should log in verbose mode (32ms)
    case sensitivity tests
      ○ skipped 1 test
    errors
      ✓ should throw errors in in before plugins (4ms)
      ✓ should throw errors in after plugins (5ms)
      ○ skipped 1 test

PASS tests packages/processor/test/options.test.js
  /processor.js
    options
      cwd
        ✓ should use an absolute path (17ms)
        ✓ should accept a relative path but make it absolute (3ms)
      namer
        ✓ should use a custom naming function (3ms)
        ✓ should require a namer if a string is passed (23ms)
        ✓ should use the default naming function if a non-function is passed (2ms)
      map
        ✓ should generate source maps (19ms)
        ✓ should generate external source maps (32ms)
      exportGlobals
        ✓ should not export :global values when exportGlobals is false (3ms)
      rewrite
        ✓ should rewrite url() references by default (5ms)
        ✓ should not rewrite url() references when falsey (3ms)
        ✓ should pass through to postcss-url as config (19ms)
      postcss options
        ✓ should support custom parsers (14ms)
      lifecycle options
        before
          ✓ should run sync postcss plugins before processing (3ms)
          ✓ should run async postcss plugins before processing (4ms)
        processing
          ✓ should run sync postcss plugins processing processing (3ms)
          ✓ should run async postcss plugins processing processing (4ms)
          ✓ should include exports from 'modular-css-export' modules (2ms)
        after
          ✓ should use postcss-url by default (3ms)
          ✓ should run sync postcss plugins (3ms)
          ✓ should run async postcss plugins (4ms)
        done
          ✓ should run sync postcss plugins done processing (3ms)
          ✓ should run async postcss plugins done processing (10ms)
        verbose
          ✓ should output debugging messages when verbose mode is enabled (35ms)

PASS tests packages/processor/test/api.test.js
  /processor.js
    API
      ✓ should be a function (14ms)
      .string()
        ✓ should process a string (4ms)
      .file()
        ✓ should process a relative file (4ms)
        ✓ should process an absolute file (3ms)
      .remove()
        ✓ should remove a relative file (2ms)
        ✓ should remove an absolute file (2ms)
        ✓ should remove multiple files (5ms)
        ✓ should return an array of removed files (3ms)
      .invalidate()
        ✓ should invalidate a relative file (3ms)
        ✓ should invalidate an absolute file (3ms)
        ✓ should throw if no file is passed (13ms)
        ✓ should throw if an invalid file is passed (22ms)
        ✓ should invalidate all dependents as well (22ms)
        ✓ should reprocess invalidated files (17ms)
      .dependencies()
        ✓ should return the dependencies of the specified file (12ms)
        ✓ should return the overall order of dependencies if no file is specified (10ms)
      .dependents()
        ✓ should return the dependents of the specified file (11ms)
        ✓ should throw if no file is passed (10ms)
      .output()
        ✓ should reject unknown files (2ms)
        ✓ should return a postcss result (13ms)
        ✓ should generate css representing the output from all added files (20ms)
        ✓ should avoid duplicating files in the output (13ms)
        ✓ should generate a JSON structure of all the compositions (17ms)
        ✓ should order output by dependencies, then alphabetically (26ms)
        ✓ should support returning output for specified relative files (22ms)
        ✓ should support returning output for specified absolute files (23ms)
        ✓ should allow for seperate source map output (15ms)
      .compositions
        ✓ should return compositions for loaded files (12ms)
      ._resolve()
        ✓ should run resolvers until a match is found (2ms)
        ✓ should fall back to a default resolver (3ms)

PASS tests packages/rollup/test/watch.test.js
  /rollup.js
    watch mode
      ✓ should generate updated output (354ms)
      ✓ should generate updated output for composes changes (334ms)
      ✓ should update when a dependency changes (364ms)
      ✓ should update when adding new css files (317ms)
      ✓ should update when a shared dependency changes (355ms)
      ○ skipped 1 test

PASS tests packages/rollup/test/splitting.test.js
  /rollup.js
    code splitting
      ✓ should support splitting up CSS files (45ms)
      ✓ should support outputting metadata about CSS dependencies (39ms)
      ✓ should support outputting metadata about CSS dependencies to a named file  (35ms)
      ✓ should support splitting up CSS files w/ shared assets (35ms)
      ✓ shouldn't put bundle-specific CSS in common.css (37ms)
      ✓ should support manual chunks (41ms)
      ✓ should support dynamic imports (46ms)
      ✓ shouldn't break when dynamic imports are tree-shaken away (rollup/rollup#2659) (5ms)
      ✓ should ouput only 1 JSON file (18ms)
      ✓ shouldn't use entry hashes as part of the CSS file names (14ms)
      ✓ should dedupe chunk names using rollup's incrementing counter logic (71ms)
      ✓ should dedupe chunk names using rollup's incrementing counter logic (hashed) (65ms)
      ✓ should support circular JS dependencies (13ms)

(node:5327) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
PASS tests packages/webpack/test/webpack.test.js
  /webpack.js
    ✓ should be a function (2ms)
    ✓ should output css to disk (260ms)
    ✓ should output json to disk (41ms)
    ✓ should output inline source maps (27ms)
    ✓ should output external source maps to disk (23ms)
    ✓ should report errors (84ms)
    ✓ should report warnings on invalid property names (28ms)
    ✓ should handle dependencies (56ms)
    ✓ should support ES2015 default exports (24ms)
    ✓ should support ES2015 named exports (28ms)
    ✓ should support disabling namedExports when the option is set (31ms)
    ✓ should generate correct builds in watch mode when files change (486ms)
    ✓ should generate correct builds when files change (58ms)
    ✓ should accept an existing processor instance (24ms)

PASS tests packages/browserify/test/factor-bundle.test.js
  /browserify.js
    factor-bundle
      ✓ should be supported (383ms)
      ✓ should support files w/o commonalities (49ms)
      ✓ should properly handle files w/o dependencies (76ms)
      ✓ should support relative paths within factor-bundle files (71ms)
      ✓ should avoid outputting empty css files by default (63ms)
      ✓ should output empty css files when asked (58ms)

PASS tests packages/svelte/test/svelte.test.js
  /svelte.js
    ✓ should extract CSS from a <style> tag (56ms)
    ✓ should extract CSS from a <link> tag ("no script") (20ms)
    ✓ should extract CSS from a <link> tag ("existing script") (16ms)
    ✓ should extract CSS from a <link> tag ("single quotes") (24ms)
    ✓ should extract CSS from a <link> tag ("unquoted") (20ms)
    ✓ should extract CSS from a <link> tag ("values") (16ms)
    ✓ should ignore files without <style> blocks (5ms)
    ✓ should handle errors: "invalid reference <script> - <style>" (10ms)
    ✓ should handle errors: "invalid reference template - <style>" (5ms)
    ✓ should handle errors: "invalid reference <script> - <link>" (6ms)
    ✓ should handle errors: "invalid reference template - <link>" (5ms)
    ✓ should handle errors: "empty css file - <style>" (3ms)
    ✓ should handle errors: "empty css file - <link>" (4ms)
    ✓ should throw on both <style> and <link> in one file (1ms)
    ✓ should support verbose output: "<style>" (13ms)
    ✓ should support verbose output: "<link>" (14ms)
    ✓ should remove files before reprocessing when config.clean is set (8ms)

PASS tests packages/browserify/test/browserify.test.js
  /browserify.js
    basic functionality
      ✓ should not error if no options are supplied (15ms)
      ✓ should error if an invalid extension is applied (2ms)
      ✓ should error on invalid CSS (66ms)
      ✓ should replace require() calls with the exported identifiers (39ms)
      ✓ should correctly rewrite urls based on the destination file (37ms)
      ✓ should use the specified namer function (39ms)
      ✓ should include all CSS dependencies in output css (50ms)
      ✓ should write out the complete exported identifiers when `json` is specified (38ms)
      ✓ should not include duplicate files in the output multiple times (66ms)
      ✓ should output an inline source map when the debug option is specified (58ms)
      ✓ should output an external source map when the debug option is specified (49ms)

PASS tests packages/processor/test/composition.test.js
  /processor.js
    composition
      ✓ should fail on invalid composes syntax (55ms)
      ✓ should fail if a composition references a non-existant class (6ms)
      ✓ should fail if a composition references a non-existant file (3ms)
      ✓ should fail if a composition references a non-existant file from a custom resolver (4ms)
      ✓ should fail if composes isn't the first property (3ms)
      ✓ should fail on rules that use multiple selectors (5ms)
      ✓ should compose a single class (3ms)
      ✓ should allow comments before composes (4ms)
      ✓ should compose from globals (2ms)
      ✓ should compose multiple classes (2ms)
      ✓ should compose from other files (8ms)

PASS tests packages/rollup-rewriter/test/rewriter.test.js
  rollup-rewriter
    ✓ should require a loadfn (2ms)
    ✓ should error on unsupported formats (101ms)
    ✓ shouldn't require a loader (90ms)
    ✓ should support loader & loadfn (96ms)
    ✓ should only rewrite when necessary (54ms)
    ✓ should log details in verbose mode (47ms)

PASS tests packages/postcss/test/postcss.test.js
  /postcss.js
    ✓ should be a function (1ms)
    ✓ should process CSS and output the result (23ms)
    ✓ should process CSS with dependencies and output the result (20ms)
    ✓ should process CSS and output exports as a message (4ms)
    ✓ should accept normal processor options (4ms)
    ✓ should accept a `json` property and write exports to that file (21ms)
    ✓ should use output filepath for json if a custom path isn't provided (19ms)
    ✓ should be usable like a normal postcss plugin (3ms)
    ✓ should output json when used within postcss (3ms)
    ✓ should accept json args in either position with postcss (3ms)

PASS tests packages/browserify/test/watchify.test.js
  /browserify.js
    watchify
      ✓ shouldn't cache file contents between watchify runs (260ms)
      ✓ shouldn't explode on invalid CSS (197ms)

PASS tests packages/processor/test/values.test.js
  /processor.js
    values
      ✓ should fail on invalid value syntax (65ms)
      ✓ should fail if a value imports a non-existant reference (3ms)
      ✓ should support simple values (5ms)
      ✓ should support local values in value composition (12ms)
      ✓ should support importing variables from a file (8ms)
      ✓ should support exporting imported variables (14ms)
      ✓ should support value composition (7ms)
      ✓ should support value namespaces (15ms)
      ✓ should support value replacement in :external(...) (30ms)

PASS tests packages/aliases/test/aliases.test.js
  @modular-css/path-aliases
    ✓ should return a falsey value if a file isn't found (2ms)
    ✓ should return the absolute path if a file is found (1ms)
    ✓ should check multiple aliases for files & return the first match
    ✓ should be usable as a modular-css resolver (25ms)
    ✓ should fall through to the default resolver (19ms)

PASS tests packages/processor/test/scoping.test.js
  /processor.js
    scoping
      ✓ should scope classes, ids, and keyframes (20ms)
      ✓ should handle pseudo classes correctly (4ms)
      ✓ should not allow :global classes to overlap with local ones (local before global) (48ms)
      ✓ should not allow :global classes to overlap with local ones (global before local) (3ms)
      ✓ should not allow empty :global() selectors (3ms)

PASS tests packages/browserify/test/issue-58.test.js
  /browserify.js
    /issues
      /58
        ✓ should update when CSS dependencies change (223ms)

PASS tests packages/processor/test/keyframes.test.js
  /processor.js
    scoping
      ✓ should leave unknown animation names alone (25ms)
      ✓ should update scoped animations from the scoping plugin's message (4ms)
      ✓ should update the animation-name property (2ms)
      ✓ should update multiple animations properly (3ms)
      ✓ should update scoped prefixed animations from the scoping plugin's message (3ms)

PASS tests packages/browserify/test/issue-313.test.js
  /browserify.js
    /issues
      /313
        ✓ should include all dependencies after watchify update (435ms)

PASS tests packages/cli/test/cli.test.js
  /cli.js
    ✓ should show help with no args (232ms)
    ✓ should default to outputting to stdout (266ms)
    ✓ should support outputting to a file (--out) (266ms)
    ✓ should support outputting compositions to a file (--json) (271ms)
    ✓ should return the correct error code on invalid CSS (268ms)
    ✓ should support disabling url() rewriting (--no-rewrite) (272ms)

PASS tests packages/paths/test/paths.test.js
  @modular-css/path-resolver
    ✓ should return a falsey value if a file isn't found (2ms)
    ✓ should return the absolute path if a file is found (1ms)
    ✓ should check multiple paths for files & return the first match (1ms)
    ✓ should be usable as a modular-css resolver (27ms)

PASS tests packages/processor/test/externals.test.js
  /processor.js
    externals
      ✓ should fail if not a valid composition reference (55ms)
      ✓ should fail if not referencing another file (5ms)
      ✓ should fail on bad class references (9ms)
      ✓ should support overriding external values (33ms)

PASS tests packages/namer/test/namer.test.js
  @modular-css/shortnames
    ✓ should hash its arguments (2ms)
    ✓ should differ within files (1ms)
    ✓ should re-use selectors for identical inputs (1ms)
    ✓ should differ between files
    ✓ should wrap as necessary (46ms)

PASS tests packages/glob/test/glob.test.js
  /glob.js
    ✓ should be a function (1ms)
    ✓ should use a default search (27ms)
    ✓ should find files on disk & output css (11ms)
    ✓ should support exclusion patterns (13ms)

PASS tests packages/processor/test/exports.test.js
  /processor.js
    exports
      ✓ should export an object of arrays containing strings (16ms)
      ✓ should export identifiers and their classes (17ms)

PASS tests packages/processor/test/getters.test.js
  /processor.js
    getters
      .file
        ✓ should return all the files that have been added (29ms)
      .options
        ✓ should return the merged options object (1ms)

PASS tests packages/processor/test/issues/issue-56.test.js
  /issues
    /56
      ✓ should prune rules that only compose, but leave them in the exports (28ms)

PASS tests packages/processor/test/issues/issue-24.test.js
  /issues
    /24
      ✓ should be able to compose using a value (24ms)

PASS tests packages/processor/test/issues/issue-98.test.js
  /issues
    /98
      ✓ should prune rules that only compose, but leave them in the exports (19ms)

FAIL tests packages/processor/test/unicode.test.js
  /processor.js
    unicode
      ✕ should support unicode classes & ids (35ms)

  ● /processor.js › unicode › should support unicode classes & ids

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot "/processor.js unicode should support unicode classes & ids 1".

    - Snapshot
    + Received

    @@ -13,17 +13,17 @@
      #\\3A \\`\\( { background: lime; }
      #\\31 23 { background: lime; }
      #\\31 a2b3c { background: lime; }
      #\\<p\\> { background: lime; }
      #\\<\\>\\<\\<\\<\\>\\>\\<\\> { background: lime; }
    - #\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\\\.\\+\\+\\+\\+\\+\\+\\+\\\\.\\\\.\\+\\+\\+\\\\.\\>\\+\\+\\\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\\\.\\>\\\\.\\+\\+\\+\\\\.\\------\\\\.\\--------\\\\.\\>\\+\\\\.\\>\\\\. { background: lime; }
    + #\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. { background: lime; }
      #\\# { background: lime; }
      #\\#\\# { background: lime; }
    - #\\#\\.\\\\#\\.\\\\# { background: lime; }
    + #\\#\\.\\#\\.\\# { background: lime; }
      #\\_ { background: lime; }
      #\\{\\} { background: lime; }
    - #\\.fake-class { background: lime; }
    + #\\.fake\\-class { background: lime; }
      #foo\\.bar { background: lime; }
      #\\3A hover { background: lime; }
      #\\3A hover\\3A focus\\3A active { background: lime; }
      #\\[attr\\=value\\] { background: lime; }
      #f\\/o\\/o { background: lime; }
    @@ -41,25 +41,25 @@
      .\\2318\\2325 { background: lime; }
      .\\1D11E\\266A\\2669\\266B\\266C { background: lime; }
      .\\1F4A9 { background: lime; }
      .\\? { background: lime; }
      .\\@ { background: lime; }
    - .\\\\. { background: lime; }
    + .\\. { background: lime; }
      .\\3A\\) { background: lime; }
      .\\3A\\`\\( { background: lime; }
      .\\31 23 { background: lime; }
      .\\31 a2b3c { background: lime; }
      .\\<p\\> { background: lime; }
      .\\<\\>\\<\\<\\<\\>\\>\\<\\> { background: lime; }
    - .\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<-\\]\\>\\+\\+\\\\.\\>\\+\\\\.\\+\\+\\+\\+\\+\\+\\+\\\\.\\\\.\\+\\+\\+\\\\.\\>\\+\\+\\\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\\\.\\>\\\\.\\+\\+\\+\\\\.\\------\\\\.\\--------\\\\.\\>\\+\\\\.\\>\\\\. { background: lime; }
    + .\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.------\\.--------\\.\\>\\+\\.\\>\\. { background: lime; }
      .\\\\# { background: lime; }
      .\\\\#\\# { background: lime; }
    - .\\\\#\\.\\\\#\\.\\\\# { background: lime; }
    + .\\\\#\\.\\#\\.\\# { background: lime; }
      .\\_ { background: lime; }
      .\\{\\} { background: lime; }
      .\\\\#fake\\-id { background: lime; }
    - .foo\\\\.bar { background: lime; }
    + .foo\\.bar { background: lime; }
      .\\3Ahover { background: lime; }
      .\\3Ahover\\3A focus\\3A active { background: lime; }
      .\\[attr\\=value\\] { background: lime; }
      .f\\/o\\/o { background: lime; }
      .f\\\\o\\\\o { background: lime; }

      21 |             });
      22 | 
    > 23 |             expect(css).toMatchSnapshot();
         |                         ^
      24 |         });
      25 |     });
      26 | });

      at Object.toMatchSnapshot (packages/processor/test/unicode.test.js:23:25)

 › 1 snapshot failed.
PASS tests packages/processor/test/issues/issue-66.test.js
  /issues
    /66
      ✓ should ignore remove calls for unknown files (16ms)

PASS tests packages/processor/test/issues/issue-261.test.js
  /issues
    /261
      ✓ should allow colons in rules that also use :external() (24ms)

Summary of all failing tests
FAIL packages/processor/test/unicode.test.js
  ● /processor.js › unicode › should support unicode classes & ids

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot "/processor.js unicode should support unicode classes & ids 1".

    - Snapshot
    + Received

    @@ -13,17 +13,17 @@
      #\\3A \\`\\( { background: lime; }
      #\\31 23 { background: lime; }
      #\\31 a2b3c { background: lime; }
      #\\<p\\> { background: lime; }
      #\\<\\>\\<\\<\\<\\>\\>\\<\\> { background: lime; }
    - #\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\\\.\\+\\+\\+\\+\\+\\+\\+\\\\.\\\\.\\+\\+\\+\\\\.\\>\\+\\+\\\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\\\.\\>\\\\.\\+\\+\\+\\\\.\\------\\\\.\\--------\\\\.\\>\\+\\\\.\\>\\\\. { background: lime; }
    + #\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. { background: lime; }
      #\\# { background: lime; }
      #\\#\\# { background: lime; }
    - #\\#\\.\\\\#\\.\\\\# { background: lime; }
    + #\\#\\.\\#\\.\\# { background: lime; }
      #\\_ { background: lime; }
      #\\{\\} { background: lime; }
    - #\\.fake-class { background: lime; }
    + #\\.fake\\-class { background: lime; }
      #foo\\.bar { background: lime; }
      #\\3A hover { background: lime; }
      #\\3A hover\\3A focus\\3A active { background: lime; }
      #\\[attr\\=value\\] { background: lime; }
      #f\\/o\\/o { background: lime; }
    @@ -41,25 +41,25 @@
      .\\2318\\2325 { background: lime; }
      .\\1D11E\\266A\\2669\\266B\\266C { background: lime; }
      .\\1F4A9 { background: lime; }
      .\\? { background: lime; }
      .\\@ { background: lime; }
    - .\\\\. { background: lime; }
    + .\\. { background: lime; }
      .\\3A\\) { background: lime; }
      .\\3A\\`\\( { background: lime; }
      .\\31 23 { background: lime; }
      .\\31 a2b3c { background: lime; }
      .\\<p\\> { background: lime; }
      .\\<\\>\\<\\<\\<\\>\\>\\<\\> { background: lime; }
    - .\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<-\\]\\>\\+\\+\\\\.\\>\\+\\\\.\\+\\+\\+\\+\\+\\+\\+\\\\.\\\\.\\+\\+\\+\\\\.\\>\\+\\+\\\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\\\.\\>\\\\.\\+\\+\\+\\\\.\\------\\\\.\\--------\\\\.\\>\\+\\\\.\\>\\\\. { background: lime; }
    + .\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.------\\.--------\\.\\>\\+\\.\\>\\. { background: lime; }
      .\\\\# { background: lime; }
      .\\\\#\\# { background: lime; }
    - .\\\\#\\.\\\\#\\.\\\\# { background: lime; }
    + .\\\\#\\.\\#\\.\\# { background: lime; }
      .\\_ { background: lime; }
      .\\{\\} { background: lime; }
      .\\\\#fake\\-id { background: lime; }
    - .foo\\\\.bar { background: lime; }
    + .foo\\.bar { background: lime; }
      .\\3Ahover { background: lime; }
      .\\3Ahover\\3A focus\\3A active { background: lime; }
      .\\[attr\\=value\\] { background: lime; }
      .f\\/o\\/o { background: lime; }
      .f\\\\o\\\\o { background: lime; }

      21 |             });
      22 | 
    > 23 |             expect(css).toMatchSnapshot();
         |                         ^
      24 |         });
      25 |     });
      26 | });

      at Object.toMatchSnapshot (packages/processor/test/unicode.test.js:23:25)


Snapshot Summary
 › 1 snapshot failed from 1 test suite. Inspect your code changes or run `npm test -- -u` to update them.

Test Suites: 1 failed, 70 skipped, 122 passed, 123 of 193 total
Tests:       1 failed, 74 skipped, 324 passed, 399 total
Snapshots:   1 failed, 286 passed, 287 total
Time:        22.775s
Ran all test suites in 2 projects.
npm ERR! Test failed.  See above for more details.
TravisBuddy Request Identifier: 64b914b0-1f95-11e9-8849-9b4b2b790172
@codecov

This comment has been minimized.

Copy link

commented Jan 24, 2019

Codecov Report

Merging #551 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #551   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files          46       46           
  Lines        1026     1026           
  Branches      157      157           
=======================================
  Hits         1015     1015           
  Misses         11       11
Impacted Files Coverage Δ
packages/processor/processor.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64538f8...4bb3a7a. Read the comment docs.

@tivac tivac merged commit 86d6d68 into master Jan 24, 2019

4 checks passed

codecov/patch Coverage not affected when comparing 64538f8...4bb3a7a
Details
codecov/project 98.92% remains the same compared to 64538f8
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tivac tivac deleted the postcss-options branch Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.