Coder Social home page Coder Social logo

obusk / npm-diff.app Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 6.08 MB

๐Ÿ“ฆ๐Ÿ”ƒ Inspect changes between npm packages in a webapp

Home Page: https://npm-diff.app

License: ISC License

TypeScript 97.62% JavaScript 0.91% CSS 1.47%
diff npm package vercel

npm-diff.app's Introduction

npm-diff.app

Powered by Vercel Node.js CI code style: prettier Dependabot: enabled

๐Ÿ“ฆ๐Ÿ”ƒ Inspect changes between npm packages in a webapp

Install

npm install

Development

npm run dev

Deployment

Deployed automagically using Vercel

https://npm-diff.app/

License

ISC ยฉ Oscar Busk

npm-diff.app's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar obusk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

npm-diff.app's Issues

Add option to unminify minified files

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.

Use route handler for redirects

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.

  • Using the page for redirect is no longer good.

    The problem is that when using redirect() from next/navigation, from a server component, the redirection will actually occur programmatically and not using 30X code (As specified in the type doc). This makes sense since server components are streamed to the client and once we get to the redirect() call, the client has already been sent 200 (see).

  • Middlewares is the wrong solution

    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.

[Feature] Should redirect to static URLs

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.