|
| 1 | +# Lodash |
| 2 | + |
| 3 | +Endless Lifecycle Support (ELS) for Lodash from TuxCare provides security fixes for Lodash versions that have reached their end of life. This allows you to continue running Lodash applications without vulnerability concerns, even after official support has ended. |
| 4 | + |
| 5 | +:::warning |
| 6 | +ELS for Lodash is currently in active development. If you are interested in updates, adoption, or have specific requirements or feature requests, please contact [[email protected]](mailto:[email protected]) |
| 7 | +::: |
| 8 | + |
| 9 | +## Supported Lodash Versions |
| 10 | + |
| 11 | +* Lodash 4.5.0, 4.17.x |
| 12 | + |
| 13 | +## Connection to ELS for Lodash Library |
| 14 | + |
| 15 | +This guide outlines the steps needed to integrate the TuxCare ELS for the Lodash library. |
| 16 | + |
| 17 | +## Step 1: Get user credentials |
| 18 | + |
| 19 | +You need a token in order to use TuxCare ELS Lodash library. Anonymous access is disabled. To receive the token, please contact [[email protected]](mailto:[email protected]). |
| 20 | + |
| 21 | +## Step 2: Set Up ELS for Lodash |
| 22 | + |
| 23 | +TuxCare provides ELS for Lodash as an NPM package, hosted on a secure internal registry. Follow the steps below to add it to your project and get started. |
| 24 | + |
| 25 | +1. Navigate to the root directory of your Lodash project. |
| 26 | +2. Create a `.npmrc` file or update it if it already exists. |
| 27 | + |
| 28 | + **Example:** |
| 29 | + |
| 30 | + ```text |
| 31 | + my-lodash-project/ |
| 32 | + ├── node_modules/ |
| 33 | + ├── package.json |
| 34 | + ├── .npmrc ⚠️ ← Create it here |
| 35 | + └── package-lock.json |
| 36 | + ``` |
| 37 | + |
| 38 | +3. Use an editor of your choice (e.g., VS Code) to add the following registry address line: |
| 39 | + |
| 40 | + <CodeWithCopy> |
| 41 | + |
| 42 | + ```text |
| 43 | + registry=https://registry.npmjs.org/ |
| 44 | + @els-js:registry=https://nexus.repo.tuxcare.com/repository/els_js/ |
| 45 | + //nexus.repo.tuxcare.com/repository/els_js/:_auth=${TOKEN} |
| 46 | + ``` |
| 47 | + |
| 48 | + </CodeWithCopy> |
| 49 | + |
| 50 | + :::warning |
| 51 | + Replace ${TOKEN} with the token you received from [[email protected]](mailto:[email protected]). |
| 52 | + ::: |
| 53 | + |
| 54 | +4. Update your `package.json` file to replace your Lodash dependencies with the TuxCare packages: |
| 55 | + |
| 56 | + <TableTabs label="Choose Lodash version: " > |
| 57 | + |
| 58 | + <template #Lodash_4.5.0> |
| 59 | + |
| 60 | + <CodeWithCopy> |
| 61 | + |
| 62 | + ```text |
| 63 | + "dependencies": { |
| 64 | + "lodash": "npm:@els-js/[email protected]" |
| 65 | + }, |
| 66 | + "overrides": { |
| 67 | + "lodash": "npm:@els-js/[email protected]" |
| 68 | + } |
| 69 | + ``` |
| 70 | +
|
| 71 | + </CodeWithCopy> |
| 72 | +
|
| 73 | + </template> |
| 74 | +
|
| 75 | + <template #Lodash_4.17.15> |
| 76 | +
|
| 77 | + <CodeWithCopy> |
| 78 | +
|
| 79 | + ```text |
| 80 | + "dependencies": { |
| 81 | + "lodash": "npm:@els-js/[email protected]" |
| 82 | + }, |
| 83 | + "overrides": { |
| 84 | + "lodash": "npm:@els-js/[email protected]" |
| 85 | + } |
| 86 | + ``` |
| 87 | +
|
| 88 | + </CodeWithCopy> |
| 89 | +
|
| 90 | + </template> |
| 91 | +
|
| 92 | + <template #Lodash_4.17.19> |
| 93 | +
|
| 94 | + <CodeWithCopy> |
| 95 | +
|
| 96 | + ```text |
| 97 | + "dependencies": { |
| 98 | + "lodash": "npm:@els-js/[email protected]" |
| 99 | + }, |
| 100 | + "overrides": { |
| 101 | + "lodash": "npm:@els-js/[email protected]" |
| 102 | + } |
| 103 | + ``` |
| 104 | +
|
| 105 | + </CodeWithCopy> |
| 106 | +
|
| 107 | + </template> |
| 108 | +
|
| 109 | + </TableTabs> |
| 110 | +
|
| 111 | +5. Run the following command to install the ELS version of the Lodash library (token for the TuxCare repository will be automatically picked up from your `.npmrc` file): |
| 112 | +
|
| 113 | + <CodeWithCopy> |
| 114 | +
|
| 115 | + ```text |
| 116 | + npm install |
| 117 | + ``` |
| 118 | + |
| 119 | + </CodeWithCopy> |
| 120 | + |
| 121 | + You will see an output like: |
| 122 | + |
| 123 | + ```text |
| 124 | + added 1 package, and audited 2 packages in 787ms |
| 125 | +
|
| 126 | + found 0 vulnerabilities |
| 127 | + ``` |
| 128 | + |
| 129 | +6. You've successfully installed the Tuxcare ELS version of the Lodash library into your project. |
| 130 | + |
0 commit comments