#`yarn outdated` flags dev tag as outdated
100 messages · Page 1 of 1 (latest)
Looks more like yarn being yarn than anything else
Or it reads from the package.json
Maybe if the version format was switched to 13.0.0-dev.{timestamp}.{commit} it would be ordered?
Either way, yarn add discord.js@dev should always install latest
I think it might be because it's not sequential
The reason it's timestamp after commit IS so its ordered
but commit is random
Since timestamps are sequential after all
the commit sha makes it unordered
Yet the timestamp makes it ordered
and fixed several tools with that issue
No, because the commit comes first?
It fixed dependabot not recognizing changes
13.0.0-dev-1234567.0000000001 < 13.0.0-dev-abcdef1.0000000002
thats not how its checked
even though 1234567 might be made after a...
It seems like that's how yarn outdated checks it
How does dependabot check it?
npm works fine
yarn doesn't
so its a yarn issue
Shouldn't it not be displaying in npm at all?
if it's truly latest
??
well, it's probably getting confused because its a tagged release
I thought outdated returned no output if everything is up to date
its not "latest"
its "dev"
Hmm, okay
Best shot is setting discord.js to dev in package.json
Won't that make my local install inconsistent with the CI then?
Like, the actual version installed locally could be a totally different @dev release than the one the CI gets
thats why caches exist
hm alright
Also, technically I'm not the one in charge of npm, thats more of a Crol question

Ah, gotcha 
just btw @hushed rampart do you know if the version format can be changed to be sequential? (i.e. timestamp-commitsha instead of commitsha-timestamp)?
I don't see how this will prevent anything
🤔
but if you want, flip it
idc
I think it's because yarn is checking for sequentially newer packages
yarn is dumb
I dont want to cater to it
Commits aren't inheritedly sequential lmao
that's why I think timestamp needs to be first??
rn commit is first which makes no sense
Its a build of a commit at that timestamp
but shouldn't the latest published version be the largest sequential version number, per semver?
No matter if you order it as number.commit or commit.number, you'll have the same issue
This is strictly a yarn issue
I guess I don't see how that wouldn't make a difference... The build with the largest timestamp is the latest build, so putting the timestamp first would make it sort as the largest, right?
Sorry if I'm just missing something here, I hope this isn't naive
Well find out. Take two of the dev releases, compare them, then inverse the values and see id they return the same
> older_release = '13.0.0-dev.fe6cc0c.1625227356'
'13.0.0-dev.fe6cc0c.1625227356'
> newer_release = '13.0.0-dev.2675b08.1627646567'
'13.0.0-dev.2675b08.1627646567'
> newer_release > older_release
false
> older_release > newer_release
true
Not inverse like that
Inverse commit and timestamp
older_release = '13.0.0-dev.fe6cc0c.1625227356'
> newer_release = '13.0.0-dev.2675b08.1627646567'
> newer_release > older_release
false
> older_release > newer_release
true
> older_release_2 = '13.0.0-dev.1625227356.fe6cc0c'
> newer_release_2 = '13.0.0-dev.1627646567.2675b08'
> newer_release_2 > older_release_2
true
> older_release_2 > newer_release_2
false
>
with timestamp first they sort correctly
because timestamps always increment
Yeah but i doubt that's how npm and probably pnpm sort
How else would they sort? If they sort by publish time then there wouldn't be an issue
But there is an issue
Its an issue on yarn
I think this is the relevant code
Because it falls back to a string sort
As does NPM
Since the latest version reported by the API is not in the 13.x semver range
And yet npm hasn't this issue
I think npm does, because it shouldn't be showing any output at all, and yet it complains that discord.js isn't latest
Even though it exits with 0, it still shouldn't be marking it as old
yes
thats normal
that happens with any dependency thats not on @latest
so @next, @beta, @dev etc
are you sure that wont break npm
👀
it shouldn't seeing as commit shas have letters in them
so there's really no change as far as NPM would be concerned
can u make a PR right after this one is merged
removing the t
thx
yea
shouldnt the pr also change this line:
run: npm deprecate discord.js@"~13.0.0-dev" "no longer supported" || true
that seems problematic seeing as the other one uses package.json version
what other one
npm version --git-tag-version=false $(jq --raw-output '.version' package.json).$(date +%s).$(git rev-parse --short HEAD)
i mean sure
it uses jq
sure
published a new dev release btw
does that fix it now
sec lemme check
yes
fixed
wait what
are you saying we have to stick with the t for now lol