Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

fix: import map with trailing slash #142

Merged
merged 9 commits into from Apr 14, 2020
Merged

Conversation

shian15810
Copy link
Contributor

@shian15810 shian15810 commented Apr 14, 2020

@shian15810
Copy link
Contributor Author

@axetroy I have no authority over this coveralls failing the test. Please help, thanks.

@shian15810
Copy link
Contributor Author

@axetroy Thanks! Test is ok now.

@shian15810
Copy link
Contributor Author

shian15810 commented Apr 14, 2020

Just FYI, I'm experiencing this issue a lot: kulshekhar/ts-jest#1506

Should be fixed in next release of jest, but not yet as for this moment.

ATM, I'm using jest --no-cache to workaround this issue.

core/import_map.ts Outdated Show resolved Hide resolved
@shian15810
Copy link
Contributor Author

@axetroy Should be ok. This should be final.

Copy link
Owner

@axetroy axetroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work & Thx.

@axetroy axetroy changed the title fix import map with trailing slash fix: import map with trailing slash Apr 14, 2020
@axetroy axetroy merged commit d5ecc7e into axetroy:master Apr 14, 2020
@axetroy
Copy link
Owner

axetroy commented Apr 14, 2020

@shian15810 This has land in v3.6.0

@shian15810
Copy link
Contributor Author

shian15810 commented Apr 14, 2020

@axetroy Just tested it, no issue! Thank you.

@btrauma8
Copy link

i have 3.6.0, but this isn't working for me when trying to setup import maps for local directories.

am i doing something wrong?
image below should show what's going on...

sshot

@shian15810
Copy link
Contributor Author

@btrauma8

I have no problem using absolute and relative path in import_map.json.
However, if I specify the file: protocol, I get the same error like you.

You can try relative path like ./my-lib or absolute path like c:/junk/deno/my-lib.

I think you should raise another issue regarding the extension having problem with file: protocol in import_map.json.

@btrauma8
Copy link

btrauma8 commented Apr 16, 2020

ahhhh....
imports: { "my-lib/": "./my-lib/" } worked for both deno and vscode plugin
c:/junk... only worked for vscode plugin, not deno.

for some reason i thought the importmap had to use file: protocol if pointing to local files,
but apparently not. relative offset is nicer anyway, so, thanks!

now i can get back the tsconfig.json baseUrl functionality that i miss

@shian15810
Copy link
Contributor Author

@btrauma8 I think you definitely should raise an issue about this problem.

In any way, this extension should comply to specs and deno standards.

@btrauma8
Copy link

done. https://github.com/axetroy/vscode-deno/issues/146

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants