From 4de0f26dd358e9fc9a76693d6121527dc6e6ba7b Mon Sep 17 00:00:00 2001 From: dpilafian Date: Wed, 12 Jul 2023 03:50:09 -0700 Subject: [PATCH] Release v1.1.2 --- dist/replacer.d.ts | 2 +- dist/replacer.js | 5 +++-- package.json | 2 +- spec/fixtures/target/bundle.js | 4 ++-- spec/fixtures/target/mock1.html | 4 ++-- spec/fixtures/target/mock1.js | 2 +- spec/fixtures/target/subfolder/mock2.html | 2 +- spec/fixtures/target/subfolder/mock2.js | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/dist/replacer.d.ts b/dist/replacer.d.ts index 2b48605..d944804 100644 --- a/dist/replacer.d.ts +++ b/dist/replacer.d.ts @@ -1,4 +1,4 @@ -//! replacer-util v1.1.1 ~~ https://github.com/center-key/replacer-util ~~ MIT License +//! replacer-util v1.1.2 ~~ https://github.com/center-key/replacer-util ~~ MIT License export type Settings = { cd: string | null; diff --git a/dist/replacer.js b/dist/replacer.js index 524c50f..a05ceb5 100644 --- a/dist/replacer.js +++ b/dist/replacer.js @@ -1,4 +1,4 @@ -//! replacer-util v1.1.1 ~~ https://github.com/center-key/replacer-util ~~ MIT License +//! replacer-util v1.1.2 ~~ https://github.com/center-key/replacer-util ~~ MIT License import { globSync } from 'glob'; import { isBinary } from 'istextorbinary'; @@ -99,7 +99,8 @@ const replacer = { const out3 = settings.find ? out2.replaceAll(settings.find, newStr) : out2; const out4 = settings.regex ? out3.replace(settings.regex, newStr) : out3; const out5 = settings.noSourceMap ? out4.replace(sourceMapLine, '') : out4; - const final = append && settings.header ? '\n' + out5 : out5; + const out6 = out5.trimStart(); + const final = append && settings.header ? '\n' + out6 : out6; fs.mkdirSync(path.dirname(file.dest), { recursive: true }); return append ? fs.appendFileSync(file.dest, final) : fs.writeFileSync(file.dest, final); }; diff --git a/package.json b/package.json index fd7b25d..ed52afb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "replacer-util", - "version": "1.1.1", + "version": "1.1.2", "description": "Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)", "license": "MIT", "type": "module", diff --git a/spec/fixtures/target/bundle.js b/spec/fixtures/target/bundle.js index 4a706f3..a393067 100644 --- a/spec/fixtures/target/bundle.js +++ b/spec/fixtures/target/bundle.js @@ -6,7 +6,7 @@ let π1 = 3.14; let τ1 = 2 * π1; const info1 = { - banner: '🔍🔍🔍 replacer-util v1.1.1 🔍🔍🔍', + banner: '🔍🔍🔍 replacer-util v1.1.2 🔍🔍🔍', description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)', list1: 'insect, insect, insect', list2: 'insect, iNsEcT, INSECT, insect', @@ -23,7 +23,7 @@ let π2 = 3.14; let τ2 = 2 * π2; const info2 = { - banner: '🔍🔍🔍 replacer-util v1.1.1 🔍🔍🔍', + banner: '🔍🔍🔍 replacer-util v1.1.2 🔍🔍🔍', description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)', list1: 'insect, insect, insect', list2: 'insect, iNsEcT, INSECT, insect', diff --git a/spec/fixtures/target/mock1.html b/spec/fixtures/target/mock1.html index 034eeb1..6f3fc5a 100644 --- a/spec/fixtures/target/mock1.html +++ b/spec/fixtures/target/mock1.html @@ -14,7 +14,7 @@

🔍🔍🔍 replacer-util 🔍🔍🔍

Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)

I, for one, welcome our new A.I. module overlords.

@@ -25,7 +25,7 @@

Find and replace strings or template outputs in text files (CLI tool designe let τ2 = 2 * π2; const info2 = { - banner: '🔍🔍🔍 replacer-util v1.1.1 🔍🔍🔍', + banner: '🔍🔍🔍 replacer-util v1.1.2 🔍🔍🔍', description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)', list1: 'A.I. module, A.I. module, A.I. module', list2: 'A.I. module, iNsEcT, INSECT, A.I. module', diff --git a/spec/fixtures/target/mock1.js b/spec/fixtures/target/mock1.js index 80311ab..a172490 100644 --- a/spec/fixtures/target/mock1.js +++ b/spec/fixtures/target/mock1.js @@ -5,7 +5,7 @@ let π1 = 3.14; let τ1 = 2 * π1; const info1 = { - banner: '🔍🔍🔍 replacer-util v1.1.1 🔍🔍🔍', + banner: '🔍🔍🔍 replacer-util v1.1.2 🔍🔍🔍', description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)', list1: 'A.I. module, A.I. module, A.I. module', list2: 'A.I. module, iNsEcT, INSECT, A.I. module', diff --git a/spec/fixtures/target/subfolder/mock2.html b/spec/fixtures/target/subfolder/mock2.html index e5ff7d0..dab2773 100644 --- a/spec/fixtures/target/subfolder/mock2.html +++ b/spec/fixtures/target/subfolder/mock2.html @@ -12,7 +12,7 @@

🔍🔍🔍 replacer-util 🔍🔍🔍

Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)

I, for one, welcome our new A.I. module overlords.

diff --git a/spec/fixtures/target/subfolder/mock2.js b/spec/fixtures/target/subfolder/mock2.js index 2b8ab5d..d1f9fea 100644 --- a/spec/fixtures/target/subfolder/mock2.js +++ b/spec/fixtures/target/subfolder/mock2.js @@ -5,7 +5,7 @@ let π2 = 3.14; let τ2 = 2 * π2; const info2 = { - banner: '🔍🔍🔍 replacer-util v1.1.1 🔍🔍🔍', + banner: '🔍🔍🔍 replacer-util v1.1.2 🔍🔍🔍', description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm scripts)', list1: 'A.I. module, A.I. module, A.I. module', list2: 'A.I. module, iNsEcT, INSECT, A.I. module',