Skip to content

Commit

Permalink
v3.0.0
Browse files Browse the repository at this point in the history
- add typings
- merge bin/mkver with src/mkver
- add eslint
- add prettier+import cleanup
- drop old node builds
- switch mkver to async calls
  • Loading branch information
mceachen committed Mar 28, 2024
1 parent 8470836 commit 31d5e0f
Show file tree
Hide file tree
Showing 14 changed files with 308 additions and 241 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* eslint-env node */
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
};
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [14.x, 16.x, 18.x, 19.x, 20.x]
os: [ubuntu-latest, macos-14, windows-latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [18.x, 20.x, 21.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn ci
Expand Down
6 changes: 6 additions & 0 deletions .ncurc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"reject": [
"@types/chai",
"chai"
]
}
6 changes: 0 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# no hidden files
.*

# no system maps (they're only used during development)
*.map

# no testing artifacts
*spec*
*test*
appveyor.yml

# no src
src/

# no typescript configs
ts*.json
6 changes: 3 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"semi": false,
"printWidth": 80,
"tabWidth": 2
"plugins": [
"prettier-plugin-organize-imports"
]
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ This module follows semver.
- 🐞 Backwards-compatible bug fixes
- 📦 Minor packaging changes

## v3.0.0

- 💔 Drop support for obsolete versions of Node.js

- ✨ Support non-CLI programmatic `mkver` calls. Include typings.

- 📦 Merge code from bin/mkver.js into mkver.ts

- 📦 Replace sync calls with async calls

- 📦 Added eslint.

- 📦 Added prettier and import reordering.

- 📦 Upgrade all dev dependencies.

## v2.1.0

- 📦 Upgrade all dev dependencies.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018-2023 Matthew McEachen
Copyright 2018-2024 Matthew McEachen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

2 changes: 0 additions & 2 deletions bin/.prettierrc

This file was deleted.

15 changes: 0 additions & 15 deletions bin/mkver

This file was deleted.

37 changes: 22 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
"name": "mkver",
"version": "2.1.0",
"description": "Node.js access to your app's version and release metadata",
"main": "dist/mkver.js",
"main": "./dist/mkver.js",
"types": "./dist/mkver.d.ts",
"scripts": {
"prettier": "prettier --write src/*.ts bin/mkver",
"pretest": "rimraf dist && tsc",
"prettier": "prettier --write src/*.ts",
"lint": "eslint --fix src/*.ts",
"premake": "rimraf dist",
"make": "tsc && chmod +x dist/mkver.js",
"pretest": "yarn make && yarn lint",
"test": "mocha dist/**/*.spec.js",
"ci": "yarn install --frozen-lockfile"
},
"bin": {
"mkver": "bin/mkver"
"mkver": "./dist/mkver.js"
},
"repository": {
"type": "git",
Expand All @@ -26,18 +30,21 @@
},
"homepage": "https://github.com/photostructure/mkver#readme",
"devDependencies": {
"@types/chai": "^4.3.5",
"@types/chai-as-promised": "^7.1.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.1.7",
"@types/semver": "^7.5.0",
"chai": "^4.3.7",
"@types/chai": "^4.3.14",
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.30",
"@types/semver": "^7.5.8",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"rimraf": "^5.0.1",
"semver": "^7.5.1",
"eslint": "^8.57.0",
"mocha": "^10.4.0",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"rimraf": "^5.0.5",
"semver": "^7.6.0",
"source-map-support": "^0.5.21",
"typescript": "^5.0.4"
"typescript": "^5.4.3",
"typescript-eslint": "^7.4.0"
}
}
Loading

0 comments on commit 31d5e0f

Please sign in to comment.