Skip to content

Commit edd9c55

Browse files
authored
feat: refresh build pipeline (#50)
* chore: add builder bob * chore: add named exports * update * updates * up * update * change to tip * up
1 parent 63db3c5 commit edd9c55

File tree

14 files changed

+1312
-139
lines changed

14 files changed

+1312
-139
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ yarn-error.log
6969
# Temporary files created by Metro to check the health of the file watcher
7070
.metro-health-check*
7171

72-
# testing
72+
# Testing
7373
/coverage
7474

7575
# Yarn
@@ -79,3 +79,6 @@ yarn-error.log
7979
!.yarn/releases
8080
!.yarn/sdks
8181
!.yarn/versions
82+
83+
# Builder Bob
84+
lib/

README.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,28 @@ npm install react-native-fast-io --save
3131
- Streams, e.g. `web-streams-polyfill/polyfill`
3232
- AsyncIterator, e.g. `@azure/core-asynciterator-polyfill`
3333

34-
## Usage
34+
### Usage
3535

36-
This library includes:
37-
- [`WebSocket`](docs/ws.md)
38-
- [`fetch`](docs/network.md)
39-
- [`Blob`](docs/blob.md)
40-
- [`ReadableStream` and `WritableStream`](docs/streams.md)
36+
```ts
37+
// With `unstable_enablePackageExports` enabled
38+
import { WebSocket } from 'react-native-fast-io/ws'
4139

42-
For details, consult each module's documentation. Unless otherwise specified, all methods work as per W3C specifications.
40+
// Otherwise
41+
import { WebSocket } from 'react-native-fast-io'
42+
```
43+
44+
## What's included
45+
46+
| Name | Docs | W3C | Status |
47+
|------|------|-----|--------|
48+
| WebSocket | [📖](docs/ws.md) | [WebSocket API](https://websockets.spec.whatwg.org/) | Beta ✅ |
49+
| Fetch | [📖](docs/fetch.md) | [Fetch API](https://fetch.spec.whatwg.org/) | Work In Progress 🚧 |
50+
| FileSystem | [📖](docs/fs.md) | [File System Access API](https://wicg.github.io/file-system-access/) | Work In Progress 🚧 |
51+
| Blob | [📖](docs/blob.md) | [Blob API](https://w3c.github.io/FileAPI/#blob-section) | Work In Progress 🚧 |
52+
| Streams | [📖](docs/streams.md) | [Streams API](https://streams.spec.whatwg.org/) | Work In Progress 🚧 |
53+
54+
> [!TIP]
55+
> Unless otherwise specified, all methods work as per W3C specifications. For details, consult each module's documentation.
4356
4457
## Made with ❤️ at Callstack
4558

File renamed without changes.

docs/fs.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Fs
2+
3+
## Usage
4+
5+
[TBD]
6+
7+
## Differences with `react-native-document-picker`
8+
9+
[TBD]
10+
11+
## Differences with `expo-file-system`
12+
13+
[TBD]

example/tests/benchmark.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
TouchableOpacity,
99
View,
1010
} from 'react-native'
11-
import { WebSocket as FastWS } from 'react-native-fast-io'
11+
import { WebSocket as FastWS } from 'react-native-fast-io/ws'
1212

1313
import {
1414
CHAT_PAYLOAD,

example/tests/filesystem.tsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
import React, { useState } from 'react'
22
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
3-
import {
4-
CompressionStream,
5-
fetch,
6-
OpenFilePickerOptions,
7-
showOpenFilePicker,
8-
} from 'react-native-fast-io'
3+
import { fetch } from 'react-native-fast-io/fetch'
4+
import { showOpenFilePicker } from 'react-native-fast-io/fs'
5+
import { CompressionStream } from 'react-native-fast-io/streams'
96

107
import { BASE_URL } from './benchmark'
118

129
export function FileSystemUI() {
1310
const [file, setFile] = useState<File | null>(null)
1411

15-
const pickFile = async (options?: OpenFilePickerOptions) => {
12+
const pickFile = async (options?: Parameters<typeof showOpenFilePicker>[0]) => {
1613
const [fileHandle] = await showOpenFilePicker(options)
1714
const file = await fileHandle.getFile()
1815
// @ts-ignore

example/tsconfig.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
"extends": ".."
2+
"extends": "..",
3+
"compilerOptions": {
4+
"resolvePackageJsonExports": false,
5+
"paths": {
6+
"react-native-fast-io": ["../packages/react-native-fast-io/src/index.ts"],
7+
"react-native-fast-io/*": ["../packages/react-native-fast-io/src/w3c/*"]
8+
}
9+
}
310
}

0 commit comments

Comments
 (0)