Skip to content

Commit a4e6fc1

Browse files
committed
Release v1.3.5
1 parent 6da2d43 commit a4e6fc1

6 files changed

+28
-25
lines changed

.github/workflows/release-on-vtag.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
name: release
1+
name: Create Release
2+
23
on:
34
push:
45
tags:
56
- 'v*'
7+
68
jobs:
79
build:
8-
name: Create Release
910
runs-on: ubuntu-latest
1011
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/create-release@v1
12+
- uses: actions/checkout@v4 #see: https://github.com/actions/checkout/releases
13+
- uses: actions/create-release@v1 #see: https://github.com/actions/create-release/releases
1314
env:
1415
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1516
with:
+5-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: build
1+
name: Build and Run Specifications
2+
23
on: [push]
4+
35
jobs:
46
build:
5-
name: Run Specifications
67
runs-on: ubuntu-latest
78
steps:
8-
- uses: actions/checkout@v3
9-
- uses: actions/setup-node@v3
9+
- uses: actions/checkout@v4 #see: https://github.com/actions/checkout/releases
10+
- uses: actions/setup-node@v4 #see: https://github.com/actions/setup-node/releases
1011
- run: npm install
1112
- run: npm test

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _Revision web asset filenames with cache busting content hash fingerprints_
55

66
[![License:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/center-key/rev-web-assets/blob/main/LICENSE.txt)
77
[![npm](https://img.shields.io/npm/v/rev-web-assets.svg)](https://www.npmjs.com/package/rev-web-assets)
8-
[![Build](https://github.com/center-key/rev-web-assets/workflows/build/badge.svg)](https://github.com/center-key/rev-web-assets/actions/workflows/run-spec-on-push.yaml)
8+
[![Build](https://github.com/center-key/rev-web-assets/actions/workflows/run-spec-on-push.yaml/badge.svg)](https://github.com/center-key/rev-web-assets/actions/workflows/run-spec-on-push.yaml)
99

1010
**rev-web-assets** updates the asset filenames of a website to contain a eight-digit hex hash. 
1111
The command's console output includes a timestamp and formatting helpful in build systems.

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.3.4 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
1+
//! rev-web-assets v1.3.5 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
22

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

dist/rev-web-assets.js

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

33
import chalk from 'chalk';
44
import crypto from 'crypto';
@@ -68,11 +68,12 @@ const revWebAssets = {
6868
assetDetail.references++;
6969
if (assetDetail && !assetDetail.usedIn.includes(detail.canonical))
7070
assetDetail.usedIn.push(detail.canonical);
71+
const trailingSlashes = /\/*$/;
72+
const absoluteUrl = () => settings.metaContentBase.replace(trailingSlashes, '/') +
73+
assetDetail?.canonicalFolder + '/' + assetDetail?.hashedFilename;
7174
const hashedUri = () => {
72-
const hashed = revWebAssets.hashFilename(uri, assetDetail.hash);
7375
const noBase = !settings.metaContentBase || !pre.startsWith('<meta');
74-
const trailingSlashes = /\/*$/;
75-
return noBase ? hashed : settings.metaContentBase.replace(trailingSlashes, '/') + hashed;
76+
return noBase ? revWebAssets.hashFilename(uri, assetDetail.hash) : absoluteUrl();
7677
};
7778
return assetDetail?.hash ? pre + hashedUri() + post : matched;
7879
};

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rev-web-assets",
3-
"version": "1.3.4",
3+
"version": "1.3.5",
44
"description": "Revision web asset filenames with cache busting content hash fingerprints",
55
"license": "MIT",
66
"type": "module",
@@ -80,18 +80,18 @@
8080
},
8181
"devDependencies": {
8282
"@types/fancy-log": "~2.0",
83-
"@types/node": "~20.11",
84-
"@typescript-eslint/eslint-plugin": "~6.19",
85-
"@typescript-eslint/parser": "~6.19",
86-
"add-dist-header": "~1.3",
87-
"assert-deep-strict-equal": "~1.1",
88-
"copy-file-util": "~1.1",
89-
"eslint": "~8.56",
83+
"@types/node": "~20.12",
84+
"@typescript-eslint/eslint-plugin": "~7.7",
85+
"@typescript-eslint/parser": "~7.7",
86+
"add-dist-header": "~1.4",
87+
"assert-deep-strict-equal": "~1.2",
88+
"copy-file-util": "~1.2",
89+
"eslint": "8.57.0",
9090
"jshint": "~2.13",
91-
"mocha": "~10.2",
91+
"mocha": "~10.4",
9292
"rimraf": "~5.0",
9393
"run-scripts-util": "~1.2",
94-
"typescript": "~5.3",
95-
"w3c-html-validator": "~1.6"
94+
"typescript": "~5.4",
95+
"w3c-html-validator": "~1.8"
9696
}
9797
}

0 commit comments

Comments
 (0)