Skip to content

Commit

Permalink
Replace dedent package with string-dedent
Browse files Browse the repository at this point in the history
The dedent package seems to be dead. I ran into this issue which has been
open for 4 years and seems pretty serious:
dmnd/dedent#20

Replace the package with string-dedent, an alternative maintained by the
author of the TC39 String.dedent proposal.
  • Loading branch information
ptomato committed Nov 9, 2022
1 parent b3aae70 commit 14e8f07
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 11 deletions.
17 changes: 16 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"babel-plugin-tester": "^10.1.0",
"big.js": "6.1.1",
"decimal.js": "10.3.1",
"dedent": "^0.7.0",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "^7.30.1",
Expand All @@ -45,6 +44,7 @@
"node-polyfill-webpack-plugin": "^1.1.4",
"path-browserify": "^1.0.1",
"prettier": "2.5.1",
"string-dedent": "^3.0.1",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1"
},
Expand Down
2 changes: 1 addition & 1 deletion src/examples/adding-with-logging.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

export const ADDING_WITH_LOGGING = {
title: "Using the Playground: Adding with Logging",
Expand Down
2 changes: 1 addition & 1 deletion src/examples/arith-operators.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

const title = "Basics: Arithmetic Operators";
const description = "A tour of the arithmetic operators: + - * / %.";
Expand Down
2 changes: 1 addition & 1 deletion src/examples/comparisons.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

const title = "Basics: Comparisons";
const description = "Contrast comparisons: < > <= >=.";
Expand Down
3 changes: 1 addition & 2 deletions src/examples/equality.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

const title = "Basics: Equality";
const description = "Egads, check out equality.";
Expand All @@ -18,7 +18,6 @@ const mixedTypesTriple = 2m === 2;
const mixedBigIntTriple = 10n === 10m;
log("not all equal:", sameTypesTriple, mixedTypesTriple, mixedBigIntTriple);
`;

export const EQUALITY = {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/formatting.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

const title = "Methods: Formatting";
const description = "Format your decimals.";
Expand Down
2 changes: 1 addition & 1 deletion src/examples/rounding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

const title = "Methods: Rounding";
const description = "Getting precise with decimals.";
Expand Down
2 changes: 1 addition & 1 deletion src/examples/scientific.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

export const SCIENTIFIC_NOTATION = {
title: "In Action: Scientific Notation",
Expand Down
2 changes: 1 addition & 1 deletion src/examples/using-the-dom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dedent from "dedent";
import dedent from "string-dedent";

export const USING_THE_DOM = {
title: "Using the DOM",
Expand Down

0 comments on commit 14e8f07

Please sign in to comment.