{"id":15093114,"url":"https://github.com/angular/angular-devkit-build-optimizer-builds","last_synced_at":"2025-10-06T11:31:11.175Z","repository":{"id":65977137,"uuid":"119606080","full_name":"angular/angular-devkit-build-optimizer-builds","owner":"angular","description":"Build artifacts for @angular-devkit/build-optimizer","archived":true,"fork":false,"pushed_at":"2022-11-17T23:18:10.000Z","size":4140,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-06T00:33:42.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angular.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-30T23:08:32.000Z","updated_at":"2024-03-20T16:37:09.000Z","dependencies_parsed_at":"2023-02-19T19:25:20.627Z","dependency_job_id":null,"html_url":"https://github.com/angular/angular-devkit-build-optimizer-builds","commit_stats":null,"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"purl":"pkg:github/angular/angular-devkit-build-optimizer-builds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular%2Fangular-devkit-build-optimizer-builds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular%2Fangular-devkit-build-optimizer-builds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular%2Fangular-devkit-build-optimizer-builds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular%2Fangular-devkit-build-optimizer-builds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angular","download_url":"https://codeload.github.com/angular/angular-devkit-build-optimizer-builds/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angular%2Fangular-devkit-build-optimizer-builds/sbom","scorecard":{"id":196324,"data":{"date":"2025-08-11","repo":{"name":"github.com/angular/angular-devkit-build-optimizer-builds","commit":"324701cb7282514ea7c3afe233e90590f79dd89e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: branch 'main' does not require approvers","Warn: codeowners review is not required on branch 'main'","Warn: no status checks found to merge onto branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/angular/.github/SECURITY.md:1","Info: Found linked content: github.com/angular/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/angular/.github/SECURITY.md:1","Info: Found text in security policy: github.com/angular/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-16T21:53:52.408Z","repository_id":65977137,"created_at":"2025-08-16T21:53:52.408Z","updated_at":"2025-08-16T21:53:52.408Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278601991,"owners_count":26013994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-25T11:03:41.342Z","updated_at":"2025-10-06T11:31:10.909Z","avatar_url":"https://github.com/angular.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Snapshot build of @angular-devkit/build-optimizer\n\nThis repository is a snapshot of a commit on the original repository. The original code used to\ngenerate this is located at http://github.com/angular/angular-cli.\n\nWe do not accept PRs or Issues opened on this repository. You should not use this over a tested and\nreleased version of this package.\n\nTo test this snapshot in your own project, use\n\n```bash\nnpm install git+https://github.com/angular/angular-devkit-build-optimizer-builds.git\n```\n\n----\n# Angular Build Optimizer\n\nAngular Build Optimizer contains Angular optimizations applicable to JavaScript code as a TypeScript transform pipeline.\n\nThis package is **deprecated** and should not be used. It has always been experimental (never hit\n`1.0.0`) and was an internal package for the Angular CLI. All the relevant functionality has been\nmoved into\n[`@angular-devkit/build-angular`](https://npmjs.com/package/@angular-devkit/build-angular).\n\n## Available optimizations\n\nTransformations applied depend on file content:\n\n- [Class fold](#class-fold), [Scrub file](#scrub-file) and [Prefix functions](#prefix-functions): applied to Angular apps and libraries.\n- [Import tslib](#import-tslib): applied when TypeScript helpers are found.\n\nSome of these optimizations add `/*@__PURE__*/` comments.\nThese are used by JS optimization tools to identify pure functions that can potentially be dropped.\n\n### Class fold\n\nStatic properties are folded into ES5 classes:\n\n```typescript\n// input\nvar Clazz = (function () {\n  function Clazz() {}\n  return Clazz;\n})();\nClazz.prop = 1;\n\n// output\nvar Clazz = (function () {\n  function Clazz() {}\n  Clazz.prop = 1;\n  return Clazz;\n})();\n```\n\n### Scrub file\n\nAngular decorators, property decorators and constructor parameters are removed, while leaving non-Angular ones intact.\n\n```typescript\n// input\nimport { Injectable, Input, Component } from '@angular/core';\nimport { NotInjectable, NotComponent, NotInput } from 'another-lib';\nvar Clazz = (function () {\n  function Clazz() {}\n  return Clazz;\n})();\nClazz.decorators = [{ type: Injectable }, { type: NotInjectable }];\nClazz.propDecorators = { 'ngIf': [{ type: Input }] };\nClazz.ctorParameters = function () {\n  return [{ type: Injector }];\n};\nvar ComponentClazz = (function () {\n  function ComponentClazz() {}\n  __decorate([Input(), __metadata('design:type', Object)], Clazz.prototype, 'selected', void 0);\n  __decorate(\n    [NotInput(), __metadata('design:type', Object)],\n    Clazz.prototype,\n    'notSelected',\n    void 0,\n  );\n  ComponentClazz = __decorate(\n    [\n      NotComponent(),\n      Component({\n        selector: 'app-root',\n        templateUrl: './app.component.html',\n        styleUrls: ['./app.component.css'],\n      }),\n    ],\n    ComponentClazz,\n  );\n  return ComponentClazz;\n})();\n\n// output\nimport { Injectable, Input, Component } from '@angular/core';\nimport { NotInjectable, NotComponent } from 'another-lib';\nvar Clazz = (function () {\n  function Clazz() {}\n  return Clazz;\n})();\nClazz.decorators = [{ type: NotInjectable }];\nvar ComponentClazz = (function () {\n  function ComponentClazz() {}\n  __decorate(\n    [NotInput(), __metadata('design:type', Object)],\n    Clazz.prototype,\n    'notSelected',\n    void 0,\n  );\n  ComponentClazz = __decorate([NotComponent()], ComponentClazz);\n  return ComponentClazz;\n})();\n```\n\n### Prefix functions\n\nAdds `/*@__PURE__*/` comments to top level downleveled class declarations and instantiation.\n\nWarning: this transform assumes the file is a pure module. It should not be used with unpure modules.\n\n```typescript\n// input\nvar Clazz = (function () {\n  function Clazz() {}\n  return Clazz;\n})();\nvar newClazz = new Clazz();\nvar newClazzTwo = Clazz();\n\n// output\nvar Clazz = /*@__PURE__*/ (function () {\n  function Clazz() {}\n  return Clazz;\n})();\nvar newClazz = /*@__PURE__*/ new Clazz();\nvar newClazzTwo = /*@__PURE__*/ Clazz();\n```\n\n### Prefix Classes\n\nAdds `/*@__PURE__*/` to downleveled TypeScript classes.\n\n```typescript\n// input\nvar ReplayEvent = (function () {\n  function ReplayEvent(time, value) {\n    this.time = time;\n    this.value = value;\n  }\n  return ReplayEvent;\n})();\n\n// output\nvar ReplayEvent = /*@__PURE__*/ (function () {\n  function ReplayEvent(time, value) {\n    this.time = time;\n    this.value = value;\n  }\n  return ReplayEvent;\n})();\n```\n\n### Import tslib\n\nTypeScript helpers (`__extends/__decorate/__metadata/__param`) are replaced with `tslib` imports whenever found.\n\n```typescript\n// input\nvar __extends =\n  (this \u0026\u0026 this.__extends) ||\n  function (d, b) {\n    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n    function __() {\n      this.constructor = d;\n    }\n    d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());\n  };\n\n// output\nimport { __extends } from 'tslib';\n```\n\n### Wrap enums\n\nWrap downleveled TypeScript enums in a function, and adds `/*@__PURE__*/` comment.\n\n```typescript\n// input\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n  ChangeDetectionStrategy[(ChangeDetectionStrategy['OnPush'] = 0)] = 'OnPush';\n  ChangeDetectionStrategy[(ChangeDetectionStrategy['Default'] = 1)] = 'Default';\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n\n// output\nvar ChangeDetectionStrategy = /*@__PURE__*/ (function () {\n  var ChangeDetectionStrategy = {};\n  ChangeDetectionStrategy[(ChangeDetectionStrategy['OnPush'] = 0)] = 'OnPush';\n  ChangeDetectionStrategy[(ChangeDetectionStrategy['Default'] = 1)] = 'Default';\n  return ChangeDetectionStrategy;\n})();\n```\n\n## Library Usage\n\n```typescript\nimport { buildOptimizer } from '@angular-devkit/build-optimizer';\n\nconst transpiledContent = buildOptimizer({ content: input }).content;\n```\n\nAvailable options:\n\n```typescript\nexport interface BuildOptimizerOptions {\n  content?: string;\n  inputFilePath?: string;\n  outputFilePath?: string;\n  emitSourceMap?: boolean;\n  strict?: boolean;\n  isSideEffectFree?: boolean;\n}\n```\n\n## Webpack loader usage:\n\n```typescript\nimport { BuildOptimizerWebpackPlugin } from '@angular-devkit/build-optimizer';\n\nmodule.exports = {\n  plugins: [\n    new BuildOptimizerWebpackPlugin(),\n  ]\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        loader: '@angular-devkit/build-optimizer/webpack-loader',\n        options: {\n          sourceMap: false\n        }\n      }\n    ]\n  }\n}\n```\n\n## CLI usage\n\n```bash\nbuild-optimizer input.js\nbuild-optimizer input.js output.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangular%2Fangular-devkit-build-optimizer-builds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangular%2Fangular-devkit-build-optimizer-builds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangular%2Fangular-devkit-build-optimizer-builds/lists"}