How to install no latest but highest version of npm package without specifying a version - github

For some reason when I do npm publish the registry does not remove latest tag from previous version and does not attach latest to newer version.
I there a way to download highest version of package without knowing exactly what the version is?

I recommend using semantic versioning if you aren't already. You can use this tool to see examples of how version spec works. Here's an example that could be included in package.json which will install the highest version of lodash in the registry:
"dependencies": {
"lodash": "x"
}

Ok, I do not know how to install highest version. But I localized a error in npm, if I publish my package when in package.json is "depraceted":false it will not change tag to latest even if I pass it as flag in publish command.

Related

NuGet Install Matching Pattern Version

How do you install a nuget package with a matching pattern:
For example, I want nuget to get any version matching the pattern 1.0.0* (1.1.0-rc, 1.1.0.1, etc...).
But nuget doesn't support the wildcard character, I get an error '1.1.0*' is not a valid version string
And running:
nuget install <mypackage> -Version 1.0.0 -Source <myserver>
Will only resolve 1.0.0 version and nothing else.
I actually wrote a script that queries the server for version, and picks whatever I want, but I wonder if there's a native way of doing that using just the nuget CLI.

Chaquopy upgrade pip

While running the latest chaquopy I am running into the error:
Collecting tensorflow==1.13.1
Could not find a version that satisfies the requirement tensorflow==1.13.1 (from versions: 1.10.1)
No matching distribution found for tensorflow==1.13.1
I am wondering if the internal chaquopy pip is too old and needs to be upgraded. How is this possible?
The issue isn't the version of pip, it's the version of TensorFlow. Try changing your project to use version 1.10.1 instead, as the message suggests.

Error running purescript example

I'm trying to learn purescript starting with the simple "Hello World" from "Purescript by Example".
Issuing a "pulp run" throws this error:
* Building project in /home/peter/devel/purescript/my-project
Error found:
at bower_components/purescript-psci-support/src/PSCI/Support.purs line 21, column 1 - line 21, column 1
Unable to parse module:
unexpected "else"
expecting declaration or end of input
purs is of version 0.11.7, Pulp is version 12.2.0.
What am I doing wrong?
Thanks for your help.
The recent release of PureScript 0.12 has introduced breaking changes. Several new package versions will not work on older compilers. If you want to stay pre-0.12, and you are using bower, then do this to your project:
Delete all contents in the bower_components directory.
Downgrade all package versions in bower.json to pre-0.12 versions, such as prelude 3.2.0, console 3.0.0, and psci-support 3.0.0. You can use Pursuit and look at older bower.json files on GitHub to figure out these versions.
Run bower install.
Run pulp build.
Alternatively, you can upgrade to 0.12 with PureScript Version Manager. At this time 0.12 is not available on npm. To do this you can follow these installation instructions but in short is:
Uninstall the old compiler: npm uninstall -g purescript.
Install PSVM: npm install -g psvm.
Download 0.12: psvm install-latest.
Install 0.12: psvm use v0.12.0
Add PSVM's bin directory to your PATH which is C:\Users\<username>\.psvm\current\bin on Windows. Make sure your current session is updated with this new PATH variable.
Test out the new compiler: purs --version.
I'm working through PureScript by Example and ran into the same issue today. I stumbled across issue 3367, where gabejohnson directs us to the blog post, Working with 0.11.7 in a 0.12 world.
Long story short, it seems like PureScript 0.12 has introduced breaking changes, just like erisco said, and we should use psc-package instead of bower if we want to stay on 0.11.7 (because pulp doesn't work with PureScript 0.12 at the moment and bower is giving the team issues with dependency management).
You can install psc-package either with the binary or using npm install -g psc-package.
After that, you will need to tell pulp to use psc-package when you init a new project using pulp --psc-package init. Finally, install the lists package with psc-package install lists.
Keep in mind that packages do not have the purescript- prefix when using psc-package, so you just pass in the package name.
This is what got me back on track and I hope this helps you too.

How can I keep nuget from updating dependencies?

I'm attempting to install a nuget package which has incorrectly specified one of it's dependencies. Common.Logging.Log4Net requires log4net = 1.2.10 however the nuget package specifies log4net >= 1.2.10. Even if I manually install the older version of log4net, nuget upgrades log4net to 1.2.11 when I install Common.Logging.Log4Net. How can I get nuget to bypass dependency resolution or at least prefer installed packages of a sufficient version?
In order to bypass dependency resolution you can use the -IgnoreDependencies option:
Install-Package -IgnoreDependencies ThePackageName
You should be able to lock the package to a specific version by hand-editing the packages.config and setting the allowedVersions attribute to indicate the version span you want to allow.
<package id="Common.Logging.Log4Net" version="1.2.10"
allowedVersions="[1.2,1.2.10]" />
Note that his will however not upgrade the version of the package at all even when explicitly updating the package.
See the nuget versioning documentation for more info on versioning.

Nuget package dependencies. Does it work the way it should?

RavenDb latest version is installed as a nuget package. It references Newtonsoft.Json 4.0.2.
I'm trying to install TweetSharp. I get this log:
M> Install-Package TweetSharp
Attempting to resolve dependency 'Hammock (≥ 1.2.3)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.0.1)'.
Successfully installed 'Hammock 1.2.6'.
Successfully installed 'Newtonsoft.Json 4.0.3'.
Successfully installed 'TweetSharp 2.0.8'.
Install failed. Rolling back...
Install-Package : Updating 'Newtonsoft.Json 4.0.2' to 'Newtonsoft.Json 4.0.3'
failed. Unable to find a version of 'RavenDB-Embedded' that is compatible with
'Newtonsoft.Json 4.0.3'.
As you can see, even if TweetSharp just needs 'Newtonsoft.Json (≥ 4.0.1)', nuget wants to install version 4.0.3 which can not work with RavenDb.
I tried to install previous versions of TweetSharp but it does not change anything.
Any way to circumvent this?
Sounds like a possible bug in NuGet. Please log an issue in the NuGet bug tracker: http://nuget.codeplex.com/workitem/list/basic
If TweetSharp is fine with NewtonSoft.Json 4.0.2, then the install should not have failed. In your bug, can you post the exact versions that caused this problem. For example:
List of installed packages with exact version installed.
List of dependencies for each package and the specific version range they specify.
And the exact version of TweetSharp you're trying to install. That'll help us look at the issue more quickly. Thanks!
My guess is we have some default logic that tries to upgrade packages to the latest bug fix release. In this case, we tried that, but it causes another dependency to fail. In that case, we should have known that and not tried to upgrade.
This is down to the semantic versioning that NuGet has had since (I think) 1.6. It's explained in more detail here but the basic idea is that if your dependency hasn't updated either the major or the minor revision number then they'll assume that it's a bugfix and not a breaking change.
So in this case the decision to install 4.0.3 instead of 4.0.1 was made.
You can run install-package with -ignoredependencies I would have thought that if you'd had 4.0.2 installed it wouldn't try to update you (because 4.0.2 satisfies the dependency).