Releases: joshuacc/ahkpm
0.7.0
Version 0.7.0 of ahkpm brings more features, bug fixes, and documentation improvements
1. Added support for ahkpm scripts
ahkpm scripts are a new feature that allows you to define custom commands in your ahkpm.json
file. For example, if you have a script "greet": "echo Hi!"
, then running ahkpm run greet
would execute echo Hi!
, resulting in the message Hi!
being printed to the terminal.
In addition to being useful for defining common commands for things like testing, running builds, and starting programs, ahkpm scripts are also useful for defining custom commands that can be run by other scripts. For example, if you have a script "build": "ahkpm run build-ahk && ahkpm run build-ahk2"
, then running ahkpm run build
would execute both ahkpm run build-ahk
and ahkpm run build-ahk2
.
ahkpm also comes with a built-in alias for ahkpm run test
, which is ahkpm test
, or, even more succinctly, ahkpm t
.
All ahkpm scripts are executed by PowerShell (pwsh
), not by cmd
.
2. Added new documentation to ahkpm.dev
The docs site has two substantial new pages:
3. Changes to how ahkpm init
treats the license
field
- Fixed a bug where
ahkpm init
did not allow the value"UNLICENSED"
. - Added clarifying text, including a link to the SPDX license list to simplify the process of choosing a license.
- Changed the value
"UNLICENSED"
(indicating that no license is given) to"NO LICENSE"
to distinguish it from the license named "The Unlicense."
4. Changed the default version for ahkpm init
to 1.0.0
Because semantic versions in the 0.x.x
range behave differently than semantic versions 1.0.0
and above, ahkpm init
now defaults to 1.0.0
instead of 0.0.1
, in order to default to the more intuitive behavior.
5. Fixed bugs in ahkpm include
- Made
ahkpm include
output compatible with AutoHotkey v2. (Previously it had a comma which was permitted in AutoHotkey v1 but not in AutoHotkey v2.) ahkpm include
now correctly calculates relative script paths when the--file
flag points to a file in a different folder.
0.6.0
There are several new features and documentation improvements in this release.
1. ahkpm install
now supports omitting the version from packages
For example: ahkpm install gh:joshuacc/simple-http
.
If you do not specify a version, ahkpm will attempt to find the latest valid semantic version. If no valid semantic version of the package is available, it will fall back to branch:main
. If there is no main
branch, it will fall back to branch:master
.
2. Added ahkpm search
command to find packages
Want to see what ahkpm packages are available that match a specific query? Try ahkpm search [<myTerms>]...
. For example, ahkpm search terminal
outputs the following:
Name Description
----------------------------- -----------------------------------------------------
github.com/joshuacc/chalk.ahk An AutoHotkey library for colorizing terminal output
3. Added a packages page to ahkpm.dev
If browsing the web is more your thing than searching via CLI, head on over and take a look at the Packages page to discover interesting libraries for your project.
4. A new introduction page has been added to ahkpm.dev
The docs website now has a much friendlier guided introduction to using ahkpm. The previous introduction page is now the "Quick Start" guide.
5. ahkpm update
now supports a --all
flag
Now you can run ahkpm update --all
to update all your dependencies in one shot.
6. Added ahkpm include
command to generate #Include
directive with proper paths
Running ahkpm include gh:joshuacc/simple-http
will output the following.
#Include, %A_ScriptDir%\ahkpm-modules\github.com\joshuacc\simple-http\simple-http.ahk
To add it to the top of an AHK script instead, simply run ahkpm include gh:joshuacc/simple-http -f my-file.ahk
7. Added --defaults
flag to ahkpm init
Running ahkpm init --defaults
allows you to create an ahkpm.json
file without having to go through the interactive prompts. It will use default values for everything.
8. Added ahkpm i
as an alias for ahkpm install
9. Added ahkpm u
as an alias for ahkpm update
0.5.0
0.5.0
This release of ahkpm brings several new features.
1. ahkpm now supports version ranges
So when installing a new package instead of having to specify an exact version like 1.2.3
, you can write ahkpm install github.com/user/repo@1
to install the latest available version with major version 1.
This range will be saved to ahkpm.json so that when running ahkpm update github.com/user/repo
in the future,
it will be updated to the latest version matching that range.
2. ahkpm now supports a gh:
shortand for GitHub dependencies
When using ahkpm install
or ahkpm update
, you can now use the gh:
shorthand for GitHub dependencies. So ahkpm install github.com/user/repo@1
can now be written as ahkpm install gh:user/repo@1
3. ahkpm install
now supports specifying multiple dependencies
Now you can install multiple dependencies at once with ahkpm install gh:userA/repoA@1 gh:userB/repoB@1
.
4. ahkpm now uses a --version
flag to get the version of ahkpm
Previously this was ahkpm version
, but it has moved to accommodate the following new feature.
5. There is now a ahkpm version
command to simplify managing your package version
Running ahkpm version major
will increment the major version of your package in ahkpm.json. Likewise for minor
and patch
. If you want to give a specific version, you can do that too with ahkpm version 2.5.6
.
6. ahkpm now supports ahkpm list
to display a list of your top level dependencies
Example output:
> ahkpm list
Name Version
---------------------------------------- -------
github.com/G33kDude/Chrome.ahk tag:1.2
github.com/joshuacc/mock-ahkpm-package-a 1.3.x
0.4.0
ahkpm 0.4.0 adds a few helpful new features and one minor bug fix.
1. ahkpm has a new home on the web 🕸️
We have a new docs site at ahkpm.dev. For the moment, the docs there are
essentially the same as what you'd find in the README, but it will gradually
expand to be much more comprehensive.
2. ahkpm update
lets you update a package to the latest allowed version ⬆️
For example, if you have a dependency on github.com/user/repo
with version
branch:main
, running ahkpm update github.com/user/repo
will update your copy
of the package to the latest commit on the main branch. And it will also leave all
your other top-level dependencies untouched.
3. ahkpm version
also displays the installed version of AutoHotkey
While the primary reason to have the version command is to get the version of
ahkpm installed, knowing the version of AutoHotkey installed is also necessary
to get a complete idea of the operating environment.
Sample output:
> ahkpm version
ahkpm: 0.4.0
AutoHotkey: 1.1.33.02
Bug fix
The previous version of ahkpm had a minor bug where it would not correctly fetch
the latest updates to it's package cache, so ahkpm install
could sometimes
install a compatible version that wasn't the latest available compatible version.
0.3.0
Ready for widespread use
With the completion of the features listed below, ahkpm is now stable and useful enough to be used as a day-to-day tool in writing and maintaining both personal AutoHotKey scripts and public AutoHotKey libraries.
1. ahkpm now resolves transitive dependencies! 🎉
This means that ahkpm is now useful for developing public AutoHotKey libraries, not just private ones. If you create a new package A, which specifies in ahkpm.json
that it depends on package B, if a user installs A, they will automatically receive B as well.
2. ahkpm now uses a lockfile to prevent unexpected changes to dependencies. 😌
When installing packages, ahkpm will produce an ahkpm.lock
file with all the details of the dependency tree, including exactly which commit that dependency resolved to. If you later run ahkpm install
without specifying any changes to your top level dependencies, then ahkpm will install exactly those commit versions. So if you depend on somepackage@branch:main
, you'll continue to get exactly the same commit as before even if somepackage
's main
branch has a new commit. As a result, if your script worked before, it will continue to work until you opt into new versions by updating your direct dependencies.
3. ahkpm install
now validates its arguments
A small change, but a big usability improvement. There is now a reasonable error message if you specify a dependency incorrectly at the command line.
0.2.0
The big news in this version is that ahkpm can now be installed via a Windows installer. No more need to manually compile the executable and set your path. 😄
Changes since the last version:
- Remove some unnecessary binary bloat
- Add
ahkpm version
command - Make ahkpm available with a Windows installer
- Fix GitHub url validation
- Add friendly error messages if package or version can't be found