Skip to content

Commit c9c2477

Browse files
committed
Release v1.4.1
1 parent c93a3ea commit c9c2477

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ See the **TypeScript Declarations** at the top of [rev-web-assets.ts](rev-web-as
153153
- 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):  _Run a command on each file in a folder and its subfolders_
154154
- 🔍 [replacer-util](https://github.com/center-key/replacer-util):  _Find and replace strings or template outputs in text files_
155155
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets):  _Revision web asset filenames with cache busting content hash fingerprints_
156-
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into named groups of easy to manage commands_
156+
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into groups of easy to manage commands_
157157
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):  _Check the markup validity of HTML files using the W3C validator_
158158

159159
Feel free to submit questions at:<br>

dist/rev-web-assets.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! rev-web-assets v1.4.0 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
1+
//! rev-web-assets v1.4.1 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
22

33
export type Settings = {
44
cd: string | null;

dist/rev-web-assets.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! rev-web-assets v1.4.0 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
1+
//! rev-web-assets v1.4.1 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
22

33
import chalk from 'chalk';
44
import crypto from 'crypto';
@@ -72,8 +72,8 @@ const revWebAssets = {
7272
if (assetDetail && !assetDetail.usedIn.includes(detail.canonical))
7373
assetDetail.usedIn.push(detail.canonical);
7474
const trailingSlashes = /\/*$/;
75-
const absoluteUrl = () => settings.metaContentBase.replace(trailingSlashes, '/') +
76-
assetDetail?.canonicalFolder + '/' + assetDetail?.hashedFilename;
75+
const metaContentBase = settings.metaContentBase?.replace(trailingSlashes, '/');
76+
const absoluteUrl = () => `${metaContentBase}${assetDetail?.canonicalFolder}/${assetDetail?.hashedFilename}`;
7777
const hashedUri = () => {
7878
const noBase = !settings.metaContentBase || !pre.startsWith('<meta');
7979
return noBase ? revWebAssets.hashFilename(uri, assetDetail.hash) : absoluteUrl();
@@ -142,7 +142,7 @@ const revWebAssets = {
142142
!fs.statSync(target).isDirectory() ? 'Target is not a folder: ' + target :
143143
null;
144144
if (errorMessage)
145-
throw Error('[rev-web-assets] ' + errorMessage);
145+
throw new Error('[rev-web-assets] ' + errorMessage);
146146
const manifest = revWebAssets.manifest(source, target, settings.skip);
147147
revWebAssets.processHtml(manifest, settings);
148148
revWebAssets.processCss(manifest, settings);

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rev-web-assets",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Revision web asset filenames with cache busting content hash fingerprints",
55
"license": "MIT",
66
"type": "module",
@@ -62,7 +62,7 @@
6262
"devDependencies": {
6363
"@eslint/js": "~9.9",
6464
"@types/fancy-log": "~2.0",
65-
"@types/node": "~22.2",
65+
"@types/node": "~22.3",
6666
"add-dist-header": "~1.4",
6767
"assert-deep-strict-equal": "~1.2",
6868
"copy-file-util": "~1.2",

0 commit comments

Comments
 (0)