From e5bbdef4dcd8a20cd5b18f8b15446de2b74d8296 Mon Sep 17 00:00:00 2001 From: Titus Date: Fri, 13 Jan 2023 12:51:56 +0100 Subject: [PATCH 1/5] Fix typo Signed-off-by: Titus --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 8d528ec..5f341f3 100644 --- a/readme.md +++ b/readme.md @@ -191,7 +191,7 @@ calls, and then serialize with whatever (`astring`, `escodegen`). Default handlers for elements (`Record`). -Each key is an element name, each value is a [`Handle`][handle]. +Each key is an node type, each value is a [`Handle`][handle]. ### `Handle` From 793c45f8f5a51d6ccfa44da28e8fc6b5c0d90d93 Mon Sep 17 00:00:00 2001 From: Titus Date: Fri, 13 Jan 2023 13:05:46 +0100 Subject: [PATCH 2/5] Fix typo Signed-off-by: Titus --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 5f341f3..69101dc 100644 --- a/readme.md +++ b/readme.md @@ -191,7 +191,7 @@ calls, and then serialize with whatever (`astring`, `escodegen`). Default handlers for elements (`Record`). -Each key is an node type, each value is a [`Handle`][handle]. +Each key is a node type, each value is a [`Handle`][handle]. ### `Handle` From 65d19084a1581dd6bb208d2095ed07b1e81b5fc3 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Fri, 13 Jan 2023 08:45:43 -0700 Subject: [PATCH 3/5] Add `ignore-scripts` to `.npmrc` Closes GH-5. Reviewed-by: Titus Wormer --- .npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmrc b/.npmrc index 43c97e7..9951b11 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ package-lock=false +ignore-scripts=true From 54952b56451096ee6953cd55a14554fcce5484e5 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 17 Jan 2023 11:07:21 +0100 Subject: [PATCH 4/5] Update `style-to-object` --- lib/handlers/element.js | 6 +----- package.json | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/handlers/element.js b/lib/handlers/element.js index b2bfc2c..f0718a2 100644 --- a/lib/handlers/element.js +++ b/lib/handlers/element.js @@ -14,12 +14,8 @@ import { start as identifierStart, cont as identifierCont } from 'estree-util-is-identifier-name' -// @ts-expect-error: `style-to-object` doesn’t support actual ESM + TS correctly. import styleToObject from 'style-to-object' -/** @type {(value: string, iterator?: (property: string, value: string, declaration: unknown) => void) => Record} */ -const style = styleToObject - const own = {}.hasOwnProperty /** @@ -185,7 +181,7 @@ function parseStyle(value, tagName) { const result = {} try { - style(value, iterator) + styleToObject(value, iterator) } catch (error) { const exception = /** @type {Error} */ (error) exception.message = diff --git a/package.json b/package.json index 74c3e5e..f05537f 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "mdast-util-mdxjs-esm": "^1.0.0", "property-information": "^6.0.0", "space-separated-tokens": "^2.0.0", - "style-to-object": "^0.4.0", + "style-to-object": "^0.4.1", "unist-util-position": "^4.0.0", "zwitch": "^2.0.0" }, From 6d351ae82b3b589a49241a266c56ba906310b217 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 17 Jan 2023 11:07:32 +0100 Subject: [PATCH 5/5] 2.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f05537f..311455c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hast-util-to-estree", - "version": "2.2.0", + "version": "2.2.1", "description": "hast utility to transform to estree (JavaScript AST) JSX", "license": "MIT", "keywords": [