-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: add better-sqlite3 dependency #26168
Changes from all commits
cfe5f7a
e2cb40c
483c2a9
937f3d0
2e31a7e
db3b0ed
74784cd
ad2c195
97a0692
1cb7ec9
60a4c73
377f9de
d616609
9bc2904
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"private": true, | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "electron-rebuild -o better-sqlite3", | ||
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. How come you didn't update the build-prod script to call 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. I tried what you suggested first and unfortunately that didn't work. In the binary build we actually do a fresh 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. It seems like the rule might be: anything we do to the node_modules dependencies themselves needs to be done here. This includes patching packages and rebuilding native bindings. 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. 👍🏻 Makes sense. I assume you've found that via trial and error 😅 |
||
"build-prod": "tsc || echo 'built, with type errors'", | ||
"check-ts": "tsc --noEmit && yarn -s tslint", | ||
"clean-deps": "rimraf node_modules", | ||
|
@@ -37,6 +38,7 @@ | |
"ansi_up": "5.0.0", | ||
"ast-types": "0.13.3", | ||
"base64url": "^3.0.1", | ||
"better-sqlite3": "8.2.0", | ||
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. typically we document dependency bumps. Should this have a changelog entry to mention we added this? 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. Addressed here: |
||
"black-hole-stream": "0.0.1", | ||
"bluebird": "3.7.2", | ||
"bundle-require": "3.0.4", | ||
|
@@ -138,6 +140,7 @@ | |
"@cypress/json-schemas": "5.39.0", | ||
"@cypress/sinon-chai": "2.9.1", | ||
"@cypress/webpack-dev-server": "0.0.0-development", | ||
"@electron/rebuild": "3.2.10", | ||
"@ffprobe-installer/ffprobe": "1.1.0", | ||
"@packages/config": "0.0.0-development", | ||
"@packages/data-context": "0.0.0-development", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* global Debug, CDP, CY_PROTOCOL_DIR, betterSqlite3Binding, nodePath, Database */ | ||
|
||
const AppCaptureProtocol = class { | ||
constructor () { | ||
this.Debug = Debug | ||
this.CDP = CDP | ||
this.CY_PROTOCOL_DIR = CY_PROTOCOL_DIR | ||
this.betterSqlite3Binding = betterSqlite3Binding | ||
this.nodePath = nodePath | ||
this.Database = Database | ||
|
||
this.connectToBrowser = this.connectToBrowser.bind(this) | ||
this.beforeSpec = this.beforeSpec.bind(this) | ||
this.afterSpec = this.afterSpec.bind(this) | ||
this.beforeTest = this.beforeTest.bind(this) | ||
} | ||
|
||
async connectToBrowser ({ | ||
target, | ||
host, | ||
port, | ||
}) { | ||
return Promise.resolve() | ||
} | ||
|
||
beforeSpec (spec) { | ||
|
||
} | ||
|
||
afterSpec (spec) { | ||
} | ||
|
||
beforeTest (test) { | ||
|
||
} | ||
} | ||
|
||
module.exports = { | ||
AppCaptureProtocol, | ||
} |
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.
I feel like I've seen file permissions issues before (maybe just docker? worth adding a try-catch to safely bail if we fail here?
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.
I think this path will have several errors associated with it that we will be handling later (it's being caught one level higher right now). I'll add a TODO here to make sure this gets addressed when we dig into error handling for initializing the protocol.
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.
Addressed here:
74784cd
(#26168)