nick-bull

Results 11 comments of nick-bull

Here's a shell function that gets the latest version gvm_use_latest() { latest_gvm="$(gvm listall | grep -o 'go[0-9]\{1,\}\.[0-9]\{1,\}$' | sort --version-sort | tail -n1)" gvm install "$latest_gvm" && gvm use "$latest_gvm"...

Temporary solution - edit for your requirements: ``` jj_v() { __val="$1"; __key="$2"; jj -v "$__val" "$__key" | (test -n "$3" && f "${@:3}" || cat) } ``` `echo '{"name":{"last":"Smith"}}' |...

Further reading [here](https://nodejs.org/api/packages.html#packages_subpath_imports) and with a great example of directory mapping [here](https://nodejs.org/api/packages.html#packages_subpath_patterns). Hopefully this latter example clears up any confusion about the difference between `"imports"` and `"exports"` usage too

An interest afterthought to replacing this module is that import mapping does not resolve directory imports, e.g. `"#services/*": "./src/services/*.js"` would not resolve `import ... from '#services/someCoolService'` to `./src/services/someCoolService/index.js`. You can...

> @nick-bull ..uh > > ``` > "#services/*": "./src/services/*.js" > ``` > > Of course it doesn't? That'd resolve to `./src/services/someCoolService.js` > Use this instead: > > ``` > "#services/*":...

> @nick-bull No, you did not already suggest what I said specifically. You suggested something similar, which was `"#services/*": "./src/services/*.js"` as aforementioned. Although, actually, that still works - you'll notice...

@Papooch You didn't happen to get burned in [the same way as I did](https://github.com/ilearnio/module-alias/issues/113#issuecomment-784247113)? Test by using ``` const { initModels } = require('#submodules/db-models/master/index.js'); ```

@Papooch I suspect you're being burned for the same reason as the prior mentioned comment, this feature isn't going to affect extension resolution. Try `node --es-module-specifier-resolution=node`, or install `esm` and...

@initplatform I'm not sure you'll need the `index` either, as I'm pretty sure directory imports are part of `--es-module-specifier-resolution=node`

One other reason to keep maintaining this package is that import mapping only works for `"type": "module"`, which isn't ideal for e.g., React Native