Giter Club home page Giter Club logo

Comments (7)

anton-isaykin avatar anton-isaykin commented on May 15, 2024 6

Hi team,

Unfortunately, this issue is the dealbreaker with Pipedream for us also. We can not rely on workflows that can stop working any day.

from pipedream.

dparnold avatar dparnold commented on May 15, 2024 4

This is really an important issue. If I we have many workflows running for our clients, we cannot afford having npm package updates breaking our code.
The change to a newer version has to be tested properly.
At the moment it comes as a possibly negative surprise.

I hope you can soon add this basic functionality of node via something like a package.json.

from pipedream.

dylburger avatar dylburger commented on May 15, 2024 3

@huzaifahj not yet, but this is still on our radar. I know it's not ideal by any means, but I've published specific versions of npm packages to my own npm account / namespace using this technique.

Essentially, I'll clone the relevant repo for the project, check out the specific tag / commit I want to use in my workflow, then publish that code to my own namespace, allowing me to require the specific version of that package in my workflow:

const package = require("@your-username/your-package");

We'll provide more updates on this ticket on a native solution, we as we develop it!

from pipedream.

dylburger avatar dylburger commented on May 15, 2024

I've encountered specific cases with Google npm packages that had instructed me to require a specific version of the package. Using the most recent version (no version specified) fails to work.

from pipedream.

togakangaroo avatar togakangaroo commented on May 15, 2024

To fill in a use case, I’m drawing a utility function deep out of exceljs but am not sure at all that it’s part of their official “public interface” so I'd like to be able to pin the version

from pipedream.

huzaifahj avatar huzaifahj commented on May 15, 2024

Any update on this?

from pipedream.

dylburger avatar dylburger commented on May 15, 2024

We just shipped a way to pin package versions in Node.js code steps! See https://pipedream.com/docs/code/nodejs/#pinning-package-versions for more details (reproducing below), and let us know if you have any questions / feedback on the implementation.

We're still considering exposing the existing version of dependencies in a more clear way, so let us know if there are other related features you'd like to see.


Each time you deploy a workflow with Node.js code, Pipedream downloads the npm packages you import in your step. By default, Pipedream deploys the latest version of the npm package each time you deploy a change.

There are many cases where you may want to specify the version of the packages you're using. If you'd like to use a specific version of a package in a workflow, you can add that version in the import string, for example:

import axios from "[email protected]"

You can also pass the version specifiers used by npm to support semantic version upgrades. For example, to allow for future patch version upgrades:

import axios from "axios@~0.20.0"

To allow for patch and minor version upgrades, use:

import got from "got@^11.0.0"

Note that the behavior of the caret (^) operator is different for 0.x versions, for which it will only match patch versions, and not minor versions.

You can also specify different versions of the same package in different steps. Each step will used the associated version. Note that this also increases the size of your deployment, which can affect cold start times.

from pipedream.

Related Issues (20)

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.