{"ecosystem":"npm","package":"tslib","version":null,"bugs":[{"id":197,"ecosystem":"npm","package_name":"tslib","affected_version":null,"fixed_version":null,"bug_id":"github:47","title":"Projects that depend on tslib inherit the Microsoft copyright","description":"Hello,\r\n\r\nIf I build an app that combines tslib with other code -- e.g. use TypeScript in an app -- as far as I understand the license header on https://github.com/Microsoft/tslib/blob/master/tslib.js, it requires me to include that copyright+license in the resulting product.\r\n\r\nIs that intentional?  I think when I use the TypeScript compiler without the `--importHelpers` flag, I do not have this additional requirement.","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/microsoft/tslib/issues/47","labels":["bug"],"created_at":"2026-04-19T04:30:36.177988+00:00","updated_at":"2026-04-19T04:30:36.177988+00:00"},{"id":196,"ecosystem":"npm","package_name":"tslib","affected_version":"2.8.4","fixed_version":null,"bug_id":"github:59","title":"__values causes an infinite loop on Sets when Symbol.iterator isn't defined","description":"Environment: https://github.com/convoyinc/apollo-cache-hermes/tree/8088c19\r\n\r\nSpecifics:\r\n* [`importHelpers` is `true`](https://github.com/convoyinc/apollo-cache-hermes/blob/8088c19/tsconfig.json#L5)\r\n* [`target` is `es5`](https://github.com/convoyinc/apollo-cache-hermes/blob/8088c19/tsconfig.json#L24)\r\n* [`downlevelIteration` is `true`](https://github.com/convoyinc/apollo-cache-hermes/blob/8088c19/tsconfig.json#L4)\r\n* [TypeScript version: 2.8.4 (~2.8.0)](https://github.com/convoyinc/apollo-cache-hermes/blob/8088c19/yarn.lock#L3926)\r\n* [tslib version: 1.9.3 (^1.9.0)](https://github.com/convoyinc/apollo-cache-hermes/blob/8088c19/package.json#L73)\r\n\r\nHelpful reproduction repo built by @alexanderson1993  over in https://github.com/convoyinc/apollo-cache-hermes/issues/382\r\n\r\nWhen run on react-native android (and presumably older versions of Chrome), the following code infinite loops on `tslib.__values` (it emits `undefined` forever)\r\n\r\n[TypeScript source](https://github.com/convoyinc/apollo-cache-hermes/blob/master/src/context/QueryInfo.ts#L85):\r\n```ts\r\nexport class QueryInfo {\r\n  // …\r\n  public readonly variables: Set<string>;\r\n  // …\r\n  private _assertAllVariablesDeclared(messages: string[], declaredVariables: Set<string>) {\r\n    for (const name of this.variables) {\r\n      if (!declaredVariables.has(name)) {\r\n        messages.push(`Variable $${name} is used, but not declared`);\r\n      }\r\n    }\r\n  }\r\n  // …\r\n}\r\n```\r\n\r\nEmitted source:\r\n```js\r\n// …\r\nQueryInfo.prototype._assertAllVariablesDeclared = function (messages, declaredVariables) {\r\n    try {\r\n        for (var _a = tslib_1.__values(this.variables), _b = _a.next(); !_b.done; _b = _a.next()) {\r\n            var name_1 = _b.value;\r\n            if (!declaredVariables.has(name_1)) {\r\n                messages.push(\"Variable $\" + name_1 + \" is used, but not declared\");\r\n            }\r\n        }\r\n    }\r\n    catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n    finally {\r\n        try {\r\n            if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\r\n        }\r\n        finally { if (e_1) throw e_1.error; }\r\n    }\r\n    var e_1, _c;\r\n};\r\n\r\n// …\r\n```\r\n\r\nObserved: `for (const name of this.variables) {` loops forever, assigning `undefined` to `name` on each iteration","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/microsoft/tslib/issues/59","labels":["bug"],"created_at":"2026-04-19T04:30:36.177431+00:00","updated_at":"2026-04-19T04:30:36.177431+00:00"},{"id":195,"ecosystem":"npm","package_name":"tslib","affected_version":null,"fixed_version":null,"bug_id":"github:60","title":"Remove .gitattributes from published package","description":"The published package contains your `.gitattributes` file.","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/microsoft/tslib/issues/60","labels":["bug"],"created_at":"2026-04-19T04:30:36.176854+00:00","updated_at":"2026-04-19T04:30:36.176854+00:00"},{"id":194,"ecosystem":"npm","package_name":"tslib","affected_version":"2.0.0","fixed_version":null,"bug_id":"github:120","title":"TSLib 2.0.0 causing bundling issues","description":"Hi there,\r\n\r\nTSLib 2.0.0 seems to be causing bundling issues due to the use of `exports` as a parameter name in the `__exportStar` function.\r\n\r\nStarting with v2 the export star function calls another function called `__createBinding`. When this is bundled a simple bundler will add `exports.` in front of the create binding call (which is a common technique in bundlers) but as there is a parameter called `exports` the call is referencing the incorrect variable.\r\n\r\nEven TypeScript itself will generate similar code as shown here\r\nhttps://www.typescriptlang.org/play/?experimentalDecorators=true&emitDecoratorMetadata=true&module=1&ssl=12&ssc=1&pln=9&pc=1#code/KYDwDg9gTgLgBANwIZTgfTQYysJNgBCAlgHYAmpA5nALxwDyARgFbCYwB02u+cA-HAAUAMwCuJdkQglBEADRwAtgoDWqgEwBKOAG8AUHENwiwoSvW0adcWWDDSwMtvO04KgNwGjTVuw637EmAABSgIMGBYAE9ZDQUdOGASUUVIpEYAG2AALjgYKFFgBUpgGFyxCRgpGW0EnBhRKBIlAG0VAF13OABfHs1Pbu1ckXFJaVilVQ1ar0MTMwsra3I7Byc3RbdPIzgINvV210U2zq9Bzz1QSFg4CrHmjCvoGABlGBRBZUTwZ4BnGZ2wmgQmQqDAxmaim080E4IAhFY4AAiAJIUQZGBIuAAMmxcDhT1gvw4AAskL96AB3EihcKRGAxMCabQYbh4QikCgkSiCQkwX4KL5MgZAA\r\n\r\nI don't see a need for the parameter to be called exports so I think it would be acceptable to simply to change the parameter name to avoid this issue. ","severity":"medium","status":"fixed","source":"github_issues","source_url":"https://github.com/microsoft/tslib/issues/120","labels":["bug"],"created_at":"2026-04-19T04:30:36.175852+00:00","updated_at":"2026-04-19T04:30:36.175852+00:00"}],"total":4,"_cache":"miss"}