peterramsing / lost

LostGrid is a powerful grid system built in PostCSS that works with any preprocessor and even vanilla CSS.

Home Page:http://lostgrid.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

bbaaxx opened this issue · comments

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 !

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.

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