-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add JS and Wasm for 2.0.x version #197
Conversation
3b4f2ab
to
57a235c
Compare
@@ -20,7 +20,7 @@ | |||
"@babel/plugin-transform-runtime": "~7.22.4", | |||
"@babel/preset-env": "~7.22.4", | |||
"@babel/runtime-corejs2": "~7.22.2", | |||
"@playwright/test": "^1.37.1", | |||
"@playwright/test": "^1.40.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required for Wasm test in chrome with enabled WasmGC.
if (!isKeyOfObject(target, TargetPlatforms)) | ||
throw new Error('Invalid target platform'); | ||
|
||
options.targetPlatform && getTargetById(options.targetPlatform); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's real bug - it's impossible to pass js-ir
platform. Cause expected js_ir
.
Test below.
|
||
if (platform === TargetPlatforms.JS_IR && minor < MINIMAL_MINOR_VERSION_IR) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main issue 2.0.0
has minor less then 5 or 9.
@@ -30,7 +30,9 @@ function isRunRequest(url: URL | string) { | |||
|
|||
return ( | |||
uri.host === API_HOST && | |||
uri.pathname.match(/^\/?\/api\/\d+\.\d+\.\d+\/compiler\/run$/) !== null | |||
(uri.pathname.match(/^\/?\/api\/\d+\.\d+\.\d+\/compiler\/run$/) !== null || | |||
uri.pathname.match(/^\/?\/api\/\d+\.\d+\.\d+\/compiler\/translate$/) !== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catch for both types of targets.
c5308ff
to
800bf4a
Compare
800bf4a
to
54a2ecb
Compare
Fix issues:
✅ Fix for passing
data-target-platform=js-ir
✅ Accept JS_IR for 2.0.x
Chore:
⚠️ update playwright deps.
Add tests:
➕ Platforms restrictions › JS_IR for unsupported version
➕ Platforms restrictions › JS_IR for supported by minor version
➕ Platforms restrictions › JS_IR for supported by major version
➕ Platforms restrictions › WASM for unsupported version
➕ Platforms restrictions › WASM for supported by minor version [chromium only]
➕ Platforms restrictions › WASM for supported by major version [chromium only]