peterramsing / lost

LostGrid is a powerful grid system built in PostCSS that works with any preprocessor and even vanilla CSS.
http://lostgrid.org
MIT License
4.5k stars 160 forks source link

Deprecation of Node move methods in postcss is triggering deprecation message "Node#moveTo was deprecated. Use Container#append." #372

Closed bbaaxx closed 7 years ago

bbaaxx commented 7 years ago

Is this a feature request or a bug report? bug report

What is the current behavior? The message:

`Node#moveTo was deprecated. Use Container#append.`

is being displayed when using lost with sass-loader.

It is caused by a deprecation notice in postcss pushed by this commit.

Lost seems to make use of those methods here but that was as far I could get.

If it's a bug please provide the steps to reproduce it and maybe some code samples.

wepback.conf.js

...
  { // sass
    test: /\.(scss|sass)$/,
    use: [
      { loader: 'style-loader' },
      { loader: 'css-loader' },
      { loader: 'sass-loader' },
    ]
  },
  { // cssnext
    test: /\.css$/,
    use: [
      { loader: 'style-loader' },
      { loader: 'css-loader' },
      { loader: 'postcss-loader' },
    ]
  },
...

.postcssrc.json

{
  "use": [
    "postcss-import",
    "postcss-url",
    "postcss-cssnext",
    "cssnano",
    "postcss-browser-reporter",
    "postcss-reporter"
  ],
  "plugins": {
    "lost": {}
  }
}

What is the desired behavior? No deprecation message is shown.

What version of LostGrid, browser and browser version are affected by this issue? Did this happen in previous versions?

package.json

...
"lost": "^8.0.0",
"node-sass": "^4.5.3",
"postcss-cssnext": "^2.11.0",
"postcss-import": "^10.0.0",
"postcss-loader": "^2.0.5",
"rimraf": "^2.6.1",
"sass-loader": "^6.0.5",
"style-loader": "^0.18.2",
....

Anything else? Thanks for all your hard work !

thebuilder commented 7 years ago

Updated the code in #375 - give it a try. Haven't tested it on a large codebase, just validated that it can process the css files.

peterramsing commented 7 years ago

@thebuilder Thanks so much for the MR. See notes there.