github macbre/analyze-css v2.0.0
Typing and promises

Typing

This major release of analyze-css brings d.ts types definition (#354) that can be used by TypeScript-powered projects that use this library. Additionally, your IDE should provide you with auto-completion even when you're using JavaScript.

Screenshot 2021-08-04 at 14 59 00

Breaking changes in v2.x

Watch out for the new Promises-based API which is a breaking change (#357 + #367 + #368):

```js
const analyze = require('analyze-css');

(async() => {
const results = await analyze('.foo {margin: 0 !important}');
console.log(results); // example? see below
})();
```

Changelog

  • #233 bug - Freezing on a syntax (reported by @gmetais)
  • #236 enhancement - Fix CSS parsing freeze
  • #354 internals - Add .d.ts files with types declaration
  • #356 enhancement - Rewrite to promises
  • #357 enhancement - Use Promises
  • #361 dependencies - build(deps-dev): bump browserslist from 4.16.6 to 4.16.7 (by @dependabot[bot])
  • #362 dependencies - build(deps): bump sass from 1.37.0 to 1.37.2 (by @dependabot[bot])
  • #363 enhancement - Provide types declaration
  • #364 TypeScript - Simplify imports and split the code
  • #365 dependencies - build(deps): bump sass from 1.37.2 to 1.37.5 (by @dependabot[bot])
  • #366 dependencies - Updating rules/prefixes.json
  • #367 TypeScript - Provide typing for on() method
  • #368 TypeScript - Use @types/css for even better typing
  • #369 dependencies - Updating rules/prefixes.json
  • #370 security - Upgrade path-parse to version 1.0.7
latest release: v2.1.0
one month ago