Skip to content

Commit

Permalink
Release v1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Apr 28, 2024
1 parent 6da2d43 commit a4e6fc1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 25 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@v3
- 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
9 changes: 5 additions & 4 deletions .github/workflows/run-spec-on-push.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: build
name: Build and Run Specifications

on: [push]

jobs:
build:
name: Run Specifications
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4 #see: https://github.com/actions/checkout/releases
- uses: actions/setup-node@v4 #see: https://github.com/actions/setup-node/releases
- run: npm install
- run: npm test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _Revision web asset filenames with cache busting content hash fingerprints_

[![License:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/center-key/rev-web-assets/blob/main/LICENSE.txt)
[![npm](https://img.shields.io/npm/v/rev-web-assets.svg)](https://www.npmjs.com/package/rev-web-assets)
[![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)
[![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)

**rev-web-assets** updates the asset filenames of a website to contain a eight-digit hex hash. 
The command's console output includes a timestamp and formatting helpful in build systems.
Expand Down
2 changes: 1 addition & 1 deletion dist/rev-web-assets.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! rev-web-assets v1.3.4 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
//! rev-web-assets v1.3.5 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License

export type Settings = {
cd: string | null;
Expand Down
9 changes: 5 additions & 4 deletions dist/rev-web-assets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! rev-web-assets v1.3.4 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
//! rev-web-assets v1.3.5 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License

import chalk from 'chalk';
import crypto from 'crypto';
Expand Down Expand Up @@ -68,11 +68,12 @@ const revWebAssets = {
assetDetail.references++;
if (assetDetail && !assetDetail.usedIn.includes(detail.canonical))
assetDetail.usedIn.push(detail.canonical);
const trailingSlashes = /\/*$/;
const absoluteUrl = () => settings.metaContentBase.replace(trailingSlashes, '/') +
assetDetail?.canonicalFolder + '/' + assetDetail?.hashedFilename;
const hashedUri = () => {
const hashed = revWebAssets.hashFilename(uri, assetDetail.hash);
const noBase = !settings.metaContentBase || !pre.startsWith('<meta');
const trailingSlashes = /\/*$/;
return noBase ? hashed : settings.metaContentBase.replace(trailingSlashes, '/') + hashed;
return noBase ? revWebAssets.hashFilename(uri, assetDetail.hash) : absoluteUrl();
};
return assetDetail?.hash ? pre + hashedUri() + post : matched;
};
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rev-web-assets",
"version": "1.3.4",
"version": "1.3.5",
"description": "Revision web asset filenames with cache busting content hash fingerprints",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -80,18 +80,18 @@
},
"devDependencies": {
"@types/fancy-log": "~2.0",
"@types/node": "~20.11",
"@typescript-eslint/eslint-plugin": "~6.19",
"@typescript-eslint/parser": "~6.19",
"add-dist-header": "~1.3",
"assert-deep-strict-equal": "~1.1",
"copy-file-util": "~1.1",
"eslint": "~8.56",
"@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.0",
"jshint": "~2.13",
"mocha": "~10.2",
"mocha": "~10.4",
"rimraf": "~5.0",
"run-scripts-util": "~1.2",
"typescript": "~5.3",
"w3c-html-validator": "~1.6"
"typescript": "~5.4",
"w3c-html-validator": "~1.8"
}
}

0 comments on commit a4e6fc1

Please sign in to comment.