Skip to content

Commit

Permalink
Release v1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Apr 17, 2024
1 parent ad38005 commit e10855e
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 29 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release-on-vtag.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: release
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 #see: https://github.com/actions/checkout/releases
- uses: actions/create-release@v1
- uses: actions/checkout@v4 #see: https://github.com/actions/checkout/releases
- uses: actions/create-release@v1 #see: https://github.com/actions/create-release/releases
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/run-spec-on-push.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: build
name: Build and Run Specifications

on: [push]

jobs:
build:
name: Run Specifications
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 #see: https://github.com/actions/checkout/releases
Expand Down
2 changes: 1 addition & 1 deletion dist/replacer.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! replacer-util v1.2.5 ~~ https://github.com/center-key/replacer-util ~~ MIT License
//! replacer-util v1.2.6 ~~ https://github.com/center-key/replacer-util ~~ MIT License

export type Settings = {
cd: string | null;
Expand Down
5 changes: 3 additions & 2 deletions dist/replacer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! replacer-util v1.2.5 ~~ https://github.com/center-key/replacer-util ~~ MIT License
//! replacer-util v1.2.6 ~~ https://github.com/center-key/replacer-util ~~ MIT License

import { globSync } from 'glob';
import { isBinary } from 'istextorbinary';
Expand Down Expand Up @@ -86,7 +86,8 @@ const replacer = {
const parsedPath = path.parse(origin);
const dir = slash(parsedPath.dir);
const filePath = dir + '/' + slash(parsedPath.base);
return { ...parsedPath, dir: dir, path: filePath };
const folder = path.basename(dir);
return { ...parsedPath, dir: dir, folder: folder, path: filePath };
};
const getWebRoot = (origin) => {
const depth = origin.substring(source.length).split('/').length - 2;
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "replacer-util",
"version": "1.2.5",
"version": "1.2.6",
"description": "Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -87,23 +87,23 @@
"fancy-log": "~2.0",
"glob": "~10.3",
"istextorbinary": "~9.5",
"liquidjs": "~10.10",
"liquidjs": "~10.11",
"slash": "~5.1"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "~6.5",
"@types/fancy-log": "~2.0",
"@types/node": "~20.11",
"@typescript-eslint/eslint-plugin": "~7.4",
"@typescript-eslint/parser": "~7.4",
"@types/node": "~20.12",
"@typescript-eslint/eslint-plugin": "~7.7",
"@typescript-eslint/parser": "~7.7",
"add-dist-header": "~1.4",
"assert-deep-strict-equal": "~1.2",
"copy-file-util": "~1.2",
"eslint": "~8.57",
"eslint": "8.57.0",
"fetch-json": "~3.3",
"highlight.js": "~11.9",
"jshint": "~2.13",
"mocha": "~10.3",
"mocha": "~10.4",
"pretty-print-json": "~3.0",
"rimraf": "~5.0",
"run-scripts-util": "~1.2",
Expand Down
2 changes: 1 addition & 1 deletion replacer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const replacer = {
webRoot: getWebRoot(file.origin),
};
globals[<keyof typeof globals>'pkg'] = pkg; //pkg global is deprecated
const engine = new Liquid({ globals });
const engine = new Liquid({ globals });
const versionFormatter = (numIds: number) =>
(str: string): string => str.replace(/[^0-9]*/, '').split('.').slice(0, numIds).join('.');
engine.registerFilter('version', versionFormatter(3));
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/target/bundle.js

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

4 changes: 2 additions & 2 deletions spec/fixtures/target/mock1.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2>Find and replace strings or template outputs in text files (CLI tool designe
<main>
<p>I, for one, welcome our new A.I. module overlords.</p>
<ul>
<li>Release: v1.2.5</li>
<li>Release: v1.2.6</li>
<li>Minor: v1.2</li>
<li>Major: v1</li>
</ul>
Expand All @@ -28,7 +28,7 @@ <h2>Find and replace strings or template outputs in text files (CLI tool designe
let τ2 = 2 * π2;

const info2 = {
banner: '🔍🔍🔍 replacer-util v1.2.5 🔍🔍🔍',
banner: '🔍🔍🔍 replacer-util v1.2.6 🔍🔍🔍',
description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)',
code: 'mock1',
file: '{"root":"","dir":"spec/fixtures/source","base":"mock1.html","ext":".html","name":"mock1","folder":"source","path":"spec/fixtures/source/mock1.html"}',
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/target/mock1.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let π1 = 3.14;
let τ1 = 2 * π1;

const info1 = {
banner: '🔍🔍🔍 replacer-util v1.2.5 🔍🔍🔍',
banner: '🔍🔍🔍 replacer-util v1.2.6 🔍🔍🔍',
description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)',
list1: 'A.I. module, A.I. module, A.I. module',
list2: 'A.I. module, iNsEcT, INSECT, A.I. module',
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/target/subfolder-a/mock2.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>🔍🔍🔍 replacer-util 🔍🔍🔍</h1>
<h2>Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)</h2>
<p>I, for one, welcome our new A.I. module overlords.</p>
<ul>
<li>Release: v1.2.5</li>
<li>Release: v1.2.6</li>
<li>Minor: v1.2</li>
<li>Major: v1</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/target/subfolder-a/mock2.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let π2 = 3.14;
let τ2 = 2 * π2;

const info2 = {
banner: '🔍🔍🔍 replacer-util v1.2.5 🔍🔍🔍',
banner: '🔍🔍🔍 replacer-util v1.2.6 🔍🔍🔍',
description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)',
code: 'mock2',
file: '{"root":"","dir":"spec/fixtures/source/subfolder-a","base":"mock2.js","ext":".js","name":"mock2","folder":"subfolder-a","path":"spec/fixtures/source/subfolder-a/mock2.js"}',
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/target/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2>Find and replace strings or template outputs in text files (CLI tool designe
<main>
<p>I, for one, welcome our new insect overlords.</p>
<ul>
<li>Release: v1.2.5</li>
<li>Release: v1.2.6</li>
<li>Minor: v1.2</li>
<li>Major: v1</li>
</ul>
Expand All @@ -28,7 +28,7 @@ <h2>Find and replace strings or template outputs in text files (CLI tool designe
let τ2 = 2 * π2;

const info2 = {
banner: '🔍🔍🔍 replacer-util v1.2.5 🔍🔍🔍',
banner: '🔍🔍🔍 replacer-util v1.2.6 🔍🔍🔍',
description: 'Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)',
code: 'mock1',
file: '{"root":"","dir":"spec/fixtures/source","base":"mock1.html","ext":".html","name":"mock1","folder":"source","path":"spec/fixtures/source/mock1.html"}',
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/target/web/subfolder-a/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>🔍🔍🔍 replacer-util 🔍🔍🔍</h1>
<h2>Find and replace strings or template outputs in text files (CLI tool designed for use in npm package.json scripts)</h2>
<p>I, for one, welcome our new insect overlords.</p>
<ul>
<li>Release: v1.2.5</li>
<li>Release: v1.2.6</li>
<li>Minor: v1.2</li>
<li>Major: v1</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/target/web/subfolder-b/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h2>Find and replace strings or template outputs in text files (CLI tool designe
<main>
<p>I, for one, welcome our new insect overlords.</p>
<ul>
<li>Release: v1.2.5</li>
<li>Release: v1.2.6</li>
<li>Minor: v1.2</li>
<li>Major: v1</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h2>Find and replace strings or template outputs in text files (CLI tool designe
<main>
<p>I, for one, welcome our new insect overlords.</p>
<ul>
<li>Release: v1.2.5</li>
<li>Release: v1.2.6</li>
<li>Minor: v1.2</li>
<li>Major: v1</li>
</ul>
Expand Down

0 comments on commit e10855e

Please sign in to comment.