[Pkg-javascript-devel] Bug#1006359: node-eslint-utils: Update to node-dot-prop 7

Yadd yadd at debian.org
Thu Feb 24 08:21:29 GMT 2022


Package: node-eslint-utils
Version: 2.1.0-3
Severity: serious
Tags: ftbfs patch
Justification: test fails

Hi,

I just released node-dot-prop 7.2.0. API changed. Here is a trivial
patch that fixes test.

Cheers,
Yadd
-------------- next part --------------
diff --git a/debian/control b/debian/control
index a1019eb..67aa29f 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends:
  debhelper-compat (= 13),
  eslint <!nocheck>,
  mocha <!nocheck>,
- node-dot-prop <!nocheck>,
+ node-dot-prop (>= 7) <!nocheck>,
  node-mysticatea-eslint-plugin <!nocheck>,
  node-rollup-plugin-sourcemaps,
  nodejs (>= 12),
diff --git a/debian/patches/2003_fix_for_dor-prop_7.patch b/debian/patches/2003_fix_for_dor-prop_7.patch
new file mode 100644
index 0000000..86d7902
--- /dev/null
+++ b/debian/patches/2003_fix_for_dor-prop_7.patch
@@ -0,0 +1,52 @@
+Description: fix for dot-prop 7
+Author: Yadd <yadd at debian.org>
+Forwarded: not-needed
+Last-Update: 2022-02-24
+
+--- a/test/has-side-effect.js
++++ b/test/has-side-effect.js
+@@ -1,7 +1,7 @@
+ import assert from "assert"
+ import eslint from "eslint"
+ import semver from "semver"
+-import dp from "dot-prop"
++import {getProperty} from "dot-prop"
+ import { hasSideEffect } from "../src/"
+ 
+ describe("The 'hasSideEffect' function", () => {
+@@ -286,7 +286,7 @@
+             linter.defineRule("test", context => ({
+                 Program(node) {
+                     actual = hasSideEffect(
+-                        dp.get(node, key),
++                        getProperty(node, key),
+                         context.getSourceCode(),
+                         options
+                     )
+--- a/test/is-parenthesized.js
++++ b/test/is-parenthesized.js
+@@ -1,5 +1,5 @@
+ import assert from "assert"
+-import dotProp from "dot-prop"
++import {getProperty} from "dot-prop"
+ import eslint from "eslint"
+ import { isParenthesized } from "../src/"
+ 
+@@ -213,7 +213,7 @@
+                     linter.defineRule("test", context => ({
+                         Program(node) {
+                             actual = isParenthesized(
+-                                dotProp.get(node, key),
++                                getProperty(node, key),
+                                 context.getSourceCode()
+                             )
+                         },
+@@ -289,7 +289,7 @@
+                         Program(node) {
+                             actual = isParenthesized(
+                                 2,
+-                                dotProp.get(node, key),
++                                getProperty(node, key),
+                                 context.getSourceCode()
+                             )
+                         },
diff --git a/debian/patches/series b/debian/patches/series
index 24b6681..7fd238a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 2001_privacy.patch
 2002_use_older_mysticatea.patch
+2003_fix_for_dor-prop_7.patch


More information about the Pkg-javascript-devel mailing list