Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fx for openSUSE:Factory checked in at 2023-04-11 15:57:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fx (Old) and /work/SRC/openSUSE:Factory/.fx.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fx" Tue Apr 11 15:57:29 2023 rev:2 rq:1078452 version:24.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/fx/fx.changes 2022-05-26 18:44:20.453197618 +0200 +++ /work/SRC/openSUSE:Factory/.fx.new.19717/fx.changes 2023-04-11 15:57:30.355022507 +0200 @@ -1,0 +2,7 @@ +Fri Apr 7 13:55:44 UTC 2023 - Martin Hauke <[email protected]> + +- Update to version 24.1.0 + * move cursor to view when jumping around + * add flag: -h, --help + +------------------------------------------------------------------- Old: ---- fx-24.0.0.tar.gz New: ---- fx-24.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fx.spec ++++++ --- /var/tmp/diff_new_pack.wurPt8/_old 2023-04-11 15:57:31.259027763 +0200 +++ /var/tmp/diff_new_pack.wurPt8/_new 2023-04-11 15:57:31.259027763 +0200 @@ -1,7 +1,8 @@ # # spec file for package fx # -# Copyright (c) 2022, Martin Hauke <[email protected]> +# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2022-2023, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,8 +16,9 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + Name: fx -Version: 24.0.0 +Version: 24.1.0 Release: 0 Summary: Terminal JSON viewer License: MIT ++++++ fx-24.0.0.tar.gz -> fx-24.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/.github/workflows/release.mjs new/fx-24.1.0/.github/workflows/release.mjs --- old/fx-24.0.0/.github/workflows/release.mjs 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/.github/workflows/release.mjs 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -let goos = [ - 'linux', - 'darwin', - 'windows', -] -let goarch = [ - 'amd64', - 'arm64', -] - -let name = (GOOS, GOARCH) => `fx_${GOOS}_${GOARCH}` + (GOOS === 'windows' ? '.exe' : '') - -await $`go mod download` - -await Promise.all( - goos.flatMap(GOOS => - goarch.map(GOARCH => - $`GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${name(GOOS, GOARCH)}`))) - -await Promise.all( - goos.flatMap(GOOS => - goarch.map(GOARCH => - $`gh release upload ${process.env.RELEASE_VERSION} ${name(GOOS, GOARCH)}`))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/.github/workflows/release.yml new/fx-24.1.0/.github/workflows/release.yml --- old/fx-24.0.0/.github/workflows/release.yml 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/.github/workflows/release.yml 2023-04-07 15:33:40.000000000 +0200 @@ -6,61 +6,7 @@ - created jobs: - commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: master - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - - name: Get Version - run: echo "RELEASE_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV - - - name: Update Version - shell: bash - run: | - set -x - sed -i "s/version = .*/version = \"${RELEASE_VERSION}\"/" version.go - sed -i "s/version: .*/version: ${RELEASE_VERSION}/" snap/snapcraft.yaml - git add version.go snap/snapcraft.yaml - git config --global user.email "[email protected]" - git config --global user.name "github-actions" - git commit -m "Release $RELEASE_VERSION" - git tag "$RELEASE_VERSION" --force - git push --atomic --force origin master "$RELEASE_VERSION" - - - name: Test - run: go test -v ./... - - binary: - needs: [commit] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: master - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - - name: Get Version - run: echo "RELEASE_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV - - - name: Build and Upload - env: - FORCE_COLOR: 3 - GITHUB_TOKEN: ${{ secrets.MY_TOKEN }} - run: npx zx .github/workflows/release.mjs - snap: - needs: [commit] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -82,7 +28,6 @@ release: stable brew: - needs: [commit] runs-on: macos-latest steps: - name: Set up Homebrew @@ -112,5 +57,5 @@ - name: Bump formulae uses: Homebrew/actions/bump-formulae@master with: - token: ${{ secrets.MY_TOKEN }} + token: ${{ secrets.MY_GITHUB_TOKEN_FOR_BREW_BUMP_FORMULAE }} formulae: fx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/README.md new/fx-24.1.0/README.md --- old/fx-24.0.0/README.md 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/README.md 2023-04-07 15:33:40.000000000 +0200 @@ -30,7 +30,11 @@ go install github.com/antonmedv/fx@latest ``` -Or download [pre-built binary](https://github.com/antonmedv/fx/releases). +Or download [pre-built binary](https://github.com/antonmedv/fx/releases) via: + +```sh +curl https://fx.wtf | sh +``` ## Usage @@ -56,8 +60,8 @@ ### Reducers -Write reducers in your favorite language: [JavaScript](doc/doc.md#reducers) (default), -[Python](doc/doc.md#python), or [Ruby](doc/doc.md#ruby). +Write reducers in your favorite language: [JavaScript](doc/js.md) (default), +[Python](doc/python.md), or [Ruby](doc/ruby.md). ```bash fx data.json '.filter(x => x.startsWith("a"))' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/doc/doc.md new/fx-24.1.0/doc/doc.md --- old/fx-24.0.0/doc/doc.md 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/doc/doc.md 2023-04-07 15:33:40.000000000 +0200 @@ -16,175 +16,36 @@ ## Reducers -If any additional arguments was passed, **fx** converts it to a function which -takes the JSON as an argument named `x`. - -By default, **fx** uses builtin JavaScript VM ([goja](https://github.com/dop251/goja)), -but **fx** also can be used with [node](#node), [python](#python), or [ruby](#ruby). - -### JavaScript - -```sh -export FX_LANG=js -``` - -An example of anonymous function used as a reducer: -```sh -$ echo '{"foo": [{"bar": "value"}]}' | fx 'x => x.foo[0].bar' -value -``` - -The same reducer function can be simplified to: - -```sh -$ echo '{"foo": [{"bar": "value"}]}' | fx 'x.foo[0].bar' -value -``` - -Each argument treated as a reducer function. - -```sh -$ echo '{"foo": [{"bar": "value"}]}' | fx 'x.foo' 'x[0]' 'x.bar' -value -``` - -Update JSON using the spread operator: - -```sh -$ echo '{"name": "fx", "count": 0}' | fx '{...this, count: 1}' -{ - "name": "fx", - "count": 1 -} -``` - -Get the list - -### Dot - -Fx supports simple JS-like syntax for accessing data, which can be used with any -`FX_LANG`. - -```sh -$ echo '{"foo": [{"bar": "value"}]}' | fx .foo[0].bar -value -``` - -### .fxrc.js - -Create _.fxrc.js_ file in `$HOME` directory, and define some useful functions. - -```js -// .fxrc.js -function upper(s) { - return s.toUpperCase() -} -``` - -```sh -$ cat data.json | fx .name upper -ANTON -``` - -### Node - -```sh -export FX_LANG=node -``` - -Use any npm package by installing it globally. Create _.fxrc.js_ file in `$HOME` -directory, and require any packages or define global functions. For example, -access all lodash methods without `_` prefix. - -Put next line into your _.fxrc.js_ file: - -```js -Object.assign(global, require('lodash/fp')) -``` - -And now you will be able to call all lodash methods. For example, see who's been committing to react recently: - -```sh -curl 'https://api.github.com/repos/facebook/react/commits?per_page=100' \ -| fx 'groupBy("commit.author.name")' 'mapValues(size)' toPairs 'sortBy(1)' reverse 'take(10)' fromPairs -``` - -> To be able to require global modules make sure you have correct `NODE_PATH` env variable. -> ```sh -> export NODE_PATH=`npm root -g` -> ``` - -The _.fxrc.js_ file supports both: import and require. - -```js -// .fxrc.js -import 'zx/globals' -const _ = require('lodash') -``` - -> If you want to use _.fxrc.js_ for both `FX_LANG=js` and `FX_LANG=node`, -> separate parts by `// nodejs:` comment: -> ```js -> // .fxrc.js -> function upper(s) { -> return s.toUpperCase() -> } -> // nodejs: -> import 'zx/globals' -> const _ = require('lodash') -> ``` - -### Python - -```sh -export FX_LANG=python -``` -Or -```sh -export FX_LANG=python3 -``` - -Example: - -```sh -fx data.json '[x["age"] + i for i in range(10)]' -``` - -### Ruby - -```sh -export FX_LANG=ruby -``` - -Example: - -```sh -fx data.json 'x.to_a.map {|x| x[1]}' -``` +Use [JavaScript](js.md), [Python](python.md), or [Ruby](ruby.md). ## Streaming mode -The **fx** supports line-delimited JSON streaming and concatenated JSON streaming. +The **fx** supports line-delimited JSON streaming or concatenated JSON streaming. ```sh -$ kubectl logs ... | fx .message +$ echo ' +> {"message": "hello"} +> {"message": "world!"} +> ' | fx .message +hello +world! ``` ## Interactive mode -Type `?` to see full list of available shortcuts while in interactive mode. +Type `?` to see the full list of available shortcuts while in the interactive mode. ### Search -Press `/` and type regexp pattern to search in current JSON. -Search is performed on internal representation of the JSON without newlines. +Press `/` and type regexp pattern to search in the current JSON. +Search is performed on the internal representation of the JSON without newlines. -Type `n` to jump to next result, and `N` to previous.s +Type `n` to jump to the next result, and `N` to the previous ### Selecting text -You can't just select text in fx. This is due the fact that all mouse events are -redirected to stdin. To be able to select again you need instruct your terminal +You can't just select text in fx. This is due to the fact that all mouse events are +redirected to stdin. To be able to select again you need to instruct your terminal not to do it. This can be done by holding special keys while selecting: | Key | Terminal | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/doc/js.md new/fx-24.1.0/doc/js.md --- old/fx-24.0.0/doc/js.md 1970-01-01 01:00:00.000000000 +0100 +++ new/fx-24.1.0/doc/js.md 2023-04-07 15:33:40.000000000 +0200 @@ -0,0 +1,120 @@ +# JavaScript Reducers + +If any additional arguments were passed, fx converts them into a function which +takes the JSON as an argument named `x`. + +By default, fx uses builtin JavaScript VM ([goja](https://github.com/dop251/goja)), +but also can be used with node. + +```sh +export FX_LANG=js # Default +``` + +Or for usage with node: + +```sh +export FX_LANG=node +``` + +An example of anonymous function used as a reducer: +```sh +$ echo '{"foo": [{"bar": "value"}]}' | fx 'x => x.foo[0].bar' +value +``` + +The same reducer function can be simplified to: + +```sh +$ echo '{"foo": [{"bar": "value"}]}' | fx 'x.foo[0].bar' +value +``` + +Each argument treated as a reducer function. + +```sh +$ echo '{"foo": [{"bar": "value"}]}' | fx 'x.foo' 'x[0]' 'x.bar' +value +``` + +Update JSON using the spread operator: + +```sh +$ echo '{"name": "fx", "count": 0}' | fx '{...this, count: 1}' +{ + "name": "fx", + "count": 1 +} +``` + +## Dot + +Fx supports simple JS-like syntax for accessing data, which can be used with any `FX_LANG`. + +```sh +$ echo '{"foo": [{"bar": "value"}]}' | fx .foo[0].bar +value +``` + +## .fxrc.js + +Create _.fxrc.js_ file in `$HOME` directory, and define some useful functions. + +```js +// .fxrc.js +function upper(s) { + return s.toUpperCase() +} +``` + +```sh +$ cat data.json | fx .name upper +ANTON +``` + +## Node + +```sh +export FX_LANG=node +``` + +Use any npm package by installing it globally. Create _.fxrc.js_ file in `$HOME` +directory, and require any packages or define global functions. For example, +to access all lodash methods without `_` prefix, put next line into your +_.fxrc.js_ file: + +```js +Object.assign(global, require('lodash/fp')) +``` + +And now you will be able to call all lodash methods. For example, see who's been +committing to react recently: + +```sh +curl 'https://api.github.com/repos/facebook/react/commits?per_page=100' \ +| fx 'groupBy("commit.author.name")' 'mapValues(size)' toPairs 'sortBy(1)' reverse 'take(10)' fromPairs +``` + +> To be able to require global modules make sure you have correct `NODE_PATH` env variable. +> ```sh +> export NODE_PATH=`npm root -g` +> ``` + +The _.fxrc.js_ file supports both: `import` and `require`. + +```js +// .fxrc.js +import 'zx/globals' +const _ = require('lodash') +``` + +> If you want to use _.fxrc.js_ for both `FX_LANG=js` and `FX_LANG=node`, +> separate parts by `// nodejs:` comment: +> ```js +> // .fxrc.js +> function upper(s) { +> return s.toUpperCase() +> } +> // nodejs: +> import 'zx/globals' +> const _ = require('lodash') +> ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/doc/python.md new/fx-24.1.0/doc/python.md --- old/fx-24.0.0/doc/python.md 1970-01-01 01:00:00.000000000 +0100 +++ new/fx-24.1.0/doc/python.md 2023-04-07 15:33:40.000000000 +0200 @@ -0,0 +1,27 @@ +# Python Reducers + +If any additional arguments was passed, **fx** converts it to a function which +takes the JSON as an argument named `x`. + +```sh +export FX_LANG=python +``` +Or +```sh +export FX_LANG=python3 +``` + +Example: + +```sh +fx data.json '[x["age"] + i for i in range(10)]' +``` + +## Dot + +Fx supports simple syntax for accessing data, which can be used with any `FX_LANG`. + +```sh +$ echo '{"foo": [{"bar": "value"}]}' | fx .foo[0].bar +value +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/doc/ruby.md new/fx-24.1.0/doc/ruby.md --- old/fx-24.0.0/doc/ruby.md 1970-01-01 01:00:00.000000000 +0100 +++ new/fx-24.1.0/doc/ruby.md 2023-04-07 15:33:40.000000000 +0200 @@ -0,0 +1,23 @@ +# Ruby Reducers + +If any additional arguments was passed, **fx** converts it to a function which +takes the JSON as an argument named `x`. + +```sh +export FX_LANG=ruby +``` + +Example: + +```sh +fx data.json 'x.to_a.map {|x| x[1]}' +``` + +## Dot + +Fx supports simple syntax for accessing data, which can be used with any `FX_LANG`. + +```sh +$ echo '{"foo": [{"bar": "value"}]}' | fx .foo[0].bar +value +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/go.mod new/fx-24.1.0/go.mod --- old/fx-24.0.0/go.mod 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/go.mod 2023-04-07 15:33:40.000000000 +0200 @@ -3,31 +3,36 @@ go 1.17 require ( - github.com/charmbracelet/bubbles v0.10.3 - github.com/charmbracelet/bubbletea v0.20.0 - github.com/charmbracelet/lipgloss v0.5.0 - github.com/dop251/goja v0.0.0-20220501172647-e1eca0b61fa9 - github.com/mattn/go-isatty v0.0.14 - github.com/mazznoer/colorgrad v0.8.1 - github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 + github.com/charmbracelet/bubbles v0.15.0 + github.com/charmbracelet/bubbletea v0.23.2 + github.com/charmbracelet/lipgloss v0.7.1 + github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 + github.com/mattn/go-isatty v0.0.18 + github.com/mazznoer/colorgrad v0.9.1 + github.com/muesli/termenv v0.15.1 github.com/stretchr/testify v1.7.1 ) require ( github.com/atotto/clipboard v0.1.4 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/containerd/console v1.0.3 // indirect github.com/davecgh/go-spew v1.1.0 // indirect - github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect + github.com/dlclark/regexp2 v1.9.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect + github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/mazznoer/csscolorparser v0.1.2 // indirect - github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 // indirect + github.com/mattn/go-localereader v0.0.1 // indirect + github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mazznoer/csscolorparser v0.1.3 // indirect + github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect + github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect - golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect - golang.org/x/text v0.3.7 // indirect + github.com/rivo/uniseg v0.4.4 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/go.sum new/fx-24.1.0/go.sum --- old/fx-24.0.0/go.sum 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/go.sum 2023-04-07 15:33:40.000000000 +0200 @@ -1,14 +1,31 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= +github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= +github.com/aymanbagabas/go-osc52 v1.2.1 h1:q2sWUyDcozPLcLabEMd+a+7Ea2DitxZVN9hTxab9L4E= +github.com/aymanbagabas/go-osc52 v1.2.1/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/charmbracelet/bubbles v0.10.3 h1:fKarbRaObLn/DCsZO4Y3vKCwRUzynQD9L+gGev1E/ho= github.com/charmbracelet/bubbles v0.10.3/go.mod h1:jOA+DUF1rjZm7gZHcNyIVW+YrBPALKfpGVdJu8UiJsA= +github.com/charmbracelet/bubbles v0.15.0 h1:c5vZ3woHV5W2b8YZI1q7v4ZNQaPetfHuoHzx+56Z6TI= +github.com/charmbracelet/bubbles v0.15.0/go.mod h1:Y7gSFbBzlMpUDR/XM9MhZI374Q+1p1kluf1uLl8iK74= github.com/charmbracelet/bubbletea v0.19.3/go.mod h1:VuXF2pToRxDUHcBUcPmCRUHRvFATM4Ckb/ql1rBl3KA= github.com/charmbracelet/bubbletea v0.20.0 h1:/b8LEPgCbNr7WWZ2LuE/BV1/r4t5PyYJtDb+J3vpwxc= github.com/charmbracelet/bubbletea v0.20.0/go.mod h1:zpkze1Rioo4rJELjRyGlm9T2YNou1Fm4LIJQSa5QMEM= +github.com/charmbracelet/bubbletea v0.23.1/go.mod h1:JAfGK/3/pPKHTnAS8JIE2u9f61BjWTQY57RbT25aMXU= +github.com/charmbracelet/bubbletea v0.23.2 h1:vuUJ9HJ7b/COy4I30e8xDVQ+VRDUEFykIjryPfgsdps= +github.com/charmbracelet/bubbletea v0.23.2/go.mod h1:FaP3WUivcTM0xOKNmhciz60M6I+weYLF76mr1JyI7sM= github.com/charmbracelet/harmonica v0.1.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= +github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= github.com/charmbracelet/lipgloss v0.4.0/go.mod h1:vmdkHvce7UzX6xkyf4cca8WlwdQ5RQr8fzta+xl7BOM= github.com/charmbracelet/lipgloss v0.5.0 h1:lulQHuVeodSgDez+3rGiuxlPVXSnhth442DATR2/8t8= github.com/charmbracelet/lipgloss v0.5.0/go.mod h1:EZLha/HbzEt7cYqdFPovlqy5FZPj0xFhg5SaqxScmgs= +github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S0atAUvBMP6Ppuk= +github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= +github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= +github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= @@ -17,13 +34,22 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 h1:Izz0+t1Z5nI16/II7vuEo/nHjodOg0p7+OiDpjX5t1E= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dlclark/regexp2 v1.9.0 h1:pTK/l/3qYIKaRXuHnEnIf7Y5NxfRPfpb7dis6/gdlVI= +github.com/dlclark/regexp2 v1.9.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20220501172647-e1eca0b61fa9 h1:BXEAWJOT2C6ex9iOzVnrYWMFjTRccNs7p8fpLCLLcm0= github.com/dop251/goja v0.0.0-20220501172647-e1eca0b61fa9/go.mod h1:TQJQ+ZNyFVvUtUEtCZxBhfWiH7RJqR3EivNmvD6Waik= +github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 h1:xkbJGxVnk5sM8/LXeTKaBOfAZrI+iqvIPyH8oK1c6CQ= +github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= +github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= +github.com/google/pprof v0.0.0-20230406165453-00490a63f317/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= +github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -39,18 +65,34 @@ github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= +github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mazznoer/colorgrad v0.8.1 h1:Bw/ks+KujOOg9E6YQvPqSqTLryiFnwliAH5VMZarSTI= github.com/mazznoer/colorgrad v0.8.1/go.mod h1:xCjvoNkXHJIAPOUMSMrXkFdxTGQqk8zMYS3e5hSLghA= +github.com/mazznoer/colorgrad v0.9.1 h1:MB80JYVndKWSMEM1beNqnuOowWGhoQc3DXWXkFp6JlM= +github.com/mazznoer/colorgrad v0.9.1/go.mod h1:WX2R9wt9B47+txJZVVpM9LY+LAGIdi4lTI5wIyreDH4= github.com/mazznoer/csscolorparser v0.1.0/go.mod h1:Aj22+L/rYN/Y6bj3bYqO3N6g1dtdHtGfQ32xZ5PJQic= github.com/mazznoer/csscolorparser v0.1.2 h1:/UBHuQg792ePmGFzTQAC9u+XbFr7/HzP/Gj70Phyz2A= github.com/mazznoer/csscolorparser v0.1.2/go.mod h1:Aj22+L/rYN/Y6bj3bYqO3N6g1dtdHtGfQ32xZ5PJQic= +github.com/mazznoer/csscolorparser v0.1.3 h1:vug4zh6loQxAUxfU1DZEu70gTPufDPspamZlHAkKcxE= +github.com/mazznoer/csscolorparser v0.1.3/go.mod h1:Aj22+L/rYN/Y6bj3bYqO3N6g1dtdHtGfQ32xZ5PJQic= github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 h1:kMlmsLSbjkikxQJ1IPwaM+7LJ9ltFu/fi8CRzvSnQmA= github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= @@ -58,33 +100,71 @@ github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 h1:QANkGiGr39l1EESqrE0gZw0/AJNYzIvoGLhIoVYtluI= github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= +github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc= +github.com/muesli/termenv v0.14.0/go.mod h1:kG/pF1E7fh949Xhe156crRUrHNyK221IuGO7Ez60Uc8= +github.com/muesli/termenv v0.15.1 h1:UzuTb/+hhlBugQz28rpzey4ZuKcZ03MeKsoG7IJZIxs= +github.com/muesli/termenv v0.15.1/go.mod h1:HeAQPTzpfs016yGtA4g00CsdYnVLJvxsS4ANqrZs2sQ= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210422114643-f5beecf764ed/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8= golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/help.go new/fx-24.1.0/help.go --- old/fx-24.0.0/help.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/help.go 2023-04-07 15:33:40.000000000 +0200 @@ -22,6 +22,7 @@ curl ... | fx %v + -h, --help print help -v, --version print version --print-code print code of the reducer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/install.sh new/fx-24.1.0/install.sh --- old/fx-24.0.0/install.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/fx-24.1.0/install.sh 2023-04-07 15:33:40.000000000 +0200 @@ -0,0 +1,41 @@ +#!/bin/sh + +curl -sAx "https://bit.ly/fx-download-counter" > /dev/null + +version='24.0.0' +os=$(uname -s | tr '[:upper:]' '[:lower:]') +machine=$(uname -m) + +case $os in +linux | darwin) + ext='' + ;; +windows) + os=windows + ext='.exe' + ;; +*) + echo "Unsupported OS: $os" >&2 + exit 1 + ;; +esac + +case $machine in +x86_64 | amd64) + arch=amd64 + ;; +arm64 | aarch64) + arch=arm64 + ;; +*) + echo "Unsupported architecture: $machine" >&2 + exit 1 + ;; +esac + +asset="fx_${os}_${arch}${ext}" +echo "Installing fx ${version} (${asset})" +curl -Lfs "https://github.com/antonmedv/fx/releases/download/${version}/${asset}" -o fx + +chmod +x fx +mv fx /usr/local/bin/fx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/main.go new/fx-24.1.0/main.go --- old/fx-24.0.0/main.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/main.go 2023-04-07 15:33:40.000000000 +0200 @@ -22,6 +22,7 @@ ) var ( + flagHelp bool flagVersion bool flagPrintCode bool ) @@ -30,6 +31,8 @@ var args []string for _, arg := range os.Args[1:] { switch arg { + case "-h", "--help": + flagHelp = true case "-v", "-V", "--version": flagVersion = true case "--print-code": @@ -39,6 +42,10 @@ } } + if flagHelp { + fmt.Println(usage(DefaultKeyMap())) + return + } if flagVersion { fmt.Println(version) return @@ -135,6 +142,12 @@ return } if lang == "js" { + simplePath, ok := SplitSimplePath(args) + if ok { + output := GetBySimplePath(object, simplePath) + Echo(output, theme) + os.Exit(0) + } vm, fn, err := CreateJS(args, fxrc) if err != nil { fmt.Println(err) @@ -280,16 +293,28 @@ switch { case key.Matches(msg, m.keyMap.PageDown): m.ViewDown() + m.moveCursorToView() + m.render() case key.Matches(msg, m.keyMap.PageUp): m.ViewUp() + m.moveCursorToView() + m.render() case key.Matches(msg, m.keyMap.HalfPageDown): m.HalfViewDown() + m.moveCursorToView() + m.render() case key.Matches(msg, m.keyMap.HalfPageUp): m.HalfViewUp() + m.moveCursorToView() + m.render() case key.Matches(msg, m.keyMap.GotoTop): m.GotoTop() + m.moveCursorToTop() + m.render() case key.Matches(msg, m.keyMap.GotoBottom): m.GotoBottom() + m.moveCursorToBottom() + m.render() } } @@ -619,3 +644,31 @@ m.cursor = len(m.paths) - 1 } } + +func (m *model) moveCursorToView() { + top := 0 + bottom := 0 + + // find the first path in the viewport + for i := 0; i < m.height && top == 0; i++ { + top = m.pathToIndex[m.lineNumberToPath[m.offset+i]] + } + + // find the last path in the viewport + for i := 1; i < m.height && bottom == 0; i++ { + bottom = m.pathToIndex[m.lineNumberToPath[m.offset+m.height-i]] + } + + m.showCursor = true + m.cursor = clamp(m.cursor, bottom, top) +} + +func (m *model) moveCursorToTop() { + m.showCursor = true + m.cursor = 0 +} + +func (m *model) moveCursorToBottom() { + m.showCursor = true + m.cursor = len(m.paths) - 1 +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/js.go new/fx-24.1.0/pkg/reducer/js.go --- old/fx-24.0.0/pkg/reducer/js.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/js.go 2023-04-07 15:33:40.000000000 +0200 @@ -19,13 +19,6 @@ for i, a := range args { rs += " try {" switch { - case a == ".": - rs += ` - x = function () - { return this } - .call(x) -` - case flatMapRegex.MatchString(a): code := fold(strings.Split(a, "[]")) rs += fmt.Sprintf( @@ -100,6 +93,6 @@ fmt.Print(output) return 0 } - echo(object, theme) + Echo(object, theme) return 0 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/node.go new/fx-24.1.0/pkg/reducer/node.go --- old/fx-24.0.0/pkg/reducer/node.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/node.go 2023-04-07 15:33:40.000000000 +0200 @@ -32,13 +32,6 @@ for i, a := range args { rs += " try {" switch { - case a == ".": - rs += ` - x = function () - { return this } - .call(x) -` - case flatMapRegex.MatchString(a): code := fold(strings.Split(a, "[]")) rs += fmt.Sprintf( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/python.go new/fx-24.1.0/pkg/reducer/python.go --- old/fx-24.0.0/pkg/reducer/python.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/python.go 2023-04-07 15:33:40.000000000 +0200 @@ -17,20 +17,12 @@ func python(args []string) string { rs := "\n" for i, a := range args { - rs += "try:" - switch { - case a == ".": - rs += ` - x = x -` - - default: - rs += fmt.Sprintf( - ` + rs += fmt.Sprintf( + `try: f = (lambda x: (%v))(x) x = f(x) if callable(f) else f `, a) - } + // Generate a beautiful error message. rs += "except Exception as e:\n" pre, post, pointer := trace(args, i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/reduce.go new/fx-24.1.0/pkg/reducer/reduce.go --- old/fx-24.0.0/pkg/reducer/reduce.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/reduce.go 2023-04-07 15:33:40.000000000 +0200 @@ -28,10 +28,10 @@ } func Reduce(input interface{}, lang string, args []string, theme Theme, fxrc string) int { - path, ok := splitPath(args) + path, ok := SplitSimplePath(args) if ok { - output := getByPath(input, path) - echo(output, theme) + output := GetBySimplePath(input, path) + Echo(output, theme) return 0 } var cmd *exec.Cmd @@ -68,7 +68,7 @@ fmt.Print(string(output)) return 0 } - echo(object, theme) + Echo(object, theme) if dec.InputOffset() < int64(len(output)) { fmt.Print(string(output[dec.InputOffset():])) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/ruby.go new/fx-24.1.0/pkg/reducer/ruby.go --- old/fx-24.0.0/pkg/reducer/ruby.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/ruby.go 2023-04-07 15:33:40.000000000 +0200 @@ -17,19 +17,10 @@ func ruby(args []string) string { rs := "\n" for i, a := range args { - rs += "begin" - switch { - case a == ".": - rs += ` - x = x -` - - default: - rs += fmt.Sprintf( - ` + rs += fmt.Sprintf( + `begin x = lambda {|x| %v }.call(x) `, a) - } // Generate a beautiful error message. rs += "rescue Exception => e\n" pre, post, pointer := trace(args, i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/simple.go new/fx-24.1.0/pkg/reducer/simple.go --- old/fx-24.0.0/pkg/reducer/simple.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/simple.go 2023-04-07 15:33:40.000000000 +0200 @@ -24,7 +24,7 @@ singleQuoteEscape ) -func splitPath(args []string) ([]interface{}, bool) { +func SplitSimplePath(args []string) ([]interface{}, bool) { path := make([]interface{}, 0) for _, arg := range args { s := "" @@ -180,7 +180,7 @@ return unicode.IsLetter(ch) || unicode.IsDigit(ch) || ch == '_' || ch == '$' } -func getByPath(object interface{}, path []interface{}) interface{} { +func GetBySimplePath(object interface{}, path []interface{}) interface{} { for _, get := range path { switch get := get.(type) { case string: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/simple_test.go new/fx-24.1.0/pkg/reducer/simple_test.go --- old/fx-24.0.0/pkg/reducer/simple_test.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/simple_test.go 2023-04-07 15:33:40.000000000 +0200 @@ -83,7 +83,7 @@ } for _, tt := range tests { t.Run(strings.Join(tt.args, " "), func(t *testing.T) { - path, ok := splitPath(tt.args) + path, ok := SplitSimplePath(tt.args) require.Equal(t, tt.want, path) require.True(t, ok) }) @@ -130,7 +130,7 @@ } for _, tt := range tests { t.Run(strings.Join(tt.args, " "), func(t *testing.T) { - path, ok := splitPath(tt.args) + path, ok := SplitSimplePath(tt.args) require.False(t, ok, path) }) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/reducer/utils.go new/fx-24.1.0/pkg/reducer/utils.go --- old/fx-24.0.0/pkg/reducer/utils.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/reducer/utils.go 2023-04-07 15:33:40.000000000 +0200 @@ -9,7 +9,7 @@ . "github.com/antonmedv/fx/pkg/theme" ) -func echo(object interface{}, theme Theme) { +func Echo(object interface{}, theme Theme) { if s, ok := object.(string); ok { fmt.Println(s) } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/pkg/theme/theme.go new/fx-24.1.0/pkg/theme/theme.go --- old/fx-24.0.0/pkg/theme/theme.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/pkg/theme/theme.go 2023-04-07 15:33:40.000000000 +0200 @@ -18,7 +18,7 @@ Boolean Color Number Color } -type Color func(s string) string +type Color func(s ...string) string var ( defaultCursor = lipgloss.NewStyle().Reverse(true).Render @@ -151,8 +151,8 @@ }, } -func noColor(s string) string { - return s +func noColor(s ...string) string { + return s[0] } func fg(color string) Color { @@ -165,8 +165,8 @@ func gradient(colors ...string) Color { grad, _ := colorgrad.NewGradient().HtmlColors(colors...).Build() - return func(s string) string { - runes := []rune(s) + return func(s ...string) string { + runes := []rune(s[0]) colors := grad.ColorfulColors(uint(len(runes))) var out strings.Builder for i, r := range runes { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/scripts/build.mjs new/fx-24.1.0/scripts/build.mjs --- old/fx-24.0.0/scripts/build.mjs 1970-01-01 01:00:00.000000000 +0100 +++ new/fx-24.1.0/scripts/build.mjs 2023-04-07 15:33:40.000000000 +0200 @@ -0,0 +1,26 @@ +const goos = [ + 'linux', + 'darwin', + 'windows', +] +const goarch = [ + 'amd64', + 'arm64', +] + +const name = (GOOS, GOARCH) => `fx_${GOOS}_${GOARCH}` + (GOOS === 'windows' ? '.exe' : '') + +const resp = await fetch('https://api.github.com/repos/antonmedv/fx/releases/latest') +const {tag_name: latest} = await resp.json() + +await $`go mod download` + +await Promise.all( + goos.flatMap(GOOS => + goarch.map(GOARCH => + $`GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${name(GOOS, GOARCH)}`))) + +await Promise.all( + goos.flatMap(GOOS => + goarch.map(GOARCH => + $`gh release upload ${latest} ${name(GOOS, GOARCH)}`))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fx-24.0.0/version.go new/fx-24.1.0/version.go --- old/fx-24.0.0/version.go 2022-05-08 20:31:27.000000000 +0200 +++ new/fx-24.1.0/version.go 2023-04-07 15:33:40.000000000 +0200 @@ -1,3 +1,3 @@ package main -const version = "24.0.0" +const version = "24.1.0" ++++++ vendor.tar.gz ++++++ ++++ 106956 lines of diff (skipped)
