diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/precious.yml similarity index 56% rename from .github/workflows/golangci-lint.yml rename to .github/workflows/precious.yml index 2c56bacf..b621b888 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/precious.yml @@ -1,4 +1,4 @@ -name: golangci-lint +name: precious on: push: @@ -9,14 +9,16 @@ on: permissions: {} jobs: - golangci: + precious: name: lint runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - name: golangci-lint - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # 9.2.0 + - name: Setup mise + uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 with: - version: latest + cache: true + - name: Run precious lint + run: precious lint --all diff --git a/.precious.toml b/.precious.toml new file mode 100644 index 00000000..74e32ea9 --- /dev/null +++ b/.precious.toml @@ -0,0 +1,34 @@ +exclude = [ + ".git", +] + +[commands.golangci-lint-fmt] +type = "both" +cmd = ["golangci-lint", "fmt"] +lint-flags = "--diff" +ok-exit-codes = 0 +invoke = "once" +include = ["**/*.go"] + +[commands.golangci-lint] +type = "both" +cmd = ["golangci-lint", "run"] +tidy-flags = ["--fix"] +ok-exit-codes = 0 +ignore-stderr = ".*" +invoke = "once" +path-args = "dir" +include = ["**/*.go"] + +[commands.prettier-markdown] +type = "both" +cmd = ["prettier", "--prose-wrap", "always"] +lint-flags = ["--check"] +tidy-flags = ["--write"] +path-args = "absolute-file" +include = "**/*.md" +# doc/ contains pandoc man page sources that use definition list syntax +# (": " + 4-space indented continuations). Prettier doesn't understand +# this extension and strips the indentation, breaking man page rendering. +exclude = ["doc/**"] +ok-exit-codes = 0 diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..70ac1753 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "proseWrap": "always", + "printWidth": 80, + "tabWidth": 2, + "useTabs": false +} diff --git a/CHANGELOG.md b/CHANGELOG.md index e38869bf..0e1186c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,359 +2,348 @@ ## 8.0.0 -* BREAKING CHANGE: `geoipupdate` stops updating on the first error. -* A config file can now be used to configure the Docker image. This was +- BREAKING CHANGE: `geoipupdate` stops updating on the first error. +- A config file can now be used to configure the Docker image. This was documented but was not functional. Fixed by Shizun Ge. GitHub #433. ## 7.1.1 (2025-07-09) -* Update dependencies and re-build binaries with new Go version. No - substantive changes. +- Update dependencies and re-build binaries with new Go version. No substantive + changes. ## 7.1.0 (2024-11-18) -* Allow the `Host` configuration directive and the `GEOIPUPDATE_HOST` +- Allow the `Host` configuration directive and the `GEOIPUPDATE_HOST` environment variable to accept a value with the scheme set. If not set, it will continue to default to `https://`. Pull request by Gabe Cook. GitHub #310. -* Export `HTTPError` to enable fine-grained error handling for users of +- Export `HTTPError` to enable fine-grained error handling for users of `github.com/maxmind/geoipupdate/client`. Pull request by Ryan Davis. GitHub #341. ## 7.0.1 (2024-04-08) -* The 7.0.0 release was broken and has been retracted. This release updates the +- The 7.0.0 release was broken and has been retracted. This release updates the module path to match tagged version. Reported by Adam Weinberger. GitHub #306. ## 7.0.0 (2024-04-08) -* BREAKING CHANGE: Improvements to the HTTP download API. - The client now calls two new endpoints: - * `/geoip/updates/metadata` which is responsible for getting information about +- BREAKING CHANGE: Improvements to the HTTP download API. The client now calls + two new endpoints: + - `/geoip/updates/metadata` which is responsible for getting information about a database edition. - * `/geoip/databases/{edition-id}/download` which is responsible for downloading - the content of a database edition. This new endpoint redirects downloads to R2 - presigned URLs, so systems running `geoipupdate` need to be able to - reach + - `/geoip/databases/{edition-id}/download` which is responsible for + downloading the content of a database edition. This new endpoint redirects + downloads to R2 presigned URLs, so systems running `geoipupdate` need to be + able to reach `mm-prod-geoip-databases.a2649acb697e2c09b632799562c076f2.r2.cloudflarestorage.com` in addition to `updates.maxmind.com`. -* BREAKING CHANGE: The public package API has been redesigned. The previous - API was not easy to use and had become a maintenance burden. We now - expose a `Client` at `github.com/maxmind/geoipupdate/client` with a - `Download()` method. The intention is to expose less of the `geoipupdate` - internals and provide a simpler and easier to use package. Many - previously exposed methods and types are now either internal only or have - been removed. -* BREAKING CHANGE: If set, `GEOIPUPDATE_VERBOSE` must either be `0` or `1`. - All other values will return an error. -* Setting `GEOIPUPDATE_VERBOSE` to `1` now works as expected. In the 6.0.0 and +- BREAKING CHANGE: The public package API has been redesigned. The previous API + was not easy to use and had become a maintenance burden. We now expose a + `Client` at `github.com/maxmind/geoipupdate/client` with a `Download()` + method. The intention is to expose less of the `geoipupdate` internals and + provide a simpler and easier to use package. Many previously exposed methods + and types are now either internal only or have been removed. +- BREAKING CHANGE: If set, `GEOIPUPDATE_VERBOSE` must either be `0` or `1`. All + other values will return an error. +- Setting `GEOIPUPDATE_VERBOSE` to `1` now works as expected. In the 6.0.0 and 6.1.0 releases, the flag was ignored. Reported by pmcevoy. GitHub #298. -* `geoipupdate` now supports retrying on more types of errors - such as HTTP2 INTERNAL_ERROR. -* Now `geoipupdate` doesn't requires the user to specify the config file - even if all the other arguments are set via the environment variables. - Reported by jsf84ksnf. GitHub #284. +- `geoipupdate` now supports retrying on more types of errors such as HTTP2 + INTERNAL_ERROR. +- Now `geoipupdate` doesn't requires the user to specify the config file even if + all the other arguments are set via the environment variables. Reported by + jsf84ksnf. GitHub #284. ## 6.1.0 (2024-01-09) -* `geoipupdate` now sets the version in the `User-Agent` header to the - version in the binary. While there were no issues with the version in the - header, this makes sure it will match the binary. The header also now - includes build information, such as OS and architecture. -* White spaces in secret files `GEOIPUPDATE_ACCOUNT_ID_FILE`, +- `geoipupdate` now sets the version in the `User-Agent` header to the version + in the binary. While there were no issues with the version in the header, this + makes sure it will match the binary. The header also now includes build + information, such as OS and architecture. +- White spaces in secret files `GEOIPUPDATE_ACCOUNT_ID_FILE`, `GEOIPUPDATE_LICENSE_KEY_FILE` are ignored, see #262 issue. ## 6.0.0 (2023-07-12) -* `geoipupdate` now supports configuration via environment variables. Any - configuration set this way will override any value from the config file, - but still be overridden by any associated command line option (if any). - The following new environment variables are supported: - - * `GEOIPUPDATE_ACCOUNT_ID` - * `GEOIPUPDATE_ACCOUNT_ID_FILE` - * `GEOIPUPDATE_CONF_FILE` - * `GEOIPUPDATE_DB_DIR` - * `GEOIPUPDATE_EDITION_IDS` - * `GEOIPUPDATE_HOST` - * `GEOIPUPDATE_LICENSE_KEY` - * `GEOIPUPDATE_LICENSE_KEY_FILE` - * `GEOIPUPDATE_LOCK_FILE` - * `GEOIPUPDATE_PARALLELISM` - * `GEOIPUPDATE_PRESERVE_FILE_TIMES` - * `GEOIPUPDATE_PROXY` - * `GEOIPUPDATE_PROXY_USER_PASSWORD` - * `GEOIPUPDATE_RETRY_FOR` - * `GEOIPUPDATE_VERBOSE` - -* Changed the signature of `NewConfig` in `pkg/geoipupdate` to no longer accept +- `geoipupdate` now supports configuration via environment variables. Any + configuration set this way will override any value from the config file, but + still be overridden by any associated command line option (if any). The + following new environment variables are supported: + - `GEOIPUPDATE_ACCOUNT_ID` + - `GEOIPUPDATE_ACCOUNT_ID_FILE` + - `GEOIPUPDATE_CONF_FILE` + - `GEOIPUPDATE_DB_DIR` + - `GEOIPUPDATE_EDITION_IDS` + - `GEOIPUPDATE_HOST` + - `GEOIPUPDATE_LICENSE_KEY` + - `GEOIPUPDATE_LICENSE_KEY_FILE` + - `GEOIPUPDATE_LOCK_FILE` + - `GEOIPUPDATE_PARALLELISM` + - `GEOIPUPDATE_PRESERVE_FILE_TIMES` + - `GEOIPUPDATE_PROXY` + - `GEOIPUPDATE_PROXY_USER_PASSWORD` + - `GEOIPUPDATE_RETRY_FOR` + - `GEOIPUPDATE_VERBOSE` + +- Changed the signature of `NewConfig` in `pkg/geoipupdate` to no longer accept a positional config file path argument, which can now be passed in using the option from `WithConfigFile` along with the other optional parameters. -* `geoipupdate` and `NewConfig` no longer require a config file to exist. -* The `--stack-trace` flag has been removed. This flag has been broken since +- `geoipupdate` and `NewConfig` no longer require a config file to exist. +- The `--stack-trace` flag has been removed. This flag has been broken since 4.11.0. ## 5.1.1 (2023-05-08) -* Based on feedback, the change to use a non-root user in 5.1.0 - when using the Docker image has been reverted. There are no - non-Docker changes in this release. See GitHub #233. +- Based on feedback, the change to use a non-root user in 5.1.0 when using the + Docker image has been reverted. There are no non-Docker changes in this + release. See GitHub #233. ## 5.1.0 (2023-05-05) -* Fixed the Docker health-check script to use the correct time of - the last update attempt. Reported by cford1080. GitHub #225. -* Added new `--output` flag to print JSON to standard output describing - the result of the run. -* Compilation with Go versions before 1.19 is no longer supported. -* When using the provided Docker images, `geoipupdate` no longer runs - as root in the container. Based on pull request by Andreas - Grünenfelder. GitHub #200. +- Fixed the Docker health-check script to use the correct time of the last + update attempt. Reported by cford1080. GitHub #225. +- Added new `--output` flag to print JSON to standard output describing the + result of the run. +- Compilation with Go versions before 1.19 is no longer supported. +- When using the provided Docker images, `geoipupdate` no longer runs as root in + the container. Based on pull request by Andreas Grünenfelder. GitHub #200. ## 5.0.4 (2023-04-17) -* On releases 4.9.0 through 5.0.3, the incorrect commit was tagged. - This release attempts to fix the release process to prevent this - issue. There are no code changes to the binaries provided by - MaxMind, either on the GitHub Release page or the MaxMind PPA. +- On releases 4.9.0 through 5.0.3, the incorrect commit was tagged. This release + attempts to fix the release process to prevent this issue. There are no code + changes to the binaries provided by MaxMind, either on the GitHub Release page + or the MaxMind PPA. ## 5.0.3 (2023-04-15) -* On 5.0.0 through 5.0.2, the default database directory was not being - correctly set for Debian and RPM package builds. The directory - `/usr/local/share/GeoIP` was being used rather than `/usr/share/GeoIP`. - This build restores `/usr/share/GeoIP` as the default directory for - these builds. Reported by Yvan. GitHub #222. +- On 5.0.0 through 5.0.2, the default database directory was not being correctly + set for Debian and RPM package builds. The directory `/usr/local/share/GeoIP` + was being used rather than `/usr/share/GeoIP`. This build restores + `/usr/share/GeoIP` as the default directory for these builds. Reported by + Yvan. GitHub #222. ## 5.0.2 (2023-04-13) -* "Database ... up to date" messages are now only shown if the verbose - flag is set. Pull request by Adam Weinberger. GitHub #219. +- "Database ... up to date" messages are now only shown if the verbose flag is + set. Pull request by Adam Weinberger. GitHub #219. ## 5.0.1 (2023-04-13) -* The 5.0.0 release mistakenly set the file permissions on downloaded - databases to 0600. This restores the previous behavior of using 0644. - Pull request by Josh Samuelson. GitHub #217 and #218. +- The 5.0.0 release mistakenly set the file permissions on downloaded databases + to 0600. This restores the previous behavior of using 0644. Pull request by + Josh Samuelson. GitHub #217 and #218. ## 5.0.0 (2023-04-12) -* Redefined the `Reader` and `Writer` interface APIs in - `pkg/geoipupdate/database`. This change aims to to make it easier to - introduce custom implementations of these interfaces. -* Changed the signature of `NewConfig` in `pkg/geoipupdate` to accept - optional parameters. This change allows the introduction of new - flags or config options without making breaking changes to the function's - signature. -* Introduced `Parallelism` as a new flag and config option to enable - concurrent database updates. +- Redefined the `Reader` and `Writer` interface APIs in + `pkg/geoipupdate/database`. This change aims to to make it easier to introduce + custom implementations of these interfaces. +- Changed the signature of `NewConfig` in `pkg/geoipupdate` to accept optional + parameters. This change allows the introduction of new flags or config options + without making breaking changes to the function's signature. +- Introduced `Parallelism` as a new flag and config option to enable concurrent + database updates. ## 4.11.1 (2023-03-16) -* Removed extra underscore in script variables preventing the Docker - secret support added in 4.11.0 from working as expected. Pull request by - Moeen Mirjalili. GitHub #210. +- Removed extra underscore in script variables preventing the Docker secret + support added in 4.11.0 from working as expected. Pull request by Moeen + Mirjalili. GitHub #210. ## 4.11.0 (2023-03-15) -* `github.com/pkg/errors` is no longer used to wrap errors. -* Docker secrets are now supported for the MaxMind account ID and - license key. Pull request by Matthew Kobayashi. GitHub #197. -* The Dockerfile now has a Healthcheck that makes sure the modification date - of the database directory is within the update period. -* The Docker images are now published to the GitHub Container Registry, +- `github.com/pkg/errors` is no longer used to wrap errors. +- Docker secrets are now supported for the MaxMind account ID and license key. + Pull request by Matthew Kobayashi. GitHub #197. +- The Dockerfile now has a Healthcheck that makes sure the modification date of + the database directory is within the update period. +- The Docker images are now published to the GitHub Container Registry, `ghcr.io`. We will likely stop publishing to Docker Hub in the near future. ## 4.10.0 (2022-09-26) -* HTTPS proxies are now supported. Pull request by Jamie Thompson. GitHub - #172. -* An HTTP request to get the filename for the edition ID has been removed. - This was previously required as the GeoIP Legacy edition IDs bore little - relation to the name of the database on disk. +- HTTPS proxies are now supported. Pull request by Jamie Thompson. GitHub #172. +- An HTTP request to get the filename for the edition ID has been removed. This + was previously required as the GeoIP Legacy edition IDs bore little relation + to the name of the database on disk. ## 4.9.0 (2022-02-15) -* The client now sets the `User-Agent` header. -* The error handling has been improved. -* The `goreleaser` configuration has been consolidated. There is now - one checksum file for all builds. -* Binaries are now built for OpenBSD and FreeBSD. Pull request by - Devin Buhl. GitHub #161. -* Packages for ARM are now correctly uploaded. Bug report by Service Entity. +- The client now sets the `User-Agent` header. +- The error handling has been improved. +- The `goreleaser` configuration has been consolidated. There is now one + checksum file for all builds. +- Binaries are now built for OpenBSD and FreeBSD. Pull request by Devin Buhl. + GitHub #161. +- Packages for ARM are now correctly uploaded. Bug report by Service Entity. GitHub #162. ## 4.8.0 (2021-07-20) -* The Docker container now supports the following new environment - variables: - - * `GEOIPUPDATE_CONF_FILE` - The path where the configuration file will - be written. The default is `/etc/GeoIP.conf`. - * `GEOIPUPDATE_DB_DIR` - The directory where geoipupdate will download - the databases. The default is `/usr/share/GeoIP`. +- The Docker container now supports the following new environment variables: + - `GEOIPUPDATE_CONF_FILE` - The path where the configuration file will be + written. The default is `/etc/GeoIP.conf`. + - `GEOIPUPDATE_DB_DIR` - The directory where geoipupdate will download the + databases. The default is `/usr/share/GeoIP`. Pull request by Maxence POULAIN. GitHub #143. ## 4.7.1 (2021-04-19) -* The Alpine version used for the Docker image now tracks the `alpine:3` - tag rather than a specific point release. -* The `arm64` Docker images were not correctly generated in 4.7.0. This - release corrects the issue. -* This release provides an `arm/v6` Docker image. +- The Alpine version used for the Docker image now tracks the `alpine:3` tag + rather than a specific point release. +- The `arm64` Docker images were not correctly generated in 4.7.0. This release + corrects the issue. +- This release provides an `arm/v6` Docker image. ## 4.7.0 (2021-04-16) -* Go 1.13 or greater is now required. -* In verbose mode, we now print a message before each HTTP request. - Previously we would not print anything for retried requests. -* Expected response errors no longer cause request retries. For example, we - no longer retry the download request if the database subscription has - lapsed. -* When running with `GEOIPUPDATE_FREQUENCY` set, the Docker image will now - stop when sent a SIGTERM instead of waiting for a SIGKILL. Pull request - by Maxence POULAIN. GitHub #135. -* Docker images are now provided for ARM64. Requested by allthesebugsv2. - GitHub #136. +- Go 1.13 or greater is now required. +- In verbose mode, we now print a message before each HTTP request. Previously + we would not print anything for retried requests. +- Expected response errors no longer cause request retries. For example, we no + longer retry the download request if the database subscription has lapsed. +- When running with `GEOIPUPDATE_FREQUENCY` set, the Docker image will now stop + when sent a SIGTERM instead of waiting for a SIGKILL. Pull request by Maxence + POULAIN. GitHub #135. +- Docker images are now provided for ARM64. Requested by allthesebugsv2. GitHub + #136. ## 4.6.0 (2020-12-14) -* Show version number in verbose output. -* Retry downloads in more scenarios. Previously we would not retry failures +- Show version number in verbose output. +- Retry downloads in more scenarios. Previously we would not retry failures occurring when reading the response body, but now we do. ## 4.5.0 (2020-10-28) -* We no longer use a third party library for exponential backoff. This - restores support for older Go versions. +- We no longer use a third party library for exponential backoff. This restores + support for older Go versions. ## 4.4.0 (2020-10-28) -* The edition ID is now included when there is a failure retrieving a - database. -* The Docker image no longer prints the generated `GeoIP.conf` when starting - up. This prevents a possible leak of the account's license key. Pull - request by Nate Gay. GitHub #109. -* The minimum Go version is now 1.11. -* Failing HTTP requests are now retried using an exponential backoff. The - period to keep retrying any failed request is set to 5 minutes by default and - can be adjusted using the new `RetryFor` configuration option. -* When using the go package rather than the command-line tool, the null value +- The edition ID is now included when there is a failure retrieving a database. +- The Docker image no longer prints the generated `GeoIP.conf` when starting up. + This prevents a possible leak of the account's license key. Pull request by + Nate Gay. GitHub #109. +- The minimum Go version is now 1.11. +- Failing HTTP requests are now retried using an exponential backoff. The period + to keep retrying any failed request is set to 5 minutes by default and can be + adjusted using the new `RetryFor` configuration option. +- When using the go package rather than the command-line tool, the null value for `RetryFor` will be 0 seconds, which means no retries will be performed. To change that, set `RetryFor` explicitly in the `Config` you provide, or obtain your `Config` value via `geoipupdate.NewConfig`. ## 4.3.0 (2020-04-16) -* First release to Docker Hub. Requested by Shun Yanaura. GitHub #24. -* The binary builds are now built with `CGO_ENABLED=0`. Request by CrazyMax. +- First release to Docker Hub. Requested by Shun Yanaura. GitHub #24. +- The binary builds are now built with `CGO_ENABLED=0`. Request by CrazyMax. GitHub #63. ## 4.2.2 (2020-02-21) -* Re-release for PPA. No other changes. +- Re-release for PPA. No other changes. ## 4.2.1 (2020-02-21) -* The minimum Go version is now 1.10 again as this was needed to build the PPA +- The minimum Go version is now 1.10 again as this was needed to build the PPA packages. ## 4.2.0 (2020-02-20) -* The major version of the module is now included at the end of the module - path. Previously, it was not possible to import the module in projects that - were using Go modules. Reported by Roman Glushko. GitHub #81. -* The minimum Go version is now 1.13. -* A valid account ID and license key combination is now required for database +- The major version of the module is now included at the end of the module path. + Previously, it was not possible to import the module in projects that were + using Go modules. Reported by Roman Glushko. GitHub #81. +- The minimum Go version is now 1.13. +- A valid account ID and license key combination is now required for database downloads, so those configuration options are now required. -* The error handling when closing a local database file would previously - ignore errors and, upon upgrading to `github.com/pkg/errors` 0.9.0, - would fail to ignore expected errors. Reported by Ilya Skrypitsa and - pgnd. GitHub #69 and #70. -* The RPM release was previously lacking the correct owner and group on files +- The error handling when closing a local database file would previously ignore + errors and, upon upgrading to `github.com/pkg/errors` 0.9.0, would fail to + ignore expected errors. Reported by Ilya Skrypitsa and pgnd. GitHub #69 and + #70. +- The RPM release was previously lacking the correct owner and group on files and directories. Among other things, this caused the package to conflict with the `GeoIP` package in CentOS 7 and `GeoIP-GeoLite-data` in CentOS 8. The files are now owned by `root`. Reported by neonknight. GitHub #76. ## 4.1.5 (2019-11-08) -* Respect the defaultConfigFile and defaultDatabaseDirectory variables in - the main package again. They were ignored in 4.1.0 through 4.1.4. If not +- Respect the defaultConfigFile and defaultDatabaseDirectory variables in the + main package again. They were ignored in 4.1.0 through 4.1.4. If not specified, the GitHub and PPA releases for these versions used the config /usr/local/etc/GeoIP.conf instead of /etc/GeoIP.conf and the database directory /usr/local/share/GeoIP instead of /usr/share/GeoIP. ## 4.1.4 (2019-11-07) -* Re-release of 4.1.3 as two commits were missing. No changes. +- Re-release of 4.1.3 as two commits were missing. No changes. ## 4.1.3 (2019-11-07) -* Remove formatting, linting, and testing from the geoipupdate target in - the Makefile. +- Remove formatting, linting, and testing from the geoipupdate target in the + Makefile. ## 4.1.2 (2019-11-07) -* Re-release of 4.1.1 to fix Ubuntu PPA release issue. No code changes. +- Re-release of 4.1.1 to fix Ubuntu PPA release issue. No code changes. ## 4.1.1 (2019-11-07) -* Re-release of 4.1.0 to fix Ubuntu PPA release issue. No code changes. +- Re-release of 4.1.0 to fix Ubuntu PPA release issue. No code changes. ## 4.1.0 (2019-11-07) -* Improve man page formatting and organization. Pull request by Faidon +- Improve man page formatting and organization. Pull request by Faidon Liambotis. GitHub #44. -* Provide update functionality as an importable package as well as a - standalone program. Pull request by amzhughe. GitHub #48. +- Provide update functionality as an importable package as well as a standalone + program. Pull request by amzhughe. GitHub #48. ## 4.0.6 (2019-09-13) -* Re-release of 4.0.5 to fix Ubuntu PPA release issue. No code changes. +- Re-release of 4.0.5 to fix Ubuntu PPA release issue. No code changes. ## 4.0.5 (2019-09-13) -* Ignore errors when syncing file system. These errors were primarily due - to the file system not supporting the sync call. Reported by devkappa. - GitHub #37. -* Use CRLF line endings on Windows for text files. -* Fix tests on Windows. -* Improve man page formatting. Reported by Faidon Liambotis. GitHub #38. -* Dependencies are no longer vendored. Reported by Faidon Liambotis. GitHub - #39. +- Ignore errors when syncing file system. These errors were primarily due to the + file system not supporting the sync call. Reported by devkappa. GitHub #37. +- Use CRLF line endings on Windows for text files. +- Fix tests on Windows. +- Improve man page formatting. Reported by Faidon Liambotis. GitHub #38. +- Dependencies are no longer vendored. Reported by Faidon Liambotis. GitHub #39. ## 4.0.4 (2019-08-30) -* Do not try to sync the database directory when running on Windows. - Syncing this way is not supported there and would lead to an error. Pull - request by Nicholi. GitHub #32. +- Do not try to sync the database directory when running on Windows. Syncing + this way is not supported there and would lead to an error. Pull request by + Nicholi. GitHub #32. ## 4.0.3 (2019-06-07) -* Update flock dependency from `theckman/go-flock` to `gofrs/flock`. Pull +- Update flock dependency from `theckman/go-flock` to `gofrs/flock`. Pull request by Paul Howarth. GitHub #22. -* Switch to Go modules and update dependencies. -* Fix version output on Ubuntu PPA and Homebrew releases. +- Switch to Go modules and update dependencies. +- Fix version output on Ubuntu PPA and Homebrew releases. ## 4.0.2 (2019-01-18) -* Fix dependency in `Makefile`. +- Fix dependency in `Makefile`. ## 4.0.1 (2019-01-17) -* Improve documentation. -* Add script to generate man pages to `Makefile`. +- Improve documentation. +- Add script to generate man pages to `Makefile`. ## 4.0.0 (2019-01-14) -* Expand installation instructions. -* First full release. +- Expand installation instructions. +- First full release. ## 0.0.2 (2018-11-28) -* Fix the output when the version output, `-V`, is passed to `geoipupdate`. +- Fix the output when the version output, `-V`, is passed to `geoipupdate`. ## 0.0.1 (2018-11-27) -* Initial version +- Initial version diff --git a/README.dev.md b/README.dev.md index f424f099..788693a7 100644 --- a/README.dev.md +++ b/README.dev.md @@ -1,40 +1,42 @@ # Releasing -* Make sure you have [`goreleaser`](https://goreleaser.com/), rpmbuild, - and pandoc installed. (rpmbuild is in the Ubuntu package `rpm`). -* Set release date in `CHANGELOG.md` and commit it. -* Ensure you can run `docker` commands as your user (e.g., `docker - images`). -* Ensure Docker is set up to do cross-compilation. You can verify this with - `docker buildx ls`. It should list `linux/arm64` as an available platform. - If not, follow [these instructions](https://docs.docker.com/build/building/multi-platform/). -* Log in to your Docker Hub account (be sure to be in our organization): +- Make sure you have [`goreleaser`](https://goreleaser.com/), rpmbuild, and + pandoc installed. (rpmbuild is in the Ubuntu package `rpm`). +- Set release date in `CHANGELOG.md` and commit it. +- Ensure you can run `docker` commands as your user (e.g., `docker images`). +- Ensure Docker is set up to do cross-compilation. You can verify this with + `docker buildx ls`. It should list `linux/arm64` as an available platform. If + not, follow + [these instructions](https://docs.docker.com/build/building/multi-platform/). +- Log in to your Docker Hub account (be sure to be in our organization): `docker login`. -* Follow [these instructions](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), +- Follow + [these instructions](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), to log in to `ghcr.io` with `docker login`. -* Run `GITHUB_TOKEN= ./dev-bin/release.sh`. For `goreleaser` you +- Run `GITHUB_TOKEN= ./dev-bin/release.sh`. For `goreleaser` you will need a token with the `repo` scope. You may create a token [here](https://github.com/settings/tokens/new). Then release to our PPA: -* Switch to the `ubuntu-ppa` branch. Merge the released tag into it. e.g. +- Switch to the `ubuntu-ppa` branch. Merge the released tag into it. e.g. `git merge v4.1.0`. -* Set up to release to launchpad. You can see some information about +- Set up to release to launchpad. You can see some information about prerequisites for this [here](https://github.com/maxmind/libmaxminddb/blob/main/README.dev.md). -* Ensure you have the `dh-golang`, `golang-any`, `devscripts`, +- Ensure you have the `dh-golang`, `golang-any`, `devscripts`, `libfile-slurp-tiny-perl`, and `libdatetime-perl` packages installed. -* Delete `dist` directory. -* Check whether you need to update the `$DISTS` variable in - `dev-bin/ppa-release.sh`. We should include all currently supported - Ubuntu releases. -* Run `dev-bin/ppa-release.sh` +- Delete `dist` directory. +- Check whether you need to update the `$DISTS` variable in + `dev-bin/ppa-release.sh`. We should include all currently supported Ubuntu + releases. +- Run `dev-bin/ppa-release.sh` Gotcha with PPA: -* If you get an error from `dput` like `No host ppa:maxmind/ppa found in - config`, you can create a `~/.dput.cf` with content like so: +- If you get an error from `dput` like + `No host ppa:maxmind/ppa found in config`, you can create a `~/.dput.cf` with + content like so: ``` [maxmind] @@ -45,6 +47,6 @@ login = anonymous allow_unsigned_uploads = 0 ``` -Then you can run the same `dput` command but with `dput maxmind [...]` -instead of `dput ppa:maxmind/ppa [...]` (I'm not sure how to make the -matching work with the original command). +Then you can run the same `dput` command but with `dput maxmind [...]` instead +of `dput ppa:maxmind/ppa [...]` (I'm not sure how to make the matching work with +the original command). diff --git a/README.md b/README.md index 6e69dacf..79d1e2ff 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,37 @@ # GeoIP Update -The GeoIP Update program performs automatic updates of GeoIP2 and -GeoLite2 binary databases. CSV databases are _not_ supported. +The GeoIP Update program performs automatic updates of GeoIP2 and GeoLite2 +binary databases. CSV databases are _not_ supported. ## Installation We provide releases for Linux, macOS (darwin), and Windows. Please see the -[Releases](https://github.com/maxmind/geoipupdate/releases) tab for the -latest release. +[Releases](https://github.com/maxmind/geoipupdate/releases) tab for the latest +release. After you install GeoIP Update, please refer to our -[documentation](https://dev.maxmind.com/geoip/updating-databases?lang=en) for information -about configuration. +[documentation](https://dev.maxmind.com/geoip/updating-databases?lang=en) for +information about configuration. -If you're upgrading from GeoIP Update 3.x, please see our [upgrade -guide](https://dev.maxmind.com/geoip/upgrading-geoip-update?lang=en). +If you're upgrading from GeoIP Update 3.x, please see our +[upgrade guide](https://dev.maxmind.com/geoip/upgrading-geoip-update?lang=en). ### Installing on Linux via the tarball -Download and extract the appropriate tarball for your system. You will end -up with a directory named something like `geoipupdate_5.0.0_linux_amd64` -depending on the version and architecture. +Download and extract the appropriate tarball for your system. You will end up +with a directory named something like `geoipupdate_5.0.0_linux_amd64` depending +on the version and architecture. Copy `geoipupdate` to where you want it to live. To install it to -`/usr/local/bin/geoipupdate`, run the equivalent of `sudo cp -geoipupdate_5.0.0_linux_amd64/geoipupdate /usr/local/bin`. +`/usr/local/bin/geoipupdate`, run the equivalent of +`sudo cp geoipupdate_5.0.0_linux_amd64/geoipupdate /usr/local/bin`. -`geoipupdate` looks for the config file `/usr/local/etc/GeoIP.conf` by -default. +`geoipupdate` looks for the config file `/usr/local/etc/GeoIP.conf` by default. ### Installing on Ubuntu via PPA -MaxMind provides a PPA for recent versions of Ubuntu. To add the PPA to -your sources, run: +MaxMind provides a PPA for recent versions of Ubuntu. To add the PPA to your +sources, run: ``` $ sudo add-apt-repository ppa:maxmind/ppa @@ -51,10 +50,10 @@ You can also use the tarball. Download the appropriate .deb for your system. -Run `dpkg -i path/to/geoipupdate_5.0.0_linux_amd64.deb` (replacing the -version number and architecture as necessary). You will need to be root. -For Ubuntu you can prefix the command with `sudo`. This will install -`geoipupdate` to `/usr/bin/geoipupdate`. +Run `dpkg -i path/to/geoipupdate_5.0.0_linux_amd64.deb` (replacing the version +number and architecture as necessary). You will need to be root. For Ubuntu you +can prefix the command with `sudo`. This will install `geoipupdate` to +`/usr/bin/geoipupdate`. `geoipupdate` looks for the config file `/etc/GeoIP.conf` by default. @@ -64,16 +63,16 @@ You can also use the tarball. Download the appropriate .rpm for your system. -Run `rpm -Uvhi path/to/geoipupdate_5.0.0_linux_amd64.rpm` (replacing the -version number and architecture as necessary). You will need to be root. -This will install `geoipupdate` to `/usr/bin/geoipupdate`. +Run `rpm -Uvhi path/to/geoipupdate_5.0.0_linux_amd64.rpm` (replacing the version +number and architecture as necessary). You will need to be root. This will +install `geoipupdate` to `/usr/bin/geoipupdate`. `geoipupdate` looks for the config file `/etc/GeoIP.conf` by default. ### Installing on macOS (darwin) via the tarball -This is the same as installing on Linux via the tarball, except choose a -tarball with "darwin" in the name. +This is the same as installing on Linux via the tarball, except choose a tarball +with "darwin" in the name. ### Installing on macOS via Homebrew @@ -86,15 +85,14 @@ $ brew install geoipupdate ### Installing on Windows -Download and extract the appropriate zip for your system. You will end up -with a directory named something like `geoipupdate_5.0.0_windows_amd64` -depending on the version and architecture. +Download and extract the appropriate zip for your system. You will end up with a +directory named something like `geoipupdate_5.0.0_windows_amd64` depending on +the version and architecture. Copy `geoipupdate.exe` to where you want it to live. `geoipupdate` looks for the config file -`\ProgramData\MaxMind\GeoIPUpdate\GeoIP.conf` on your system drive by -default. +`\ProgramData\MaxMind\GeoIPUpdate\GeoIP.conf` on your system drive by default. ### Installing via Docker @@ -111,8 +109,8 @@ proto install geoipupdate ### Installation from source or Git -You need the Go compiler (1.25+). You can get it at the [Go -website](https://golang.org). +You need the Go compiler (1.25+). You can get it at the +[Go website](https://golang.org). The easiest way is via `go install`: @@ -122,31 +120,33 @@ This installs `geoipupdate` to `$GOPATH/bin/geoipupdate`. # Configuring -Please see our [online guide](https://dev.maxmind.com/geoip/updating-databases?lang=en) for +Please see our +[online guide](https://dev.maxmind.com/geoip/updating-databases?lang=en) for directions on how to configure GeoIP Update. # Documentation -See our documentation for the [`geoipupdate` program](doc/geoipupdate.md) -and the [`GeoIP.conf` configuration file](doc/GeoIP.conf.md). +See our documentation for the [`geoipupdate` program](doc/geoipupdate.md) and +the [`GeoIP.conf` configuration file](doc/GeoIP.conf.md). # Default config file and database directory paths -We define default paths for the config file and database directory. If -these defaults are not appropriate for you, you can change them at build -time using flags: +We define default paths for the config file and database directory. If these +defaults are not appropriate for you, you can change them at build time using +flags: go build -ldflags "-X main.defaultConfigFile=/etc/GeoIP.conf \ -X main.defaultDatabaseDirectory=/usr/share/GeoIP" # Bug Reports -Please report bugs by filing an issue with [our GitHub issue -tracker](https://github.com/maxmind/geoipupdate/issues). +Please report bugs by filing an issue with +[our GitHub issue tracker](https://github.com/maxmind/geoipupdate/issues). # Copyright and License This software is Copyright (c) 2018 - 2026 by MaxMind, Inc. -This is free software, licensed under the [Apache License, Version -2.0](LICENSE-APACHE) or the [MIT License](LICENSE-MIT), at your option. +This is free software, licensed under the +[Apache License, Version 2.0](LICENSE-APACHE) or the [MIT License](LICENSE-MIT), +at your option. diff --git a/client/download.go b/client/download.go index f66f223e..ce251b8c 100644 --- a/client/download.go +++ b/client/download.go @@ -116,7 +116,7 @@ func (c *Client) download( req.Header.Add("User-Agent", "geoipupdate/"+vars.Version) req.SetBasicAuth(strconv.Itoa(c.accountID), c.licenseKey) - response, err := c.httpClient.Do(req) //nolint:gosec // URL is from known config + response, err := c.httpClient.Do(req) if err != nil { return nil, time.Time{}, fmt.Errorf("performing download request: %w", err) } diff --git a/client/metadata.go b/client/metadata.go index 7ff72dbd..fb3d80b9 100644 --- a/client/metadata.go +++ b/client/metadata.go @@ -38,7 +38,7 @@ func (c *Client) getMetadata( req.Header.Add("User-Agent", "geoipupdate/"+vars.Version) req.SetBasicAuth(strconv.Itoa(c.accountID), c.licenseKey) - response, err := c.httpClient.Do(req) //nolint:gosec // URL is from known config + response, err := c.httpClient.Do(req) if err != nil { return nil, fmt.Errorf("performing metadata request: %w", err) } diff --git a/internal/geoipupdate/config.go b/internal/geoipupdate/config.go index a4a7803c..213e3171 100644 --- a/internal/geoipupdate/config.go +++ b/internal/geoipupdate/config.go @@ -296,7 +296,7 @@ func setConfigFromEnv(config *Config) error { if value := os.Getenv("GEOIPUPDATE_ACCOUNT_ID_FILE"); value != "" { var err error - accountID, err := os.ReadFile(filepath.Clean(value)) //nolint:gosec // path from env var + accountID, err := os.ReadFile(filepath.Clean(value)) if err != nil { return fmt.Errorf("failed to open GEOIPUPDATE_ACCOUNT_ID_FILE: %w", err) } @@ -333,7 +333,7 @@ func setConfigFromEnv(config *Config) error { if value := os.Getenv("GEOIPUPDATE_LICENSE_KEY_FILE"); value != "" { var err error - licenseKey, err := os.ReadFile(filepath.Clean(value)) //nolint:gosec // path from env var + licenseKey, err := os.ReadFile(filepath.Clean(value)) if err != nil { return fmt.Errorf("failed to open GEOIPUPDATE_LICENSE_KEY_FILE: %w", err) } diff --git a/internal/geoipupdate/database/local_file_writer.go b/internal/geoipupdate/database/local_file_writer.go index 2c36614c..3882485e 100644 --- a/internal/geoipupdate/database/local_file_writer.go +++ b/internal/geoipupdate/database/local_file_writer.go @@ -184,7 +184,7 @@ func (w *fileWriter) close() error { } } - err := os.Remove(w.file.Name()) //nolint:gosec // path from config + err := os.Remove(w.file.Name()) if err != nil && !errors.Is(err, os.ErrNotExist) { return fmt.Errorf("removing temporary file: %w", err) } @@ -222,7 +222,7 @@ func (w *fileWriter) syncAndRename(name string) error { if err := w.file.Close(); err != nil { return fmt.Errorf("closing temporary file: %w", err) } - if err := os.Rename(w.file.Name(), name); err != nil { //nolint:gosec // path from config + if err := os.Rename(w.file.Name(), name); err != nil { return fmt.Errorf("moving database into place: %w", err) } return nil diff --git a/mise.lock b/mise.lock new file mode 100644 index 00000000..b18e3e9c --- /dev/null +++ b/mise.lock @@ -0,0 +1,154 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +[[tools."github:golangci/golangci-lint"]] +version = "2.11.3" +backend = "github:golangci/golangci-lint" + +[tools."github:golangci/golangci-lint"."platforms.linux-arm64"] +checksum = "sha256:ee3d95f301359e7d578e6d99c8ad5aeadbabc5a13009a30b2b0df11c8058afe9" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/370749014" +provenance = "github-attestations" + +[tools."github:golangci/golangci-lint"."platforms.linux-arm64-musl"] +checksum = "sha256:ee3d95f301359e7d578e6d99c8ad5aeadbabc5a13009a30b2b0df11c8058afe9" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/370749014" +provenance = "github-attestations" + +[tools."github:golangci/golangci-lint"."platforms.linux-x64"] +checksum = "sha256:87bb8cddbcc825d5778b64e8a91b46c0526b247f4e2f2904dea74ec7450475d1" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-linux-amd64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/370748984" +provenance = "github-attestations" + +[tools."github:golangci/golangci-lint"."platforms.linux-x64-musl"] +checksum = "sha256:87bb8cddbcc825d5778b64e8a91b46c0526b247f4e2f2904dea74ec7450475d1" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-linux-amd64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/370748984" +provenance = "github-attestations" + +[tools."github:golangci/golangci-lint"."platforms.macos-arm64"] +checksum = "sha256:30ee39979c516b9d1adca289a3f93429d130c4c0fda5e57d637850894221f6cc" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-darwin-arm64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/370749042" +provenance = "github-attestations" + +[tools."github:golangci/golangci-lint"."platforms.macos-x64"] +checksum = "sha256:f93bda1f2cc981fd1326464020494be62f387bbf262706e1b3b644e5afacc440" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-darwin-amd64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/370749038" +provenance = "github-attestations" + +[tools."github:golangci/golangci-lint"."platforms.windows-x64"] +checksum = "sha256:cd42e890176bc5cfeb36225a77e66b9410ddd3a59a03551e23f6b210d29e1f67" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-windows-amd64.zip" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/370749053" +provenance = "github-attestations" + +[[tools."github:houseabsolute/precious"]] +version = "0.10.2" +backend = "github:houseabsolute/precious" + +[tools."github:houseabsolute/precious"."platforms.linux-arm64"] +checksum = "sha256:8fbaead9f9626170549c3121e67d1bc81193b3bb086e29576f548aefa839fcc4" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-arm64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345520042" + +[tools."github:houseabsolute/precious"."platforms.linux-arm64-musl"] +checksum = "sha256:8fbaead9f9626170549c3121e67d1bc81193b3bb086e29576f548aefa839fcc4" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-arm64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345520042" + +[tools."github:houseabsolute/precious"."platforms.linux-x64"] +checksum = "sha256:3d717d906db338f63017766b07982dc9055773e1b3bec6d3f432d1f0ad9676bb" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-x86_64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519861" + +[tools."github:houseabsolute/precious"."platforms.linux-x64-musl"] +checksum = "sha256:3d717d906db338f63017766b07982dc9055773e1b3bec6d3f432d1f0ad9676bb" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Linux-musl-x86_64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519861" + +[tools."github:houseabsolute/precious"."platforms.macos-arm64"] +checksum = "sha256:04157c64459bb6ab029295b21b112077040ad2575b34508d84b19a839551cddb" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-macOS-arm64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519985" + +[tools."github:houseabsolute/precious"."platforms.macos-x64"] +checksum = "sha256:9932defd246d0771530357463bdb55582557fd7381853cb4dc2074e36ad0cc84" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-macOS-x86_64.tar.gz" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345519772" + +[tools."github:houseabsolute/precious"."platforms.windows-x64"] +checksum = "sha256:9d683d1730e302c646ccb90a23d313e7a548c8b23b5abf7d24e19ff6befe763d" +url = "https://github.com/houseabsolute/precious/releases/download/v0.10.2/precious-Windows-msvc-x86_64.zip" +url_api = "https://api.github.com/repos/houseabsolute/precious/releases/assets/345520544" + +[[tools.go]] +version = "1.26.1" +backend = "core:go" + +[tools.go."platforms.linux-arm64"] +checksum = "sha256:a290581cfe4fe28ddd737dde3095f3dbeb7f2e4065cab4eae44dfc53b760c2f7" +url = "https://dl.google.com/go/go1.26.1.linux-arm64.tar.gz" + +[tools.go."platforms.linux-arm64-musl"] +checksum = "sha256:a290581cfe4fe28ddd737dde3095f3dbeb7f2e4065cab4eae44dfc53b760c2f7" +url = "https://dl.google.com/go/go1.26.1.linux-arm64.tar.gz" + +[tools.go."platforms.linux-x64"] +checksum = "sha256:031f088e5d955bab8657ede27ad4e3bc5b7c1ba281f05f245bcc304f327c987a" +url = "https://dl.google.com/go/go1.26.1.linux-amd64.tar.gz" + +[tools.go."platforms.linux-x64-musl"] +checksum = "sha256:031f088e5d955bab8657ede27ad4e3bc5b7c1ba281f05f245bcc304f327c987a" +url = "https://dl.google.com/go/go1.26.1.linux-amd64.tar.gz" + +[tools.go."platforms.macos-arm64"] +checksum = "sha256:353df43a7811ce284c8938b5f3c7df40b7bfb6f56cb165b150bc40b5e2dd541f" +url = "https://dl.google.com/go/go1.26.1.darwin-arm64.tar.gz" + +[tools.go."platforms.macos-x64"] +checksum = "sha256:65773dab2f8cc4cd23d93ba6d0a805de150ca0b78378879292be0b903b8cdd08" +url = "https://dl.google.com/go/go1.26.1.darwin-amd64.tar.gz" + +[tools.go."platforms.windows-x64"] +checksum = "sha256:9b68112c913f45b7aebbf13c036721264bbba7e03a642f8f7490c561eebd1ecc" +url = "https://dl.google.com/go/go1.26.1.windows-amd64.zip" + +[[tools.node]] +version = "25.8.0" +backend = "core:node" + +[tools.node."platforms.linux-arm64"] +checksum = "sha256:54c128f5286a4392a1fd1c765729b074a6873abff8a4f9bb3d63d571c2855e41" +url = "https://nodejs.org/dist/v25.8.0/node-v25.8.0-linux-arm64.tar.gz" + +[tools.node."platforms.linux-arm64-musl"] +checksum = "sha256:54c128f5286a4392a1fd1c765729b074a6873abff8a4f9bb3d63d571c2855e41" +url = "https://nodejs.org/dist/v25.8.0/node-v25.8.0-linux-arm64.tar.gz" + +[tools.node."platforms.linux-x64"] +checksum = "sha256:2ae6f70d74a459c0a96456e486dc60f3e7e65d7752ad302771834e58b27500af" +url = "https://nodejs.org/dist/v25.8.0/node-v25.8.0-linux-x64.tar.gz" + +[tools.node."platforms.linux-x64-musl"] +checksum = "sha256:2ae6f70d74a459c0a96456e486dc60f3e7e65d7752ad302771834e58b27500af" +url = "https://nodejs.org/dist/v25.8.0/node-v25.8.0-linux-x64.tar.gz" + +[tools.node."platforms.macos-arm64"] +checksum = "sha256:75ff6fd07e0a85fb4d2529f6189c996014b1d3d83180c31e65feb2b3eaeec5d9" +url = "https://nodejs.org/dist/v25.8.0/node-v25.8.0-darwin-arm64.tar.gz" + +[tools.node."platforms.macos-x64"] +checksum = "sha256:03fb559600c3ede0228d8b588ac6ad8b7b2cd0bac9422b56e7e2ef7f5c11b67c" +url = "https://nodejs.org/dist/v25.8.0/node-v25.8.0-darwin-x64.tar.gz" + +[tools.node."platforms.windows-x64"] +checksum = "sha256:5744746371a417179a701044739b5fa2b3164e943aa57f86059fb312f8032e86" +url = "https://nodejs.org/dist/v25.8.0/node-v25.8.0-win-x64.zip" + +[[tools."npm:prettier"]] +version = "3.8.1" +backend = "npm:prettier" diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000..b424d4e7 --- /dev/null +++ b/mise.toml @@ -0,0 +1,20 @@ +[settings] +lockfile = true +disable_backends = [ + "asdf", + "vfox", +] + +[tools] +go = "latest" +"github:golangci/golangci-lint" = "latest" +"github:houseabsolute/precious" = "latest" +node = "latest" +"npm:prettier" = "latest" + +[hooks] +enter = "mise install --quiet" + +[[watch_files]] +patterns = ["mise.toml", "mise.lock"] +run = "mise install --quiet"