After upgrading to 1.2.0, running deno, will fail with:
```✘130 ➜ deno test --allow-all --unstable
Check file:///Users/xxxxxxx/yyyyyyy/code/src/github.com/nats-io/nats.deno/.deno.test.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:917: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:438:18
Found 2 errors.
There's a single reference to URL on a constructor in my project:
let url = new URL(u);
if (!url.port) {
url.port = `${DEFAULT_PORT}`;
...
```
This is on OS X.
You should use a locked version of deno.land/std. The latest version is 0.61.0. You should be importing from https://deno.land/[email protected]. This is described at https://deno.land/std:
It is strongly recommended that you link to tagged releases to avoid unintended updates and breaking changes.
expecting to be in sync with master. Yes just figured out that changing 35 imports to be locked, fixed it, but this is really suboptimal - perhaps Deno should offer a flag to clamp all non-versioned packages to something - this would allow a simple flag in a build command to handle it.
Well you already get a warning in the console when a non fixed std version is downloaded. The first full example on the home page shows a fixed version std.
Also your non fixed versions would have worked had you reloaded your dependencies after updating Deno. (--reload)
expecting to be in sync with master
It is, but your local cached version isn't.
Any mechanism for reloading cached versions?
@lucacasonato thanks - @kitsonk's comment threw me off.
@aricart did you solve this issue?
@FadiNouh1, yes the --reload: https://deno.land/manual/linking_to_external_code/reloading_modules fixes the problem.
how do I upgrade std package. I'm not using it anywhere.
deno info --no-check main.ts should give you a full dependency tree.