{"action":"created","issue":{"url":"https://api.github.com/repos/tivac/modular-css/issues/496","repository_url":"https://api.github.com/repos/tivac/modular-css","labels_url":"https://api.github.com/repos/tivac/modular-css/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/tivac/modular-css/issues/496/comments","events_url":"https://api.github.com/repos/tivac/modular-css/issues/496/events","html_url":"https://github.com/tivac/modular-css/pull/496","id":352409392,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NzI2MTM0","number":496,"title":"fix(deps): update dependency postcss-selector-parser to v4","user":{"login":"renovate[bot]","id":29139614,"node_id":"MDM6Qm90MjkxMzk2MTQ=","avatar_url":"https://avatars1.githubusercontent.com/in/2740?v=4","gravatar_id":"","url":"https://api.github.com/users/renovate%5Bbot%5D","html_url":"https://github.com/apps/renovate","followers_url":"https://api.github.com/users/renovate%5Bbot%5D/followers","following_url":"https://api.github.com/users/renovate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/renovate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/renovate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renovate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/renovate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/renovate%5Bbot%5D/repos","events_url":"https://api.github.com/users/renovate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/renovate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-21T06:59:41Z","updated_at":"2018-08-21T16:57:51Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/tivac/modular-css/pulls/496","html_url":"https://github.com/tivac/modular-css/pull/496","diff_url":"https://github.com/tivac/modular-css/pull/496.diff","patch_url":"https://github.com/tivac/modular-css/pull/496.patch"},"body":"<p>This Pull Request updates dependency <code>postcss-selector-parser</code> (<a href=\"https://renovatebot.com/gh/postcss/postcss-selector-parser\">source</a>) from <code>^3.0.0</code> to <code>^4.0.0</code></p>\n<p><details><br />\n<summary>Release Notes</summary></p>\n<h3 id=\"v400httpsgithubcompostcsspostcss-selector-parserblobmasterchangelogmd8203400\"><a href=\"https://renovatebot.com/gh/postcss/postcss-selector-parser/blob/master/CHANGELOG.md#&#8203;400\"><code>v4.0.0</code></a></h3>\n<p><a href=\"https://renovatebot.com/gh/postcss/postcss-selector-parser/compare/v3.1.1…v4.0.0\">Compare Source</a><br />\nThis release has <strong>BREAKING CHANGES</strong> that were required to fix bugs regarding values with escape sequences. Please read carefully.</p>\n<ul>\n<li><p><strong>Identifiers with escapes</strong> - CSS escape sequences are now hidden from the public API by default.<br />\nThe normal value of a node like a class name or ID, or an aspect of a node such as attribute<br />\nselector's value, is unescaped. Escapes representing Non-ascii characters are unescaped into<br />\nunicode characters. For example: <code>bu\\tton, .\\31 00, #i\\2764\\FE0Fu, [attr=\"value is \\\"quoted\\\"\"]</code><br />\nwill parse respectively to the values <code>button</code>, <code>100</code>, <code>i❤️u</code>, <code>value is \"quoted\"</code>.<br />\nThe original escape sequences for these values can be found in the corresponding property name<br />\nin <code>node.raws</code>. Where possible, deprecation warnings were added, but the nature<br />\nof escape handling makes it impossible to detect what is escaped or not. Our expectation is<br />\nthat most users are neither expecting nor handling escape sequences in their use of this library,<br />\nand so for them, this is a bug fix. Users who are taking care to handle escapes correctly can<br />\nnow update their code to remove the escape handling and let us do it for them.</p></li>\n<li><p><strong>Mutating values with escapes</strong> - When you make an update to a node property that has escape handling<br />\nThe value is assumed to be unescaped, and any special characters are escaped automatically and<br />\nthe corresponding <code>raws</code> value is immediately updated. This can result in changes to the original<br />\nescape format. Where the exact value of the escape sequence is important there are methods that<br />\nallow both values to be set in conjunction. There are a number of new convenience methods for<br />\nmanipulating values that involve escapes, especially for attributes values where the quote mark<br />\nis involved. See <a href=\"https://renovatebot.com/gh/postcss/postcss-selector-parser/pull/133\">#&#8203;133</a> for an extensive<br />\nwrite-up on these changes.</p></li>\n</ul>\n<p><strong>Upgrade/API Example</strong></p>\n<p>In <code>3.x</code> there was no unescape handling and internal consistency of several properties was the caller's job to maintain. It was very easy for the developer<br />\nto create a CSS file that did not parse correctly when some types of values<br />\nwere in use.</p>\n<pre><code class=\"js language-js\">const selectorParser = require(\"postcss-selector-parser\");\nlet attr = selectorParser.attribute({attribute: \"id\", operator: \"=\", value: \"a-value\"});\nattr.value; // =&gt; \"a-value\"\nattr.toString(); // =&gt; [id=a-value]\n// Add quotes to an attribute's value.\n// All these values have to be set by the caller to be consistent:\n// no internal consistency is maintained.\nattr.raws.unquoted = attr.value\nattr.value = \"'\" + attr.value + \"'\";\nattr.value; // =&gt; \"'a-value'\"\nattr.quoted = true;\nattr.toString();  // =&gt; \"[id='a-value']\"</code></pre>\n<p>In <code>4.0</code> there is a convenient API for setting and mutating values<br />\nthat may need escaping. Especially for attributes.</p>\n<pre><code class=\"js language-js\">const selectorParser = require(\"postcss-selector-parser\");\n\n// The constructor requires you specify the exact escape sequence\nlet className = selectorParser.className({value: \"illegal class name\", raws: {value: \"illegal\\\\ class\\\\ name\"}});\nclassName.toString(); // =&gt; '.illegal\\\\ class\\\\ name'\n\n// So it's better to set the value as a property\nclassName = selectorParser.className();\n// Most properties that deal with identifiers work like this\nclassName.value = \"escape for me\";\nclassName.value; // =&gt; 'escape for me'\nclassName.toString(); // =&gt; '.escape\\\\ for\\\\ me'\n\n// emoji and all non-ascii are escaped to ensure it works in every css file.\nclassName.value = \"😱🦄😍\";\nclassName.value; // =&gt; '😱🦄😍'\nclassName.toString(); // =&gt; '.\\\\1F631\\\\1F984\\\\1F60D'\n\n// you can control the escape sequence if you want, or do bad bad things\nclassName.setPropertyAndEscape('value', 'xxxx', 'yyyy');\nclassName.value; // =&gt; \"xxxx\"\nclassName.toString(); // =&gt; \".yyyy\"\n\n// Pass a value directly through to the css output without escaping it. \nclassName.setPropertyWithoutEscape('value', '$REPLACE_ME$');\nclassName.value; // =&gt; \"$REPLACE_ME$\"\nclassName.toString(); // =&gt; \".$REPLACE_ME$\"\n\n// The biggest changes are to the Attribute class\n// passing quoteMark explicitly is required to avoid a deprecation warning.\nlet attr = selectorParser.attribute({attribute: \"id\", operator: \"=\", value: \"a-value\", quoteMark: null});\nattr.toString(); // =&gt; \"[id=a-value]\"\n// Get the value with quotes on it and any necessary escapes.\n// This is the same as reading attr.value in 3.x.\nattr.getQuotedValue(); // =&gt; \"a-value\";\nattr.quoteMark; // =&gt; null\n\n// Add quotes to an attribute's value.\nattr.quoteMark = \"'\"; // This is all that's required.\nattr.toString(); // =&gt; \"[id='a-value']\"\nattr.quoted; // =&gt; true\n// The value is still the same, only the quotes have changed.\nattr.value; // =&gt; a-value\nattr.getQuotedValue(); // =&gt; \"'a-value'\";\n\n// deprecated assignment, no warning because there's no escapes\nattr.value = \"new-value\";\n// no quote mark is needed so it is removed\nattr.getQuotedValue(); // =&gt; \"new-value\";\n\n// deprecated assignment, \nattr.value = \"\\\"a 'single quoted' value\\\"\";\n// &gt; (node:27859) DeprecationWarning: Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.\nattr.getQuotedValue(); // =&gt; '\"a \\'single quoted\\' value\"';\n// quote mark inferred from first and last characters.\nattr.quoteMark; // =&gt; '\"'\n\n// setValue takes options to make manipulating the value simple.\nattr.setValue('foo', {smart: true});\n// foo doesn't require any escapes or quotes.\nattr.toString(); // =&gt; '[id=foo]'\nattr.quoteMark; // =&gt; null \n\n// An explicit quote mark can be specified\nattr.setValue('foo', {quoteMark: '\"'});\nattr.toString(); // =&gt; '[id=\"foo\"]'\n\n// preserves quote mark by default\nattr.setValue('bar');\nattr.toString(); // =&gt; '[id=\"bar\"]'\nattr.quoteMark = null;\nattr.toString(); // =&gt; '[id=bar]'\n\n// with no arguments, it preserves quote mark even when it's not a great idea\nattr.setValue('a value \\n that should be quoted');\nattr.toString(); // =&gt; '[id=a\\\\ value\\\\ \\\\A\\\\ that\\\\ should\\\\ be\\\\ quoted]'\n\n// smart preservation with a specified default\nattr.setValue('a value \\n that should be quoted', {smart: true, preferCurrentQuoteMark: true, quoteMark: \"'\"});\n// =&gt; \"[id='a value \\\\A  that should be quoted']\"\nattr.quoteMark = '\"';\n// =&gt; '[id=\"a value \\\\A  that should be quoted\"]'\n\n// this keeps double quotes because it wants to quote the value and the existing value has double quotes.\nattr.setValue('this should be quoted', {smart: true, preferCurrentQuoteMark: true, quoteMark: \"'\"});\n// =&gt; '[id=\"this should be quoted\"]'\n\n// picks single quotes because the value has double quotes\nattr.setValue('a \"double quoted\" value', {smart: true, preferCurrentQuoteMark: true, quoteMark: \"'\"});\n// =&gt; \"[id='a \"double quoted\" value']\"\n\n// setPropertyAndEscape lets you do anything you want. Even things that are a bad idea and illegal.\nattr.setPropertyAndEscape('value', 'xxxx', 'the password is 42');\nattr.value; // =&gt; \"xxxx\"\nattr.toString(); // =&gt; \"[id=the password is 42]\"\n\n// Pass a value directly through to the css output without escaping it. \nattr.setPropertyWithoutEscape('value', '$REPLACEMENT$');\nattr.value; // =&gt; \"$REPLACEMENT$\"\nattr.toString(); // =&gt; \"[id=$REPLACEMENT$]\"</code></pre>\n<hr />\n<p></details></p>\n<hr />\n<p>This PR has been generated by <a href=\"https://renovatebot.com\">Renovate Bot</a>.</p>"},"comment":{"url":"https://api.github.com/repos/tivac/modular-css/issues/comments/414746200","html_url":"https://github.com/tivac/modular-css/pull/496#issuecomment-414746200","issue_url":"https://api.github.com/repos/tivac/modular-css/issues/496","id":414746200,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDc0NjIwMA==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-08-21T16:57:51Z","updated_at":"2018-08-21T16:57:51Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/tivac/modular-css/pull/496?src=pr&el=h1) Report\n> Merging [#496](https://codecov.io/gh/tivac/modular-css/pull/496?src=pr&el=desc) into [master](https://codecov.io/gh/tivac/modular-css/commit/e92795fd15578de20676741b2580d174037cd55f?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/tivac/modular-css/pull/496/graphs/tree.svg?token=EIUJKcuTE8&width=650&src=pr&height=150)](https://codecov.io/gh/tivac/modular-css/pull/496?src=pr&el=tree)\n\n```diff\n@@           Coverage Diff           @@\n##           master     #496   +/-   ##\n=======================================\n  Coverage   98.91%   98.91%           \n=======================================\n  Files          31       31           \n  Lines         831      831           \n  Branches      133      133           \n=======================================\n  Hits          822      822           \n  Misses          9        9\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/tivac/modular-css/pull/496?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/tivac/modular-css/pull/496?src=pr&el=footer). Last update [e92795f...f9a1758](https://codecov.io/gh/tivac/modular-css/pull/496?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov"}}