i18n-node icon indicating copy to clipboard operation
i18n-node copied to clipboard

math-interval-parser

Open AdamZikmund opened this issue 8 years ago • 4 comments

Hi, i have a question why is your project depending on this package "math-interval-parser". Which has last commit 2 years ago. I want to use XRegExp version of 3.2.0 in my project but i cant because of "math-interval-parser" dependency on 5 years old XRegExp 2.0.0.

AdamZikmund avatar Jun 22 '17 21:06 AdamZikmund

That Module provides parsing ranges https://github.com/mashpie/i18n-node/blob/master/README.md#ranged-interval-support

And the modules deps shouldn't compromise your own. Npm installs each modules dependencies indipendently.

Could you provide your setup for debugging?

mashpie avatar Jun 23 '17 07:06 mashpie

Hi, I have updated XRegExp version in math-interval-parser.

Semigradsky avatar Jun 23 '17 07:06 Semigradsky

I will update math-interval-parser in next release accordingly. Meanwhile while working with node 8.1.x + npm 5.3.x I figured out, what happens. npm deduped xregexp as soon I installed another package also depending on xregexp:

npm ls xregexp

├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected]  deduped
└─┬ [email protected]
  └── [email protected] 

[email protected] from named-routes is used to resolve [email protected] deps. Unfortunatly [email protected] is compatible with [email protected] not with [email protected].

Funny what happend to the modules tree after I added math-interval-parser as a core dep:

npm i math-interval-parser -S

npm ls xregexp

├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected] 
├─┬ [email protected]
│ └── [email protected] 
└─┬ [email protected]
  └── [email protected]  deduped

now i18n is using old [email protected] with old [email protected] (as it should until updated)

Still I think it might be a deduplication issue, since how I understand semver (https://docs.npmjs.com/misc/semver) this shouldn't happen with

  • "xregexp": "^2.0.0" (from https://github.com/Semigradsky/math-interval-parser/blob/v1.1.0/package.json)
  • "math-interval-parser": "^1.1.0" (from https://github.com/mashpie/i18n-node/blob/master/package.json)

^1.2.3 := >=1.2.3 <2.0.0 ^0.2.3 := >=0.2.3 <0.3.0 ^0.0.3 := >=0.0.3 <0.0.4

and finally I added xregexp as core dep:

npm i xregexp -S

├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected] 
├─┬ [email protected]
│ └── [email protected]  deduped
├─┬ [email protected]
│ └── [email protected]  deduped
└── [email protected] 

looks fine, old + new versions alongside with some deduped packages when possible - wired?

mashpie avatar Aug 05 '17 15:08 mashpie

@AdamZikmund @mashpie I have removed xregexp from dependencies, so it should be okay now

Semigradsky avatar Jan 09 '19 12:01 Semigradsky