antonmedv/fx

Versions 24 and 25 on npm are broken

ryantate13 opened this issue · 1 comments

Can see at the links below that much of the code of the package is missing. There's no node shebang either so running it generates a syntax error in the shell.

$ npm i -g fx@20

added 14 packages, and changed 1 package in 159ms

$ fx --version
20.0.2

$ fx --help     

  Usage
    $ fx [code ...]               

  Examples
    $ echo '{"key": "value"}' | fx 'x => x.key'
    value

    $ echo '{"key": "value"}' | fx .key
    value    

    $ echo '[1,2,3]' | fx 'this.map(x => x * 2)'
    [2, 4, 6]

    $ echo '{"items": ["one", "two"]}' | fx 'this.items' 'this[1]'
    two

    $ echo '{"count": 0}' | fx '{...this, count: 1}'
    {"count": 1}

    $ echo '{"foo": 1, "bar": 2}' | fx ?
    ["foo", "bar"]

$ npm i -g fx@24

changed 1 package in 68ms

$ fx --help
/home/ryan/.nvm/versions/node/v19.1.0/bin/fx: 1: Syntax error: "(" unexpected

$ npm i -g fx@25

removed 14 packages, and changed 1 package in 311ms

$ fx --help     
/home/ryan/.nvm/versions/node/v19.1.0/bin/fx: 1: Syntax error: "(" unexpected

Fixed in v26)

ls | npx fx -r '.trim().split("\n")'