Title: upgrade-phonecat-2-hybrid docs example fails with APF v10 · Issue #36957 · angular/angular · GitHub
Open Graph Title: upgrade-phonecat-2-hybrid docs example fails with APF v10 · Issue #36957 · angular/angular
X Title: upgrade-phonecat-2-hybrid docs example fails with APF v10 · Issue #36957 · angular/angular
Description: 📚 Docs or angular.io bug report Description A clear and concise description of the problem... In #36944 we introduced APF v10, but this resulted in odd uglify error in the upgrade-phonecat-2-hybrid example. The error looks like this: (!)...
Open Graph Description: 📚 Docs or angular.io bug report Description A clear and concise description of the problem... In #36944 we introduced APF v10, but this resulted in odd uglify error in the upgrade-phonecat-2-hybrid...
X Description: 📚 Docs or angular.io bug report Description A clear and concise description of the problem... In #36944 we introduced APF v10, but this resulted in odd uglify error in the upgrade-phonecat-2-hybrid...
Opengraph URL: https://github.com/angular/angular/issues/36957
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"upgrade-phonecat-2-hybrid docs example fails with APF v10","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->\r\n\r\n# 📚 Docs or angular.io bug report\r\n\r\n### Description\r\n\r\n\u003c!-- ✍️edit:--> A clear and concise description of the problem...\r\n\r\nIn https://github.com/angular/angular/pull/36944 we introduced APF v10, but this resulted in odd uglify error in the `upgrade-phonecat-2-hybrid` example.\r\n\r\nThe error looks like this:\r\n\r\n```\r\n(!) uglify plugin: The transformBundle hook used by plugin uglify is deprecated. The renderChunk hook should be used instead.\r\n \r\n[!] (uglify plugin) SyntaxError: Error transforming bundle with 'uglify' plugin: Unexpected token: punc ())\r\n \r\nSyntaxError: Error transforming bundle with 'uglify' plugin: Unexpected token: punc ())\r\n \r\n at JS_Parse_Error.get (eval at \u003canonymous> (/home/circleci/ng/aio/tools/examples/shared/node_modules/uglify-js/tools/node.js:27:1), \u003canonymous>:86:23)\r\n \r\n at handleError (/home/circleci/ng/aio/tools/examples/shared/node_modules/rollup/bin/rollup:606:35)\r\n \r\n at /home/circleci/ng/aio/tools/examples/shared/node_modules/rollup/bin/rollup:1093:9\r\n```\r\n\r\nAnd the most likely root cause is that the uglify version is very old. We tried switching that example over to use terser didn't help for some reason, but it's possible that the switch to terser was not performed correctly.\r\n\r\nTo unblock #36944 we temporarily disabled the example test. This issues is here to remind us to come back and resolve this minor issue.\r\n\r\nFor future reference the terser patch looked like this:\r\n\r\n```\r\nFrom 3f8cf1232650be5c3eecb20ec012814986413e16 Mon Sep 17 00:00:00 2001\r\nFrom: Igor Minar \u003cigor@angular.io>\r\nDate: Wed, 6 May 2020 10:13:21 -0700\r\nSubject: [PATCH] build: update upgrade-phonecat-2-hybrid to use terser instead\r\n of old uglify\r\n\r\nThis should hopefully resolve the following issue we see:\r\n\r\n(!) uglify plugin: The transformBundle hook used by plugin uglify is deprecated. The renderChunk hook should be used instead.\r\n[!] (uglify plugin) SyntaxError: Error transforming bundle with 'uglify' plugin: Unexpected token: punc ())\r\nSyntaxError: Error transforming bundle with 'uglify' plugin: Unexpected token: punc ())\r\n at JS_Parse_Error.get (eval at \u003canonymous> (/home/circleci/ng/aio/tools/examples/shared/node_modules/uglify-js/tools/node.js:27:1), \u003canonymous>:86:23)\r\n at handleError (/home/circleci/ng/aio/tools/examples/shared/node_modules/rollup/bin/rollup:606:35)\r\n at /home/circleci/ng/aio/tools/examples/shared/node_modules/rollup/bin/rollup:1093:9\r\n---\r\n .../rollup-config.js | 4 +-\r\n aio/tools/examples/shared/package.json | 1 +\r\n aio/tools/examples/shared/yarn.lock | 40 +++++++++++++++++++\r\n 3 files changed, 43 insertions(+), 2 deletions(-)\r\n\r\ndiff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js b/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js\r\nindex c431e9d8e5e2..d0a29462c2f4 100644\r\n--- a/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js\r\n+++ b/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js\r\n@@ -1,7 +1,7 @@\r\n // #docregion\r\n import nodeResolve from 'rollup-plugin-node-resolve'\r\n import commonjs from 'rollup-plugin-commonjs';\r\n-import uglify from 'rollup-plugin-uglify'\r\n+import terser from 'rollup-plugin-terser'\r\n \r\n //paths are relative to the execution path\r\n export default {\r\n@@ -17,6 +17,6 @@ export default {\r\n commonjs({\r\n include: ['node_modules/rxjs/**']\r\n }),\r\n- uglify()\r\n+ terser()\r\n ]\r\n }\r\ndiff --git a/aio/tools/examples/shared/package.json b/aio/tools/examples/shared/package.json\r\nindex a3c63cf4cd8d..766d0913af4b 100644\r\n--- a/aio/tools/examples/shared/package.json\r\n+++ b/aio/tools/examples/shared/package.json\r\n@@ -81,6 +81,7 @@\r\n \"rollup-plugin-commonjs\": \"^9.2.1\",\r\n \"rollup-plugin-node-resolve\": \"^4.0.0\",\r\n \"rollup-plugin-uglify\": \"^1.0.1\",\r\n+ \"rollup-plugin-terser\": \"5.3.0\",\r\n \"source-map-explorer\": \"^1.3.2\",\r\n \"ts-node\": \"~8.3.0\",\r\n \"tslint\": \"~6.1.0\",\r\ndiff --git a/aio/tools/examples/shared/yarn.lock b/aio/tools/examples/shared/yarn.lock\r\nindex 30760bdb6c23..5d5028ece880 100644\r\n--- a/aio/tools/examples/shared/yarn.lock\r\n+++ b/aio/tools/examples/shared/yarn.lock\r\n@@ -4545,6 +4545,11 @@ estree-walker@^0.6.0:\r\n resolved \"https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.0.tgz#5d865327c44a618dde5699f763891ae31f257dae\"\r\n integrity sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==\r\n \r\n+estree-walker@^0.6.1:\r\n+ version \"0.6.1\"\r\n+ resolved \"https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362\"\r\n+ integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==\r\n+\r\n esutils@^2.0.2:\r\n version \"2.0.2\"\r\n resolved \"https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b\"\r\n@@ -6495,6 +6500,14 @@ jest-worker@25.1.0, jest-worker@^25.1.0:\r\n merge-stream \"^2.0.0\"\r\n supports-color \"^7.0.0\"\r\n \r\n+jest-worker@^24.9.0:\r\n+ version \"24.9.0\"\r\n+ resolved \"https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5\"\r\n+ integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==\r\n+ dependencies:\r\n+ merge-stream \"^2.0.0\"\r\n+ supports-color \"^6.1.0\"\r\n+\r\n js-tokens@^3.0.0:\r\n version \"3.0.2\"\r\n resolved \"https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b\"\r\n@@ -9797,6 +9810,17 @@ rollup-plugin-node-resolve@^4.0.0:\r\n is-module \"^1.0.0\"\r\n resolve \"^1.10.0\"\r\n \r\n+rollup-plugin-terser@5.3.0:\r\n+ version \"5.3.0\"\r\n+ resolved \"https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz#9c0dd33d5771df9630cd027d6a2559187f65885e\"\r\n+ integrity sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==\r\n+ dependencies:\r\n+ \"@babel/code-frame\" \"^7.5.5\"\r\n+ jest-worker \"^24.9.0\"\r\n+ rollup-pluginutils \"^2.8.2\"\r\n+ serialize-javascript \"^2.1.2\"\r\n+ terser \"^4.6.2\"\r\n+\r\n rollup-plugin-uglify@^1.0.1:\r\n version \"1.0.2\"\r\n resolved \"https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-1.0.2.tgz#d4aa6f5df13522eae1ba17780c7c4c7096038359\"\r\n@@ -9811,6 +9835,13 @@ rollup-pluginutils@^2.3.3:\r\n estree-walker \"^0.6.0\"\r\n micromatch \"^3.1.10\"\r\n \r\n+rollup-pluginutils@^2.8.2:\r\n+ version \"2.8.2\"\r\n+ resolved \"https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e\"\r\n+ integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==\r\n+ dependencies:\r\n+ estree-walker \"^0.6.1\"\r\n+\r\n rollup@2.1.0:\r\n version \"2.1.0\"\r\n resolved \"https://registry.yarnpkg.com/rollup/-/rollup-2.1.0.tgz#552e248e397a06b9c6db878c0564ca4ee06729c9\"\r\n@@ -11095,6 +11126,15 @@ terser@^4.4.3:\r\n source-map \"~0.6.1\"\r\n source-map-support \"~0.5.12\"\r\n \r\n+terser@^4.6.2:\r\n+ version \"4.6.13\"\r\n+ resolved \"https://registry.yarnpkg.com/terser/-/terser-4.6.13.tgz#e879a7364a5e0db52ba4891ecde007422c56a916\"\r\n+ integrity sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw==\r\n+ dependencies:\r\n+ commander \"^2.20.0\"\r\n+ source-map \"~0.6.1\"\r\n+ source-map-support \"~0.5.12\"\r\n+\r\n tfunk@^3.0.1:\r\n version \"3.1.0\"\r\n resolved \"https://registry.yarnpkg.com/tfunk/-/tfunk-3.1.0.tgz#38e4414fc64977d87afdaa72facb6d29f82f7b5b\"\r\n```","author":{"url":"https://github.com/IgorMinar","@type":"Person","name":"IgorMinar"},"datePublished":"2020-05-06T17:58:19Z","url":"https://github.com/angular/angular/issues/36957"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:02c28b83-a4b9-127f-d742-ee051c2f5de9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 839C:3D8CBB:194A15D:215969C:6B0140CB |
| html-safe-nonce | 6c4b5274783c120ba8751dfa72fec357c0bc7997951385714e292fe6a13c66eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzlDOjNEOENCQjoxOTRBMTVEOjIxNTk2OUM6NkIwMTQwQ0IiLCJ2aXNpdG9yX2lkIjoiNTQ0ODQzMDIyNTk3OTQyNDk3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 87b4a5294a62751481bf1ab133a91e3e6ea3234458049c2a0e2f72656ef1d3c6 |
| hovercard-subject-tag | issue:613505590 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/36957/issue_layout |
| twitter:image | https://opengraph.githubassets.com/312a6825e26dc5f2a5a72f3bb5186d01db7c7cfaa05dfe99c5256431c9f42256/angular/angular/issues/36957 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/312a6825e26dc5f2a5a72f3bb5186d01db7c7cfaa05dfe99c5256431c9f42256/angular/angular/issues/36957 |
| og:image:alt | 📚 Docs or angular.io bug report Description A clear and concise description of the problem... In #36944 we introduced APF v10, but this resulted in odd uglify error in the upgrade-phonecat-2-hybrid... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | IgorMinar |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width