adamhooper / selenium-server-standalone-jar

A jarfile, so you don't need to include it in your repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symlink with no version information

rektide opened this issue · comments

Hello,

Lovely package, does a lot of good.

It would be supremely helpful to have a jar/selenium-server-standalone.jar symlink that points to jar/selenium-server-standalone-2.44.0.jar. I've been writing a console.log(require('selenium-server-standalone-jar').path) program and including it in dependants for a while, as I'm wary of hardcoding a path to a specific version, but this workaround I do introduces a bit of clutter and causes some occasional "what is this for?" questions that I don't see as interesting or helpful discussion points.

If selenium-server-standalone-jar were to include a version-less symlink to the actual jar, it'd make using this package easier for those of us simply looking to keep our build-chains npm-centric.

Unfortunately, this patch will create different behaviors, depending on the git client configuration. See core.symlinks at https://www.kernel.org/pub/software/scm/git/docs/git-config.html

Could you please explain your use case a bit more clearly? The entire purpose of this library is to abstract away the path; I don't understand what you're trying to do.

Lacking further information, I am closing this issue. Please open it again if there is a compelling reason.

Hey There,

Have you looked into adding a bin setting in package.json? This tells NPM to create a symlink in node_modules/.bin on install meaning a dev can always safely reference ./node_modules/.bin/selenium-server-standalone-jar without worrying about version number.

Let me know if you want a PR if you think it's a good idea. I think your versioning tracks selenium standalone versioning though right? So might be easier to put it in on next release.

I certainly think it would be useful. I'm currently using it with Nightwatch.JS which requires a path_to_jar in its config and it would be nice not to hardcode version numbers.

Thanks for your work on this in any case 👍

@pjho My problem with using bin (aside from this not being the intended use of bin) is that global and local installs will have different paths -- so the fact that a package is installed does not tell you there's a jarfile at ./node_modules/bin/selenium-server-standalone.jar.

This repo is just one attempt at solving a problem. It may not be the best solution, but I'd like to keep its behavior consistent. I suggest you fork this package (or start afresh -- there's not much code here) to try out what you're suggesting. I'll even link to it from the README if you submit a pull request with the link text.