{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/postcss/issues/545","labels_url":"https://api.github.com/repos/postcss/postcss/issues/545/labels{/name}","comments_url":"https://api.github.com/repos/postcss/postcss/issues/545/comments","events_url":"https://api.github.com/repos/postcss/postcss/issues/545/events","html_url":"https://github.com/postcss/postcss/issues/545","id":104865557,"number":545,"title":"Rule constructor triggers derecation messages","user":{"login":"pascalduez","id":335467,"avatar_url":"https://avatars.githubusercontent.com/u/335467?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalduez","html_url":"https://github.com/pascalduez","followers_url":"https://api.github.com/users/pascalduez/followers","following_url":"https://api.github.com/users/pascalduez/following{/other_user}","gists_url":"https://api.github.com/users/pascalduez/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalduez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalduez/subscriptions","organizations_url":"https://api.github.com/users/pascalduez/orgs","repos_url":"https://api.github.com/users/pascalduez/repos","events_url":"https://api.github.com/users/pascalduez/events{/privacy}","received_events_url":"https://api.github.com/users/pascalduez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-04T10:29:56Z","updated_at":"2015-09-04T11:51:13Z","closed_at":"2015-09-04T10:31:15Z","body":"Hey,\r\n\r\ncreating a new rule with the rule constructor triggers warnings since v5:\r\n\r\n```js\r\nlet newRule = postcss.rule({\r\n  selectors: [ ... ],\r\n  nodes: someRule.nodes,\r\n  source: someRule.source,\r\n  semicolon: true,\r\n});\r\n```\r\n\r\n```\r\nNode#semicolon is deprecated. Use Node#raws.semicolon\r\nNode#before is deprecated. Use Node#raws.before\r\n```\r\n\r\nThe Node constructor is attaching every passed properties to the instance, with no distinction between direct or raws ones:\r\nhttps://github.com/postcss/postcss/blob/master/lib/node.es6#L36\r\n\r\n\r\nThe API docs are not of much help regarding which properties are accepted:\r\nhttps://github.com/postcss/postcss/blob/master/docs/api.md#postcssruleprops\r\n\r\nI wouldn't be against some enlightenment here :)"},"comment":{"url":"https://api.github.com/repos/postcss/postcss/issues/comments/137715997","html_url":"https://github.com/postcss/postcss/issues/545#issuecomment-137715997","issue_url":"https://api.github.com/repos/postcss/postcss/issues/545","id":137715997,"user":{"login":"pascalduez","id":335467,"avatar_url":"https://avatars.githubusercontent.com/u/335467?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalduez","html_url":"https://github.com/pascalduez","followers_url":"https://api.github.com/users/pascalduez/followers","following_url":"https://api.github.com/users/pascalduez/following{/other_user}","gists_url":"https://api.github.com/users/pascalduez/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalduez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalduez/subscriptions","organizations_url":"https://api.github.com/users/pascalduez/orgs","repos_url":"https://api.github.com/users/pascalduez/repos","events_url":"https://api.github.com/users/pascalduez/events{/privacy}","received_events_url":"https://api.github.com/users/pascalduez/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T11:51:13Z","updated_at":"2015-09-04T11:51:13Z","body":"```\r\nNode#before is deprecated. Use Node#raws.before\r\n/[...]/postcss-quantity-queries/node_modules/postcss/lib/lazy-result.js:204\r\n            throw error;\r\n                  ^\r\nError: hey\r\n    at Declaration.get (/[...]/postcss-quantity-queries/node_modules/postcss/lib/node.js:280:19)\r\n    at /[...]/postcss-quantity-queries/dist/index.js:85:23\r\n    at /[...]/postcss-quantity-queries/node_modules/postcss/lib/container.js:88:34\r\n    at /[...]/postcss-quantity-queries/node_modules/postcss/lib/container.js:73:26\r\n    at Rule.each (/[...]/postcss-quantity-queries/node_modules/postcss/lib/container.js:59:22)\r\n    at Rule.walk (/[...]/postcss-quantity-queries/node_modules/postcss/lib/container.js:72:21)\r\n    at Rule.walkDecls (/[...]/postcss-quantity-queries/node_modules/postcss/lib/container.js:86:25)\r\n    at cleanIndent (/[...]/postcss-quantity-queries/dist/index.js:84:15)\r\n    at processAtRule (/[...]/postcss-quantity-queries/dist/index.js:75:3)\r\n    at /[...]/postcss-quantity-queries/node_modules/postcss/lib/container.js:141:34\r\n```"}}