Git Product home page Git Product logo

autoupdate's Introduction

< cdnjs >

The #1 free and open source CDN built to make life easier for developers.


Robots only MIT License Discussions

GitHub Sponsors Open Collective Patreon


Table of Contents

Introduction

This is the robot-only repository for cdnjs, where all the library assets that are hosted on cdnjs are stored. For the JSON files that control the libraries we host, please see the "human" cdnjs/packages repository.

Other Repositories

For the JSON files controlling the libraries we host on cdnjs, please take a look at the "human" cdnjs/packages repository.

For our website, please refer to the cdnjs/static-website repository.

For the cdnjs API, please refer to the cdnjs/api-server repository.

For the full cdnjs branding and brand-related assets/guidelines, please see the cdnjs/brand repository.

For our monthly CDN stats and usage reports, check out the cdnjs/cf-stats repository.

You can find all our repositories at github.com/cdnjs!

Contributing

As this repository is now considered robot-only, pull requests are no longer accepted for this repository. If you are looking to contribute to cdnjs, please take a look at the cdnjs/packages repository or any of our other open-source repositories on GitHub!

Sponsors

cdnjs wouldn't be the success that it is today without our sponsors' kind support. These companies currently support cdnjs:

If you are interested in becoming a sponsor, please feel free to contact us!

License

Each library is released under its own license. This cdnjs repository is published under MIT license.

autoupdate's People

Contributors

coliff avatar doppins-bot avatar ionicabizau avatar netputer avatar peterdavehello avatar robocdnjs avatar ryankirkman avatar the-cdnjs-curator avatar thomasdavis avatar xtuc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoupdate's Issues

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash:3.10.1

Vulnerabilities

DepShield reports that this application's usage of lodash:3.10.1 results in the following vulnerability(s):


Occurrences

lodash:3.10.1 is a transitive dependency introduced by the following direct dependency(s):

jscs:3.0.7
        └─ jscs-jsdoc:2.0.0
              └─ jsdoctypeparser:1.2.0
                    └─ lodash:3.10.1
        └─ lodash:3.10.1
        └─ xmlbuilder:3.1.0
              └─ lodash:3.10.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Not really work in some projects ...

the auto-update config in bootstrap-datepicker:

  "autoupdate": {
    "source": "git",
    "target": "git://github.com/eternicode/bootstrap-datepicker.git",
    "basePath": "",
    "files": [
      "css/*",
      "js/*/*",
      "js/*"
    ]
  }

origin files under bootstrap-datepicker:
1.0.0/ 1.0.2/ 1.1.3/ 1.2.0/ 1.3.0/ package.json

git auto-update log:

Starting Auto Update
-----------------------


bootstrap-datepicker
Clone git://github.com/eternicode/bootstrap-datepicker.git
Need 1.0.2-rc.2,1.1.0,1.1.1,1.1.2,1.2.0-rc.1,1.3.0-rc.1,1.3.0-rc.2,1.3.0-rc.3,1.3.0-rc.4,1.3.0-rc.5,1.3.0-rc.6,1.3.1,v1.0.1
All files for this version 41
41 true
Updated package.json to version 1.0.2-rc.1

after update:
1.0.0/ 1.0.2/ 1.0.2-rc.1/ 1.1.3/ 1.2.0/ 1.3.0/ package.json

It only updated one version ...

Re-run auto-update for more than 10 times, and get the same result (1 version/time).

[DepShield] (CVSS 7.5) Vulnerability due to usage of tar:2.2.1

Vulnerabilities

DepShield reports that this application's usage of tar:2.2.1 results in the following vulnerability(s):


Occurrences

tar:2.2.1 is a transitive dependency introduced by the following direct dependency(s):

tarball-extract:0.0.6
        └─ tar:2.2.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[bug]path issue

Since the first release, the path should use multi-level */*/* and set a new pattern for each level as below, ** was not accepted, really make the config ugly and the maintenance work complex.

The auto-update config of semantic-ui :

  "autoupdate": {
    "source": "git",
    "target": "git://github.com/Semantic-Org/Semantic-UI",
    "basePath": "dist",
    "files": [
      "*/*/*/*/*",
      "*/*/*/*",
      "*/*/*",
      "*/*",
      "*"
    ]

