RequireJS

Endless Lifecycle Support (ELS) for RequireJS from TuxCare provides security fixes for RequireJS versions that have reached their end of life. With ELS, you can continue running RequireJS applications without vulnerability concerns, even after official support has ended.

Supported Versions

  • RequireJS 2.1.22, 2.3.6

Installation

Docker compatible

Have a SecureChain token?

Follow the SecureChain installation instructions instead — the steps below are for username & password access.

Prerequisites

  • npm package manager installed
  • TuxCare registry token — contact [email protected]
  • To browse available artifacts, visit TuxCare Nexus and click Sign in in the top right corner. You may need to refresh the page after logging in.
  1. Create or update the .npmrc file

    Navigate to the root directory of your RequireJS project and create a .npmrc file or update it if it already exists.

    Example:

    my-requirejs-project/
    ├── node_modules/
    ├── package.json
    ├── .npmrc         ⚠️ ← Create it here
    └── package-lock.json
    
  2. Configure the npm registry

    Use an editor of your choice (e.g., VS Code) to add the following registry address lines to the .npmrc file:

    registry=https://registry.npmjs.org/
    @els-js:registry=https://nexus.repo.tuxcare.com/repository/els_js/
    //nexus.repo.tuxcare.com/repository/els_js/:_auth=${TOKEN}
    

    Replace ${TOKEN} with the token you received from [email protected].

  3. Update dependencies

    Update your package.json file to replace RequireJS dependencies with TuxCare-maintained packages. You can do this in two ways:

    • Option 1: Manual update

      Manually update your package.json file by replacing your RequireJS dependencies with the TuxCare packages. This method gives you full control over which packages to update.

      "dependencies": {
        "requirejs": "npm:@els-js/requirejs@>=2.1.22-tuxcare.1"
      },
      "overrides": {
        "[email protected]": "npm:@els-js/requirejs@>=2.1.22-tuxcare.1"
      }
      
    • Option 2: TuxCare Patcher (Automated)

      Install the Patcher globally and run it. The TuxCare Patcher automatically detects the RequireJS version in your package.json and updates your dependencies and overrides to use the corresponding TuxCare @els-js/* packages.

      npm install -g @els-js/tuxcare-patcher --userconfig ./.npmrc
      tuxcare-patch-js
      

      The patcher will update your package.json, for example, from:

      "dependencies": {
        "requirejs": "^2.3.6"
      }
      

      to:

      "dependencies": {
        "requirejs": "npm:@els-js/requirejs@>=2.3.6-tuxcare.1"
      },
      "overrides": {
        "[email protected]": "npm:@els-js/requirejs@>=2.3.6-tuxcare.1"
      }
      
  4. Refresh the project dependencies

    Remove node_modules, package-lock.json, and clear the npm cache:

    rm -rf node_modules package-lock.json && npm cache clean --force
    

    Install dependencies:

    npm install
    

    The token for the TuxCare repository is automatically picked up from your .npmrc file.

  5. Verify the setup

    Use npm to list the project's dependencies and confirm that npm resolves TuxCare packages correctly:

    npm list
    

    After reviewing the dependencies, run your application to ensure everything works correctly. The npm tool identifies and resolves dependencies from the TuxCare ELS for RequireJS repository.

What's Next?

  • CVE Tracker — Track vulnerability fixes and updates
  • Available fixes — Patched versions and changelogs
  • VEX feed — Vulnerability Exploitability eXchange feed
  • SBOM — Software Bill of Materials (security.tuxcare.com)
  • Package updates — Update an installed package to a newer TuxCare release