-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
chore: bump @metamask/providers
to ^17.2.0
#27049
Changes from 15 commits
c2ab0db
26c9dae
79642c4
1374c7f
03d402f
32a30e1
d7c0512
cbda740
375d390
48dd437
dddf498
80dc1e5
71c801f
1c0282a
17c36d0
9de1ea4
9d33738
77b6e4e
dd44d55
2c4af5d
cf3132e
640d766
4062d54
cac5cf0
ab43fd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff --git a/dist/extension-provider/createExternalExtensionProvider.mjs b/dist/extension-provider/createExternalExtensionProvider.mjs | ||
index f2aa9285d84cd5e25c20f5202437c476cdacc326..121a9099e456d3444d8aae79574ba9c53e7f2699 100644 | ||
--- a/dist/extension-provider/createExternalExtensionProvider.mjs | ||
+++ b/dist/extension-provider/createExternalExtensionProvider.mjs | ||
@@ -1,5 +1,4 @@ | ||
-import $detectbrowser from "detect-browser"; | ||
-const { detect } = $detectbrowser; | ||
+import { detect } from "detect-browser"; | ||
import $extensionportstream from "extension-port-stream"; | ||
const { PortDuplexStream: PortStream } = $extensionportstream; | ||
import config from "./external-extension-config.json" assert { type: "json" }; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ cleanContextForImports(); | |
import log from 'loglevel'; | ||
import { v4 as uuid } from 'uuid'; | ||
import { WindowPostMessageStream } from '@metamask/post-message-stream'; | ||
import { initializeProvider } from '@metamask/providers/dist/initializeInpageProvider'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Relevant: MetaMask/snaps#2445 (comment) |
||
import { initializeProvider } from '@metamask/providers/dist/initializeInpageProvider.cjs'; | ||
import shouldInjectProvider from '../../shared/modules/provider-injection'; | ||
|
||
// contexts | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these changes probably should be moved into a separate PR |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,10 @@ const schema = { | |
default: false, | ||
type: 'boolean', | ||
}, | ||
importAssertions: { | ||
default: false, | ||
type: 'boolean', | ||
}, | ||
}, | ||
additionalProperties: false, | ||
required: ['syntax'], | ||
|
@@ -123,12 +127,30 @@ const schema = { | |
default: false, | ||
type: 'boolean', | ||
}, | ||
importAssertions: { | ||
default: false, | ||
type: 'boolean', | ||
}, | ||
}, | ||
additionalProperties: false, | ||
required: ['syntax'], | ||
}, | ||
], | ||
}, | ||
experimental: { | ||
description: 'TODO', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix this |
||
type: 'object', | ||
properties: { | ||
keepImportAttributes: { | ||
type: 'boolean', | ||
default: false, | ||
}, | ||
emitAssertForImportAttributes: { | ||
type: 'boolean', | ||
default: false, | ||
}, | ||
}, | ||
}, | ||
}, | ||
additionalProperties: false, | ||
}, | ||
|
@@ -201,6 +223,11 @@ export function getSwcLoader( | |
parser: { | ||
syntax, | ||
[syntax === 'typescript' ? 'tsx' : 'jsx']: enableJsx, | ||
importAssertions: true, | ||
}, | ||
experimental: { | ||
keepImportAttributes: true, | ||
emitAssertForImportAttributes: true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unsure if all three or only some are needed, but definitely something needs to be set to deal with the import assertion There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If these are all false, I get the following from
|
||
}, | ||
}, | ||
} as const satisfies SwcLoaderOptions, | ||
|
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.
without this patch, I get the following from the inpage provider in the dapp web console