Skip to content
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

TCS-1285 switch yarn to npm #42

Merged
merged 4 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: 'npm'

- name: Yarn Install
run: yarn install --network-concurrency 1
- name: NPM Install
run: npm ci --network-concurrency 1

- name: Linting
run: yarn run lint
run: npm run lint
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
node-version: 18
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Yarn Install
run: yarn install --network-concurrency 1
- name: NPM Install
run: npm ci --network-concurrency 1

- name: Publish (NPM)
run: npm publish --access public
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ We will continue to support this library for as long as we use it.

### Installation
```bash
yarn add react-native-fs2
npm i --save react-native-fs2
```

#### Supported React Native Versions
Expand Down Expand Up @@ -144,12 +144,12 @@ const fileData = await RNFS.readFile('DirPath', 'utf8')
length: number = 0,
position: number = 0,
encodingOrOptions?: EncodingOrOptions
): Promise<string>
): Promise<string>
*/

const fileData = await RNFS.read('FileToRead', 0, 0, 'utf8')
```
* Reads bytes length from the given position of the file at `filepath` and returns the file `contents`.
* Reads bytes length from the given position of the file at `filepath` and returns the file `contents`.
* Optionally includes `EncodingOrOptions` with values:
* `'utf8'` (default) | `'base64'` (for binary files) | `'ascii'`
* ...fileoptions
Expand All @@ -175,7 +175,7 @@ await RNFS.write('FileToWrite', 'ContentsToWrite', 'utf8')

### `appendFile`
```ts
// appendFile(filepath: string, contents: string, encodingOrOptions?: EncodingOrOptions): Promise<void>
// appendFile(filepath: string, contents: string, encodingOrOptions?: EncodingOrOptions): Promise<void>
await RNFS.appendFile('FileToWrite', 'ContentsToAppend', 'utf8')
```
* Append the `contents` to `filepath`
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
2 changes: 1 addition & 1 deletion example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
Loading
Loading