Upgrading postcss 4 to 5
Breaking4.1.16 → 5.2.18Breaking5Deprecated2New11Changed14Fixed37Other20
BreakingUpgrade verdict
5 breaking changes.
In plain terms
- safe option was removed and Safe Parse was moved to separated project.Use parser: require('postcss-safe-parser') instead.
- Very rare returning new Root plugin API was removed.
- Method Node#replace was removed in favor of replaceWith.
- Node.js 0.10 is not officially supported anymore.
Must act Top 5 of 7 that need code or config changes
Requires Node.js >=0.12 from 5.0.7 (none stated before).
Adds chalk ^1.1.3, supports-color ^3.2.3.
Drops es6-promise.
Installs 11 packages in all (was 4).
Also installs ansi-regex, ansi-styles, escape-string-regexp, has-ansi, has-flag, strip-ansi.
No longer installs amdefine.
Moves js-base64 2.1.9 → 2.6.4, source-map 0.4.4 → 0.5.7. Your build may pick other versions.
What you must change
Breaking5
safe option was removed and Safe Parse was moved to separated project.Use parser: require('postcss-safe-parser') instead.
safeVery rare returning new Root plugin API was removed.
RootMethod Node#replace was removed in favor of replaceWith.
Node#replacereplaceWithNode.js 0.10 is not officially supported anymore.
Node#toString does not include before space symbols for root nodes.
Node#toStringbeforeDeprecations to plan for
Deprecated2
Deprecate CssSyntaxError#generated in favor of input.
CssSyntaxError#generatedinputDeprecate Root#prevMap in favor of Root.source.input.map.
Root#prevMapRoot.source.input.map