Skip to content

Commit ebaabdb

Browse files
Alasdair Mercerneocotic
Alasdair Mercer
authored andcommitted
Release 0.4.0
* **Breaking Change:** Switch from CommonJS to ECMAScript modules * **Breaking Change:** Bump minimum supported Node.js version to LTS release 18 * Replace `to-ico` package dependency with `png-to-ico` to avoid audit problems with transient dependencies * Replace `nyc` package dev dependency with `c8` for ESM support * Replace broad use of Symbols with ES2022 private class fields * Bump dependencies
1 parent cd57d9f commit ebaabdb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4557
-9062
lines changed

.nycrc .c8rc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"statements": 95,
55
"functions": 95,
66
"branches": 95,
7-
"include": [ "src/**/*.js" ],
7+
"include": [ "src/**/*.mjs" ],
88
"reporter": [ "lcov" ]
99
}

.eslintrc.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"extends": "eslint:recommended",
33
"parserOptions": {
4-
"ecmaVersion": 8
4+
"ecmaVersion": 2023,
5+
"sourceType": "module"
56
},
67
"env": {
7-
"es6": true,
8+
"es2023": true,
89
"node": true
910
},
1011
"rules": {

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ jobs:
1717

1818
strategy:
1919
matrix:
20-
node-version: [14.x]
20+
node: [18.x]
2121

2222
steps:
23-
- uses: actions/checkout@v2
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v1
23+
- uses: actions/checkout@v3
24+
- name: Use Node.js ${{ matrix.node }}
25+
uses: actions/setup-node@v3
2626
with:
27-
node-version: ${{ matrix.node-version }}
27+
node-version: ${{ matrix.node }}
2828
- name: Install dependencies
2929
run: npm install
3030
- name: Lint packages
3131
run: npm run lint
3232
- name: Test packages
3333
run: npm test
3434
- name: Report test coverage
35-
uses: codecov/codecov-action@v2
35+
uses: codecov/codecov-action@v3
3636
with:
3737
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Thumbs.db
2020

2121
# Tests
2222
/coverage
23-
/.nyc_output
2423

2524
# IDEs and editors
2625
/.idea

CHANGES.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## Version 0.4.0, 2023.08.26
2+
3+
* **Breaking Change:** Switch from CommonJS to ECMAScript modules
4+
* **Breaking Change:** Bump minimum supported Node.js version to LTS release 18
5+
* Replace `to-ico` package dependency with `png-to-ico` to avoid audit problems with transient dependencies
6+
* Replace broad use of Symbols with ES2022 private class fields
7+
* Bump dependencies
8+
19
## Version 0.3.2, 2022.05.17
210

311
* Fix bug where Git repository branch was not being detected

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $ npm install
1616
$ npm test
1717
```
1818

19-
You must have at least [Node.js](https://nodejs.org) version 12.20.0 or newer installed.
19+
You must have at least [Node.js](https://nodejs.org) version 18 or newer installed.
2020

2121
All pull requests should be made to the `main` branch.
2222

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2022 neocotic
1+
Copyright (C) 2023 neocotic
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Brander
22

3-
[![Build Status](https://img.shields.io/github/workflow/status/neocotic/brander/CI/develop?style=flat-square)](https://github.com/neocotic/brander/actions/workflows/ci.yml)
3+
[![Build Status](https://img.shields.io/github/actions/workflow/status/neocotic/brander/CI?style=flat-square)](https://github.com/neocotic/brander/actions/workflows/ci.yml)
44
[![Coverage](https://img.shields.io/codecov/c/github/neocotic/brander/develop.svg?style=flat-square)](https://codecov.io/gh/neocotic/brander)
55
[![License](https://img.shields.io/npm/l/brander.svg?style=flat-square)](https://github.com/neocotic/brander/blob/main/LICENSE.md)
66
[![Release](https://img.shields.io/npm/v/brander.svg?style=flat-square)](https://npmjs.com/package/brander)
@@ -28,7 +28,7 @@ Alternatively, if you're wanting to use `brander` command, you'll probably prefe
2828
$ npm install --global brander
2929
```
3030

31-
You'll need to have at least [Node.js](https://nodejs.org) 12.20.0 or newer.
31+
You'll need to have at least [Node.js](https://nodejs.org) 18 or newer.
3232

3333
## Usage
3434

@@ -51,6 +51,6 @@ A list of Brander contributors can be found in [AUTHORS.md](https://github.com/n
5151

5252
## License
5353

54-
Copyright © 2022 neocotic
54+
Copyright © 2023 neocotic
5555

5656
See [LICENSE.md](https://github.com/neocotic/brander/raw/main/LICENSE.md) for more information on our MIT license.

bin/brander bin/brander.mjs

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
/*
4-
* Copyright (C) 2022 neocotic
4+
* Copyright (C) 2023 neocotic
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -22,16 +22,17 @@
2222
* SOFTWARE.
2323
*/
2424

25-
'use strict';
26-
2725
/* eslint-disable no-process-exit */
2826

29-
const debug = require('debug');
30-
const { program } = require('commander');
27+
import { program } from 'commander';
28+
import debug from 'debug';
29+
import { createRequire } from 'node:module';
30+
31+
import { Brander } from '../src/brander.mjs';
32+
import { ConfigLoader } from '../src/config/config-loader.mjs';
33+
import { Logger } from '../src/logger.mjs';
3134

32-
const Brander = require('../src/brander');
33-
const ConfigLoader = require('../src/config/config-loader');
34-
const Logger = require('../src/logger');
35+
const require = createRequire(import.meta.url);
3536
const { version } = require('../package.json');
3637

3738
(async() => {

0 commit comments

Comments
 (0)