{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":659072664,"defaultBranch":"main","name":"embroider","ownerLogin":"tildeio","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2023-06-27T04:58:06.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1355851?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1689274284.0","currentOid":""},"activityList":{"items":[{"before":null,"after":"544dadb5ded2b674965c7a3a5cfd30ccb34a638b","ref":"refs/heads/esc","pushedAt":"2023-07-13T18:51:24.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"chancancode","name":"Godfrey Chan","path":"/chancancode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/55829?s=80&v=4"},"commit":{"message":"Include named exports in CJS shims when using `importSync`\n\n`importSync()` is intended to work like `import()` (buy sync),\nwhich, in turns, is expected to work like a namespace import –\n`import * as NS from \"foo\";`. In general, we would expect that to\nbe interchangable with `const NS = importSync(\"foo\");`.\n\nPrior to this commit, this is not true for commonjs packages:\n\n```js\nimport * as QUnit1 from \"qunit\";\n// => { QUnit, assert, begin, config, ... }\n\nQUnit1.assert // => function\n\nconst QUnit2 = importSync(\"qunit\");\n// => { default: { QUnit, assert, begin, config, ... } }\n\nQUnit2.assert // => undefined\n```\n\nOf course, using ES imports on commonjs packages is, in itself, an\nill-defined concept, but nevertheless, it is a very common interop\nrequirement.\n\nThe previous behavior is introduced in #1076. The intent appears to\nbe fixing a different interop issue, where we would expect these to\nwork the same way:\n\n```js\nimport QUnit1 from \"qunit\";\n// => { Qunit, assert, begin, config, ... }\n\nQUnit1.assert // => function\n\nconst QUnit2 = importSync(\"qunit\").default;\n// => { QUnit, assert, begin, config, ... }\n\nQUnit2.assert // => function\n```\n\nThe fix in #1076, however, broke the exepctation that `import()`\nshould behave like a namespace improt statement for CJS modules.\n\nThis commit attempts to satisfy both of these requirements, with\none caveat: `importSync(\"foo\").default` is present on the shimed\nCJS modules, but in `import * as FOO from \"foo\";`, `FOO.default`\nis undefined.\n\nArguably, this is a bug in webpack's implementation – if you are\nable to write an import statement that references the default\nexport, you should be able to do the same in the namespace import\nas per the spec.\n\nSo, the implementation here is different but more correct.","shortMessageHtmlLink":"Include named exports in CJS shims when using importSync"}},{"before":null,"after":"21c56b241783a766a9ba7f52611c6acd69186cdf","ref":"refs/heads/properly-serialize-options","pushedAt":"2023-06-27T04:58:41.223Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"chancancode","name":"Godfrey Chan","path":"/chancancode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/55829?s=80&v=4"},"commit":{"message":"Only serialize the options we need\n\n`this.options` can contain arbitrary unserializable data (such as\nBroccoli trees, Webpack plugins, etc).\n\nFixes #1441","shortMessageHtmlLink":"Only serialize the options we need"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADVRixFQA","startCursor":null,"endCursor":null}},"title":"Activity · tildeio/embroider"}