Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xeval example doesn't work anymore #7757

Closed
stefanbuck opened this issue Sep 29, 2020 · 2 comments
Closed

xeval example doesn't work anymore #7757

stefanbuck opened this issue Sep 29, 2020 · 2 comments

Comments

@stefanbuck
Copy link

I just updated deno from version 1.0.1 to 1.4.2 and this seems to break the xeval example.

Before

$ deno --version
deno 1.0.1
v8 8.4.300
typescript 3.9.2

$ cat file.txt | deno run https://deno.land/std/examples/xeval.ts -- "console.log($, '🐈')"
foo 🐈
bar 🐈

After

$ deno --version
deno 1.4.2
v8 8.7.75
typescript 4.0.3

$ cat file.txt | deno run https://deno.land/std/examples/xeval.ts -- "console.log($, '🐈')"

Check https://deno.land/std/examples/xeval.ts
error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
  Type 'URL' is not assignable to type 'string'.
  return new URL(url).pathname
                 ~~~
    at https://deno.land/std/path/win32.ts:911:18

TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
  Type 'URL' is not assignable to type 'string'.
  return new URL(url).pathname;
                 ~~~
    at https://deno.land/std/path/posix.ts:433:18

Found 2 errors.

I also tried to run the example listed in the xeval.ts file, but this fails with the same error.

cat /etc/passwd | deno run -A https://deno.land/std/examples/xeval.ts "a = $.split(':'); if (a) console.log(a[0])"

Please let me know if you need any further information.

@lucacasonato
Copy link
Member

Please use tagged std releases: deno run https://deno.land/std@0.71.0/examples/xeval.ts

@stefanbuck
Copy link
Author

Oh sweet, thanks for this lightning fast response. Should the example be updated or is this common sense in deno land?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants