• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

what causes npm install different than git clone

Scheduled Pinned Locked Moved NodeBB Plugins
5 Posts 4 Posters 1.5k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chrismccoy
    wrote on last edited by
    #1

    when i do npm install of a plugin, its diferent code base than git clone of the repo, same version in package.json as the git repo.

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to chrismccoy on last edited by
    #2

    @chrismccoy which plugin are you trying to install?

    same version in package.json doesn't mean code will be the same... there might be more check-in's after it's published to npm and usually version on github in package.json is not changed until it's ready to be published to npm again.

    1 Reply Last reply
    1
  • jareyJ Offline
    jareyJ Offline
    jarey Translator
    wrote on last edited by
    #3

    The mantainer could have just published to npm and evolved the code in the repo without updating the version according to a new release. If he/she makes the change of version in package.json just before publishing to npm, you can have the fepo with and 'old' version and new code while evolving to the next 'npm release'.

    1 Reply Last reply
    0
  • frissdiegurkeF Offline
    frissdiegurkeF Offline
    frissdiegurke Plugin & Theme Dev
    wrote on last edited by
    #4

    In general git is a tool for versioning source code.
    npm instead is a package manager, so it's targeting the production code.

    Basically you have this workflow

    git v0.1.0 -----> compilation -----> npm v0.1.0
         |
         | code changes
         v
    git v0.1.1 -----> compilation -----> npm v0.1.1
    

    For any kind of software; You don't publish binaries/production code within git. Only if the source code equals the production code (thus there is no compilation step involved) you'll have the same within git and npm. But this in fact is the special case (which is quite common for purely javascript projects).
    It gets worse if people publish their binaries/production code alongside their source code within git. This has been quite popular for javascript projects (with minified production files) in the past because no package management was popular for javascript.

    As a rule of thumb: git (ore more general VCS) is for publishing source code; package manager are for publishing production files.

    1 Reply Last reply
    0
  • C Offline
    C Offline
    chrismccoy
    wrote on last edited by chrismccoy
    #5

    the expiring downloads plugin.

    on the npm install one, only a few js files are present.

    here is npm v0.2.2

    nodebb-plugin-expiring-uploads

    Redirects uploads to a non-public location and exposes them via an expiring token.. Latest version: 0.2.2, last published: 8 years ago. Start using nodebb-plugin-expiring-uploads in your project by running `npm i nodebb-plugin-expiring-uploads`. There are no other projects in the npm registry using nodebb-plugin-expiring-uploads.

    favicon

    npm (www.npmjs.com)

    github one

    GitHub - rbeer/nodebb-plugin-expiring-uploads: Plugin for NodeBB, hiding uploads behind an expiring hash

    Plugin for NodeBB, hiding uploads behind an expiring hash - GitHub - rbeer/nodebb-plugin-expiring-uploads: Plugin for NodeBB, hiding uploads behind an expiring hash

    favicon

    GitHub (github.com)

    looking to modify the default markup when the upload is complete.

    https://github.com/rbeer/nodebb-plugin-expiring-uploads/blob/master/public/scripts/controller.js#L16

    bascially this.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development