Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cjs interop fix #160

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/quiet-pandas-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/vite": patch
---

Use global config exported from @marko/compiler
5 changes: 5 additions & 0 deletions .changeset/rotten-nails-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/vite": patch
---

Improve\* cjs interop
3,899 changes: 1,406 additions & 2,493 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.5",
"@marko/compiler": "^5.37.0",
"@changesets/cli": "^2.27.9",
"@marko/compiler": "^5.37.26",
"@marko/fixture-snapshots": "^2.2.1",
"@marko/testing-library": "^6.2.0",
"@types/babel__core": "^7.20.5",
"@types/jsdom": "^21.1.6",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.12",
"@types/jsdom": "^21.1.7",
"@types/mocha": "^10.0.9",
"@types/node": "^22.9.0",
"@types/resolve": "^1.20.6",
"@types/serve-handler": "^6.1.4",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"cross-env": "^7.0.3",
"esbuild": "^0.21.4",
"esbuild": "^0.24.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"fixpack": "^4.0.0",
"husky": "^9.0.11",
"jsdom": "^24.1.0",
"husky": "^9.1.7",
"jsdom": "^25.0.1",
"less": "^4.2.0",
"lint-staged": "^15.2.5",
"marko": "^5.35.0",
"mocha": "^10.4.0",
"lint-staged": "^15.2.10",
"marko": "^5.35.35",
"mocha": "^10.8.2",
"mocha-snap": "^5.0.0",
"nyc": "^15.1.0",
"playwright": "^1.44.1",
"prettier": "^3.2.5",
"serve-handler": "^6.1.5",
"tsx": "^4.11.0",
"typescript": "^5.4.5",
"vite": "^5.2.12"
"nyc": "^17.1.0",
"playwright": "^1.49.0",
"prettier": "^3.3.3",
"serve-handler": "^6.1.6",
"tsx": "^4.19.2",
"typescript": "^5.6.3",
"vite": "^5.4.11"
},
"files": [
"dist",
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/fixtures/isomorphic-base-url/server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const baseUrl = process.env.BASE_URL;
export default createServer(async (req, res) => {
// remove the base url from the request url
if (req.url.startsWith(baseUrl, 1)) {
req.url = req.url.slice(baseUrl.length - 1);
req.url = req.url.slice(baseUrl.length);
}

await handler(req, res);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Expand Down Expand Up @@ -40,7 +40,7 @@
document.documentElement.style.visibility='hidden'
</script>
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Expand All @@ -14,7 +14,7 @@
type="module"
/>
<div
id="clickable"
class="clickable"
>
Mounted: false Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div
id="clickable"
class="clickable"
>
Mounted: true Clicks: 0
</div>
Expand All @@ -14,7 +14,7 @@
type="module"
/>
<div
id="clickable"
class="clickable"
>
Mounted: true Clicks: 0
</div>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div
id="clickable"
class="clickable"
>
Mounted: true Clicks: 1
</div>
Expand All @@ -14,7 +14,7 @@
type="module"
/>
<div
id="clickable"
class="clickable"
>
Mounted: true Clicks: 0
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div
class="clickable"
>
Mounted: true Clicks: 1
</div>
<script
async=""
src="/src/template.marko?marko-browser-entry"
type="module"
/>
<script
async=""
src="/src/components/class-[hash].marko?marko-browser-entry"
type="module"
/>
<div
class="clickable"
>
Mounted: true Clicks: 1
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class {
}
}

<div#clickable onClick("handleClick")>
<div.clickable onClick("handleClick")>
Mounted: ${state.mounted}
Clicks: ${state.clickCount}
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const ssr = true;
export async function steps() {
await page.click("#clickable");
for (const el of await page.$$(".clickable")) {
await el.click();
}
}

This file was deleted.

This file was deleted.

Loading
Loading