Skip to content

Commit

Permalink
fix(*): Fix compatibility with newer Hugo binaries (#46)
Browse files Browse the repository at this point in the history
- Update Hugo release release metadata, now accepting universal MacOS binaries
- Upgrade dependencies
- Update CI setup for testing (Node.js LTS versions, latest OS versions)

BREAKING CHANGE: At least NodeJS 14 is now required.
  • Loading branch information
dominique-mueller committed Sep 13, 2022
1 parent 9faece4 commit ff4820a
Show file tree
Hide file tree
Showing 13 changed files with 5,843 additions and 1,303 deletions.
5 changes: 2 additions & 3 deletions .eslintrc
Expand Up @@ -4,13 +4,12 @@
"tsconfigRootDir": ".",
"project": ["./tsconfig.json"]
},
"plugins": ["@typescript-eslint", "prettier", "simple-import-sort"],
"plugins": ["@typescript-eslint", "simple-import-sort", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"rules": {
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 14.15.x
node-version: 14.20.x
- name: Install dependencies
run: npm ci
- name: Build
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 14.15.x
node-version: 14.20.x
- name: Install dependencies
run: npm ci
- name: Lint
Expand All @@ -45,8 +45,10 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [12.22.1, 14.16.1, 15.14.0]
os: [ubuntu-20.04, windows-2019, macos-10.15]
# See <https://nodejs.org/en/about/releases/>
node-version: [14.20.0, 16.17.0, 18.9.0]
# See <https://github.com/actions/runner-images#available-images>
os: [ubuntu-22.04, windows-2022, macos-12]
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 14.15.x
node-version: 14.20.x
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -37,7 +37,7 @@ npm install hugo-installer --save-dev

### Requirements

- **hugo-installer** requires **NodeJS 12** (or higher) to be installed
- **hugo-installer** requires **NodeJS 14** (or higher) to be installed

<br><br><br>

Expand All @@ -54,7 +54,7 @@ The Hugo version can be set using the `--version` CLI parameter. For example:
```json
{
"scripts": {
"postinstall": "hugo-installer --version 0.82.0"
"postinstall": "hugo-installer --version 0.102.3"
}
}
```
Expand All @@ -67,7 +67,7 @@ You can also use the extended version of Hugo (for some operating systems!) by s
```json
{
"scripts": {
"postinstall": "hugo-installer --version 0.46 --extended"
"postinstall": "hugo-installer --version 0.102.3 --extended"
}
}
```
Expand All @@ -78,7 +78,7 @@ Hugo version to be configured someplace else, e.g. in a `otherDependencies` obje
```json
{
"otherDependencies": {
"hugo": "0.46"
"hugo": "0.102.3"
},
"scripts": {
"postinstall": "hugo-installer --version otherDependencies.hugo"
Expand Down
4 changes: 2 additions & 2 deletions bin/hugo-installer.ts
Expand Up @@ -17,7 +17,7 @@ import { installHugo } from '../index.js';
import { InstallHugoOptions } from '../src/install-hugo.interfaces.js';

// Read CLI parameters
const argv = yargs(hideBin(process.argv))
const argv: InstallHugoOptions = yargs(hideBin(process.argv))
.version(false) // Disable default version flag (we're using our own in the next line)
.option('arch', {
choices: ['arm', 'arm64', 'x64', 'x86'],
Expand Down Expand Up @@ -78,7 +78,7 @@ const argv = yargs(hideBin(process.argv))
type: 'string',
required: true,
})
.strict().argv;
.strict().argv as InstallHugoOptions;

/**
* Bin
Expand Down
64 changes: 64 additions & 0 deletions generated/hugo-releases-meta.json
Expand Up @@ -38,6 +38,10 @@
"os": "win32",
"arch": "x86",
"fileNamePatternHistory": [
{
"version": "0.102.0",
"fileNamePattern": null
},
{
"version": "0.20.4",
"fileNamePattern": "{{variant}}_{{version}}_Windows-32bit.zip"
Expand Down Expand Up @@ -76,6 +80,18 @@
"os": "darwin",
"arch": "x64",
"fileNamePatternHistory": [
{
"version": "0.102.0",
"fileNamePattern": "{{variant}}_{{version}}_macOS-universal.tar.gz"
},
{
"version": "0.89.1",
"fileNamePattern": "{{variant}}_{{version}}_macOS-64bit.tar.gz"
},
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.20.4",
"fileNamePattern": "{{variant}}_{{version}}_macOS-64bit.tar.gz"
Expand Down Expand Up @@ -174,6 +190,26 @@
"os": "darwin",
"arch": "arm64",
"fileNamePatternHistory": [
{
"version": "0.102.0",
"fileNamePattern": "{{variant}}_{{version}}_macOS-universal.tar.gz"
},
{
"version": "0.89.1",
"fileNamePattern": "{{variant}}_{{version}}_macOS-ARM64.tar.gz"
},
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.88.1",
"fileNamePattern": "{{variant}}_{{version}}_macOS-ARM64.tar.gz"
},
{
"version": "0.88.0",
"fileNamePattern": null
},
{
"version": "0.81.0",
"fileNamePattern": "{{variant}}_{{version}}_macOS-ARM64.tar.gz"
Expand Down Expand Up @@ -222,6 +258,10 @@
"os": "linux",
"arch": "x86",
"fileNamePatternHistory": [
{
"version": "0.102.0",
"fileNamePattern": null
},
{
"version": "0.20.4",
"fileNamePattern": "{{variant}}_{{version}}_Linux-32bit.tar.gz"
Expand Down Expand Up @@ -354,6 +394,10 @@
"os": "freebsd",
"arch": "x86",
"fileNamePatternHistory": [
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.20.4",
"fileNamePattern": "{{variant}}_{{version}}_FreeBSD-32bit.tar.gz"
Expand Down Expand Up @@ -388,6 +432,10 @@
"os": "freebsd",
"arch": "arm",
"fileNamePatternHistory": [
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.20.4",
"fileNamePattern": "{{variant}}_{{version}}_FreeBSD-ARM.tar.gz"
Expand Down Expand Up @@ -426,6 +474,10 @@
"os": "freebsd",
"arch": "arm64",
"fileNamePatternHistory": [
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.81.0",
"fileNamePattern": "{{variant}}_{{version}}_FreeBSD-ARM64.tar.gz"
Expand Down Expand Up @@ -478,6 +530,10 @@
"os": "openbsd",
"arch": "x86",
"fileNamePatternHistory": [
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.20.4",
"fileNamePattern": "{{variant}}_{{version}}_OpenBSD-32bit.tar.gz"
Expand Down Expand Up @@ -516,6 +572,10 @@
"os": "openbsd",
"arch": "arm",
"fileNamePatternHistory": [
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.48",
"fileNamePattern": "{{variant}}_{{version}}_OpenBSD-ARM.tar.gz"
Expand All @@ -530,6 +590,10 @@
"os": "freebsd",
"arch": "arm64",
"fileNamePatternHistory": [
{
"version": "0.89.0",
"fileNamePattern": null
},
{
"version": "0.81.0",
"fileNamePattern": "{{variant}}_{{version}}_FreeBSD-ARM64.tar.gz"
Expand Down

0 comments on commit ff4820a

Please sign in to comment.