forked from realm/realm-js
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
node-fetch
dependency from SDK, introduce @realm/fetch
and…
… allow passing `fetch` through `AppConfiguration` (realm#6401) * Removed node-fetch and abort-controller from dependencies * Hoisted dependencies on typescript and @types/node * Started implementing a truely isometric fetch package * Removed the path alias for types * WIP * Fixed Headers types * Adding AbortSignal * Removing types project as reference in root tsconfig.json * assserting AbortSignal types and patching timeout static * Adding AbortController * Exporting Headers and returning Response * ReadableStream WIP * WIP * Deleted @realm/network-transport * Adding textStreaming config to React Native fetch requests. * Adding engines and type param to @realm/fetch * Removing network-transport from mono repo * Using @realm/fetch from "realm" * Using @realm/fetch from "app-importer" * Using @realm/fetch from "realm-web" * WIP * Ensure @realm/fetch is in the bundle of realm-web * Ensure @realm/fetch is in the bundle of realm * Use a utility to wrap response.body in an async iterator * Adding a version to @realm/fetch * Adding engines to realm-web package.json * Fixing react-native fetch implementation * Adding comments to explain the weird emits * Adding a "type-check" script to app-importer * Adding a top-level "react-native" in @realm/fetch's package.json * Prodiving a CJS + ESM node bundle * Renamed fetch script to "build" (since it doesn't bundle) * Bind fetch on node too (as this is loaded on Realm * Debugging url and init separately * Simplified types for ReactNative request init * Implemented RN polyfill for AbortSignal.timeout * Fixed setting statusText instead of status * Using AbortSignal.timeout only if timeout is positive * Adding an AnyFetch type * Enable passing "fetch" through app configuration * Passing baseUrl in the node-fetch test * Providing a fallback for Symbol.asyncIterator if transpiled using Babel * Apply suggestions from code review Co-authored-by: LJ <[email protected]> Co-authored-by: Andrew Meyer <[email protected]> * Inlining configuration.storage * Making cancel() return Promise<void> * Adding ArrayBuffer | TypedArray to RequestBody * Bumping lib of realm-web to es2022 --------- Co-authored-by: LJ <[email protected]> Co-authored-by: Andrew Meyer <[email protected]>
- Loading branch information
Showing
94 changed files
with
1,127 additions
and
1,772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,97 @@ | ||
{ | ||
"name": "@realm/integration-tests", | ||
"version": "0.1.0", | ||
"description": "A set of tests that can run in different environments", | ||
"main": "src/index.ts", | ||
"exports": { | ||
".": "./src/index.ts", | ||
"./node": "./src/node/index.ts" | ||
}, | ||
"private": true, | ||
"scripts": { | ||
"build": "wireit", | ||
"start": "wireit", | ||
"test": "wireit", | ||
"lint": "wireit", | ||
"coverage": "wireit", | ||
"ci:coverage": "wireit" | ||
}, | ||
"wireit": { | ||
"lint": { | ||
"command": "eslint --ext .js,.ts . && tsc --noEmit", | ||
"dependencies": [ | ||
"../../packages/realm-network-transport:bundle", | ||
"../../packages/realm:bundle" | ||
] | ||
}, | ||
"build": { | ||
"command": "tsc", | ||
"dependencies": [ | ||
"../../packages/realm:bundle", | ||
"build-dependencies" | ||
] | ||
}, | ||
"start": { | ||
"command": "mocha --watch", | ||
"dependencies": [ | ||
"../../packages/realm:bundle", | ||
"build-dependencies" | ||
] | ||
}, | ||
"test": { | ||
"command": "mocha --exit", | ||
"dependencies": [ | ||
"../../packages/realm:bundle", | ||
"build-dependencies" | ||
] | ||
}, | ||
"coverage": { | ||
"command": "nyc mocha --exit", | ||
"dependencies": [ | ||
"../../packages/realm:bundle:coverage", | ||
"build-dependencies" | ||
] | ||
}, | ||
"ci:coverage": { | ||
"command": "nyc --reporter=lcov -- mocha --exit", | ||
"dependencies": [ | ||
"../../packages/realm:bundle:coverage", | ||
"build-dependencies" | ||
] | ||
}, | ||
"build-dependencies": { | ||
"dependencies": [ | ||
"../../packages/realm:build:node", | ||
"../../packages/mocha-reporter:bundle", | ||
"../../packages/realm-network-transport:bundle" | ||
] | ||
} | ||
}, | ||
"peerDependencies": { | ||
"realm": "*" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^1.0.2", | ||
"@realm/app-importer": "*", | ||
"@realm/mocha-reporter": "*", | ||
"@thi.ng/bench": "^3.1.16", | ||
"@types/chai": "^4.3.3", | ||
"@types/chai-as-promised": "^7.1.5", | ||
"@types/jsrsasign": "^10.5.4", | ||
"@types/mocha": "^10.0.0", | ||
"@types/node": "^18.15.10", | ||
"concurrently": "^6.5.1", | ||
"mocha": "^10.1.0", | ||
"node-fetch": "^2.6.9", | ||
"nyc": "^15.1.0", | ||
"platform": "^1.3.6", | ||
"realm": "*" | ||
}, | ||
"dependencies": { | ||
"@realm/network-transport": "^0.7.2", | ||
"@thi.ng/bench": "^3.1.16", | ||
"chai": "4.3.6", | ||
"chai-as-promised": "^7.1.1", | ||
"concurrently": "^6.0.2", | ||
"jsrsasign": "^11.0.0" | ||
}, | ||
"files": [ | ||
"/src" | ||
] | ||
} | ||
"name": "@realm/integration-tests", | ||
"version": "0.1.0", | ||
"description": "A set of tests that can run in different environments", | ||
"main": "src/index.ts", | ||
"exports": { | ||
".": "./src/index.ts", | ||
"./node": "./src/node/index.ts" | ||
}, | ||
"private": true, | ||
"scripts": { | ||
"build": "wireit", | ||
"start": "wireit", | ||
"test": "wireit", | ||
"lint": "wireit", | ||
"coverage": "wireit", | ||
"ci:coverage": "wireit" | ||
}, | ||
"wireit": { | ||
"lint": { | ||
"command": "eslint --ext .js,.ts . && tsc --noEmit", | ||
"dependencies": [ | ||
"../../packages/realm:bundle" | ||
] | ||
}, | ||
"build": { | ||
"command": "tsc", | ||
"dependencies": [ | ||
"../../packages/realm:bundle", | ||
"build-dependencies" | ||
] | ||
}, | ||
"start": { | ||
"command": "mocha --watch", | ||
"dependencies": [ | ||
"../../packages/realm:bundle", | ||
"build-dependencies" | ||
] | ||
}, | ||
"test": { | ||
"command": "mocha --exit", | ||
"dependencies": [ | ||
"../../packages/realm:bundle", | ||
"build-dependencies" | ||
] | ||
}, | ||
"coverage": { | ||
"command": "nyc mocha --exit", | ||
"dependencies": [ | ||
"../../packages/realm:bundle:coverage", | ||
"build-dependencies" | ||
] | ||
}, | ||
"ci:coverage": { | ||
"command": "nyc --reporter=lcov -- mocha --exit", | ||
"dependencies": [ | ||
"../../packages/realm:bundle:coverage", | ||
"build-dependencies" | ||
] | ||
}, | ||
"build-dependencies": { | ||
"dependencies": [ | ||
"../../packages/realm:build:node", | ||
"../../packages/mocha-reporter:bundle" | ||
] | ||
} | ||
}, | ||
"peerDependencies": { | ||
"realm": "*" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^1.0.2", | ||
"@realm/app-importer": "*", | ||
"@realm/mocha-reporter": "*", | ||
"@thi.ng/bench": "^3.1.16", | ||
"@types/chai": "^4.3.3", | ||
"@types/chai-as-promised": "^7.1.5", | ||
"@types/jsrsasign": "^10.5.4", | ||
"@types/mocha": "^10.0.0", | ||
"concurrently": "^6.5.1", | ||
"mocha": "^10.1.0", | ||
"nyc": "^15.1.0", | ||
"platform": "^1.3.6", | ||
"realm": "*" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/bench": "^3.1.16", | ||
"chai": "4.3.6", | ||
"chai-as-promised": "^7.1.1", | ||
"concurrently": "^6.0.2", | ||
"jsrsasign": "^11.0.0", | ||
"node-fetch": "^3.3.2" | ||
}, | ||
"files": [ | ||
"/src" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ import "./path"; | |
import "./sync-proxy"; | ||
import "./custom-inspect"; | ||
import "./ssl"; | ||
import "./node-fetch"; |
Oops, something went wrong.