๐ฆ๐ Inspect changes between npm packages in a webapp
npm install
npm run dev
Deployed automagically using Vercel
ISC ยฉ Oscar Busk
๐ฆ๐ Inspect changes between npm packages in a webapp
Home Page: https://npm-diff.app
License: ISC License
๐ฆ๐ Inspect changes between npm packages in a webapp
npm install
npm run dev
Deployed automagically using Vercel
ISC ยฉ Oscar Busk
Should be a nice way to easily compare other versions than the initial ones you are comparing.
Some packages only publishes minified code, would be nice to be able to still make a diff of them.
This opens for lot's of issues obviously. This would mean we can't rely on libnpmdiff in the same way we do currently, since we would want to diff the two unminified files. We could look closer at the code of libnpmdiff and then try to replicate it to get a serviceable functionality.
Probably a bit heavy to do automatically for all files? But it would be cached I suppose. Other option is to have some button in the UI to do it on demand in browser and then do a diff between the resulting files.
I've long considered that using the page itself for the redirect is improper and I previously thought that doing it as a middleware (#466). I never did that, and with the successful migration to App router (#703), two things becomes clear.
The problem is that when using
redirect()
fromnext/navigation
, from a server component, the redirection will actually occur programmatically and not using30X
code (As specified in the type doc). This makes sense since server components are streamed to the client and once we get to theredirect()
call, the client has already been sent200
(see).
Middlewares doesn't seem to be the appropiate way to do this with App router, but instead Route Handlers seems to be the appropiate solution.
If we could implement a Route Handler that looks up the canonical URL and redirects, we could probably get snappier redirects, as well as correct 30X codes to help Google indexing.
Right now it just shows the default values and makes no appearance that the API could not be reached in any way.
Not sure if this would be that doable without any database at all? Possible that hashing the files and then the caching is enough? Will not be a permanent link however...
Trying to view a diff to a tag or semver should be redirected to a static url that can be cached and not have to be regenerated.
https://npm-diff.app/@types/[email protected]...@types/node
https://npm-diff.app/@types/[email protected]
https://npm-diff.app/@types/[email protected]...^2
https://npm-diff.app/@types/[email protected]...~2.3
Should all redirect (temporary redirect code) to https://npm-diff.app/[email protected]@2.3.0, which we know should never change and can be safely cached for very long time.
This is replicating behaviour of unpkg https://unpkg.com/tslib@~2.3/tslib.js, and bundlephobia https://bundlephobia.com/package/tslib@^2
We could, preferebly, use some code to verify that the inputs are any of the allowed formats.
On the diff page.
Would maybe be helpful in autocomplete too?
Trying to just link to a diff should use sensible defaults.
Currently it goes to /<package-name>@1.2.3...<package-name>@1.2.3
which has no diff since they are the same.
We should redirect to a comparison between latest-1 and latest
Related: #702
I'd like to try to stay in line with GitHub, since that is a very established UI that people use every day
Clicking on it uses normal #
linking main~20...main#diff-cdb3cf5ab6d69ea205f3f70440f7dfa8d3ca8004a4df799318fdaa6a87be7bcf
Should handle if bundlephobia and packagephobia takes too long
If you go to https://npm-diff.app/[email protected]@3.2.4 you currently get
which is not helpful. We should be able to show a better "there is no differance" page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.