Coder Social home page Coder Social logo

s0 / libyear-node-action Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 5.0 524 KB

Track NPM dependency freshness, and calculate how pull requests will impact this

License: GNU General Public License v3.0

JavaScript 2.75% TypeScript 97.25%
libyear dependencies github-actions github-action nodejs actions

libyear-node-action's Issues

TypeError: report.map is not a function

We recently migrated a project package manager from npm to yarn. We also update our action workflow as follow :

jobs:
  libyear:
    runs-on: ubuntu-latest
    env:
      YARN_NODE_LINKER: node-modules
    steps:
    - uses: actions/checkout@master
    - name: Use Node.js
      uses: actions/setup-node@v3
      env:
        NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
      with:
        node-version: 16.14.0
        cache: 'yarn'
    - run: yarn install
      env:
        NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    # Calculate libyear
    - id: libyear
      uses: s0/[email protected]

The following error occurs on the libyear step:

##[debug]Evaluating condition for step: 'Run s0/[email protected]'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run s0/[email protected]
##[debug]Loading inputs
##[debug]Loading env
Run s0/[email protected]
Result: 
TypeError: Cannot read property 'toFixed' of null
    at /home/runner/work/_actions/s0/libyear-node-action/v0.1.2/dist/main/index.js:3937:26
    at Array.map (<anonymous>)
    at Object.getResultsTable (/home/runner/work/_actions/s0/libyear-node-action/v0.1.2/dist/main/index.js:3933:[19](https://github.com/busbud/public-website/actions/runs/3126873968/jobs/5072933976#step:5:19))
    at /home/runner/work/_actions/s0/libyear-node-action/v0.1.2/dist/main/index.js:4062:41
    at step (/home/runner/work/_actions/s0/libyear-node-action/v0.1.2/dist/main/index.js:4029:23)
    at Object.next (/home/runner/work/_actions/s0/libyear-node-action/v0.1.2/dist/main/index.js:4010:53)
    at fulfilled (/home/runner/work/_actions/s0/libyear-node-action/v0.1.2/dist/main/index.js:4001:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Switch to programmatic use once that becomes available in libyear

This is currently listed as a TODO for libyear.

Right now we're running a node subprocess and reading from the stdout. This isn't ideal, in particular we're unable to get both json output, and validation information, so we're unable to take advantage of libyear configuration to specify under what conditions the action should fail etc...

Bug: Action errors when using default configuration

When integrating the github action as per documentation, using Node 14.x, we get an error as below:

TypeError: report.map is not a function
    at Object.getResultsTable (/home/runner/work/_actions/s0/libyear-node-action/v0.1.0/dist/main/index.js:3932:19)
    at /home/runner/work/_actions/s0/libyear-node-action/v0.1.0/dist/main/index.js:4060:41
    at step (/home/runner/work/_actions/s0/libyear-node-action/v0.1.0/dist/main/index.js:4028:23)
    at Object.next (/home/runner/work/_actions/s0/libyear-node-action/v0.1.0/dist/main/index.js:4009:53)
    at fulfilled (/home/runner/work/_actions/s0/libyear-node-action/v0.1.0/dist/main/index.js:4000:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Add PR functionality

Add functionality to compare libyear metrics between target and base of a pull request, and leave a comment on the PR with the difference.

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.