Should be

  "autoupdate": {
    "source": "git",
    "target": "git://github.com/Semantic-Org/Semantic-UI",
    "basePath": "dist",
    "files": [
      "**/*",
    ]

Handler on the versions didn't fit the current filemap

Bountysource

Currently, I make a fake directory to prevent the updater keep want to add that version, see:

A better method should be put them in a list, and ignore the lib/ver from the list, and also we can manually checkout the list to see how can we add the versions can not be added by updater, maybe just the filemap changed, sometimes we may need to use an old filemap to add the old versions!

[DepShield] (CVSS 5.2) Vulnerability due to usage of stringstream:0.0.5

Vulnerabilities

DepShield reports that this application's usage of stringstream:0.0.5 results in the following vulnerability(s):


Occurrences

stringstream:0.0.5 is a transitive dependency introduced by the following direct dependency(s):

nodegit:0.20.3
        └─ node-gyp:3.6.2
              └─ request:2.85.0
                    └─ stringstream:0.0.5
        └─ node-pre-gyp:0.6.39
              └─ request:2.81.0
                    └─ stringstream:0.0.5

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Do not use unstable version to replace stable version.

Currently, all the unstable version will be ignored, but we have something like ng-cordova, which has no stable version in cdnjs, or jquery, some super famous libs, we will use non-production version in its package.json, for these cases, even though auto-updater grabbed a unstable version, it should still update the version in package.json.

Run a build command after cloning repository

I noticed that [email protected] is not yet available on cdnjs. If I understand correctly, it is not using autoupdater (https://github.com/cdnjs/cdnjs/blob/master/ajax/libs/angular.js/package.json) for now.

Unfortunately, the dist files are not directly available in the repo (https://github.com/angular/angular.js) and AFAIK autoupdate does only git clone and fs copy the files.

Do you think there is room to run a configurable build command in between 🙏 We could use https://www.npmjs.com/package/npm-run for example to run grunt package in the case of angular.js.

I can work on a PR it makes sense 👍

git auto-update: drop the repo cloning mechanism

Bountysource

Currently, we clone every repo and check the tags(versions), it just uses too much resource and not efficient. Should add a local cache/repo mechanism to prevent that, and maybe should also add a new method call GitHub rather than git, to use GitHub api for the tags/versions, and just download the tarball of the needed versions.

[DepShield] (CVSS 8.8) Vulnerability due to usage of js-yaml:3.4.6

Vulnerabilities

DepShield reports that this application's usage of js-yaml:3.4.6 results in the following vulnerability(s):


Occurrences

js-yaml:3.4.6 is a transitive dependency introduced by the following direct dependency(s):

jscs:3.0.7
        └─ js-yaml:3.4.6

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 9.8) Vulnerability due to usage of deep-extend:0.4.2

Vulnerabilities

DepShield reports that this application's usage of deep-extend:0.4.2 results in the following vulnerability(s):


Occurrences

deep-extend:0.4.2 is a transitive dependency introduced by the following direct dependency(s):

echint:4.0.1
        └─ lintspaces:0.5.1
              └─ rc:1.1.6
                    └─ deep-extend:0.4.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Integrate npm auto-update

Bountysource

Integrate npm auto-update in, and drop the old one in cdnjs/cdnjs:
https://github.com/cdnjs/cdnjs/blob/master/auto-update.js

So the old config:

  "npmName": "jquery",
  "npmFileMap": [
    {
      "basePath": "dist",
      "files": [
        "**/*"
      ]
    }
  ],

should be :

  "autoupdate": {
    "source": "npm",
    "target": "jquery",
    "fileMap": [
      {
        "basePath": "dist",
        "files": [
          "**/*"
        ]
      }
    ]
  }

Note that the package.jsons, corresponding document and test should also be updated.

[DepShield] (CVSS 9.8) Vulnerability due to usage of cryptiles:3.1.2

Vulnerabilities

DepShield reports that this application's usage of cryptiles:3.1.2 results in the following vulnerability(s):


Occurrences

cryptiles:3.1.2 is a transitive dependency introduced by the following direct dependency(s):

nodegit:0.20.3
        └─ node-gyp:3.6.2
              └─ request:2.85.0
                    └─ hawk:6.0.2
                          └─ cryptiles:3.1.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

GitHub auto-updater

Bountysource

The current general purpose git auto-updater can fetch every file inside tagged commit of any public git repository but it can't handle the manually upload assets on GitHub release page, so let's add a GitHub auto-updater for those libraries publish assets on the release page on GitHub, we can use GitHub api for the tags/versions check, and just download the files of the needed versions.

Do not use a smaller version number to replace the current larger one

  1. The version field in package.json should be the largest stable version number, sometimes, the libs may have multiple release lines, like jquery, have both v1.x and v2.x versions, and I think we should not use a smaller number to replace the larger one even the smaller one was released much recently, or the users may misunderstand that we have the versions with larger versions.
  2. Once a lib been added, we usually add the newest version only, and the updater will grab the old versions, in this situation, of course we should not use the old version number to replace the new one.

Coding style

Bountysource
Coding style needs to be fixed and tested on CI 😄

Symbolic-linked lib caused problem

In #5287, we use symbolic link to handle the duplicated lib to be the same, but in auto-update process, there will be conflicts because more then one lib use the same repo, the workaround method will be add a unix timestamp + random number/string in the clone path to prevent conflicts repo name, the solution to handle this issue may be to ignore scanning symbolic-linked folder.

Put temp files on ramdisk

So the process will be fast, if on Linux, can easily test if /run/shm exist and enough, maybe 200MB as max, I can check the current disk space that current libs with git auto-update using.

[DepShield] (CVSS 6.5) Vulnerability due to usage of hoek:2.16.3

Vulnerabilities

DepShield reports that this application's usage of hoek:2.16.3 results in the following vulnerability(s):


Occurrences

hoek:2.16.3 is a transitive dependency introduced by the following direct dependency(s):

nodegit:0.20.3
        └─ node-pre-gyp:0.6.39
              └─ hawk:3.1.3
                    └─ boom:2.10.1
                          └─ hoek:2.16.3
                    └─ hoek:2.16.3
                    └─ sntp:1.0.9
                          └─ hoek:2.16.3

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 9.8) Vulnerability due to usage of cryptiles:2.0.5

Vulnerabilities

DepShield reports that this application's usage of cryptiles:2.0.5 results in the following vulnerability(s):


Occurrences

cryptiles:2.0.5 is a transitive dependency introduced by the following direct dependency(s):

nodegit:0.20.3
        └─ node-pre-gyp:0.6.39
              └─ hawk:3.1.3
                    └─ cryptiles:2.0.5

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Will miss files in certain project ...

Will miss semantic.css semantic.js semantic.min.css semantic.min.js in semantic-ui in v1.3.0~1.3.2 ...

The auto-update config of semantic-ui :

  "autoupdate": {
    "source": "git",
    "target": "git://github.com/Semantic-Org/Semantic-UI",
    "basePath": "dist",
    "files": [
      "*/*/*/*/*",
      "*/*/*/*",
      "*/*/*",
      "*/*",
      "*"
    ]

Local cache/repo reuse for git auto-update

It takes long time to clone the whole repo again and again, also waste too much network bandwidth.
Should support local cache mechanism. Or, do fetch in the already cloned repo instead of clone a new one.

Support multiple filemap

Bountysource

Currently, the autoupdate field in package.json only support single base path with single file list like this:

  "autoupdate": {
     "source": "git",
     "target": "git://github.com/cdnjs/cdnjs.git",
     "basePath": "",
     "files": [
       "*.json"
     ]
  }

We did support multi-filemap in npm auto-update like this (take waterfall.js as example):

  "npmName": "waterfall.js",
  "npmFileMap": [
    {
      "basePath": "",
      "files": [
        "waterfall*"
      ]
    },
    {
      "basePath": "src",
      "files": [
        "waterfall*"
      ]
    }
  ]

We should also support the same feature in autoupdate field though it is used for git auto-update only, once multi-filemap support added, we can migrate npmName and npmFileMap to autoupdate format.

The multi-filemap should looks like this in package.json once it's implemented:

  "autoupdate": {
    "source": "git",
    "target": "git://github.com/cdnjs/cdnjs.git",
    "fileMap": [
      {
        "basePath": "",
        "files": [
          "*.json"
        ]
      },
      {
         "basePath": "",
         "files": [
           "*.js"
        ]
      }
    ]
  }

PS: the corresponding issue in main repo is cdnjs/cdnjs#9155

The test cases for package.json and example should also be updated at the same time.

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.