Skip to content

Commit

Permalink
Merge pull request #365 from perry-mitchell/fix/react-native-entities
Browse files Browse the repository at this point in the history
Improve react-native HTML entities handling
  • Loading branch information
perry-mitchell committed Feb 24, 2024
2 parents d10e467 + b09535b commit a07f9ed
Show file tree
Hide file tree
Showing 19 changed files with 4,927 additions and 4,671 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Linting / Formatting
Expand All @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Node.js web specs ${{ matrix.node-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
test.js
node_modules
test/testContents
/coverage
/dist
/web
8 changes: 7 additions & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"loader": "ts-node/esm"
"loader": "ts-node/esm",
"require": ["ts-node/register"],
"spec": ["test/node/**/*.spec.ts"],
"node-option": [
"experimental-specifier-resolution=node",
"loader=ts-node/esm"
]
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Version 5 upgrades the library to use ESM (ECMAScript Modules), and so your envi

* NodeJS project with `"type": "module"` in `package.json` (ESM mode)
* Web project bundled with a tool like Webpack that can handle ESM
* React-native projects (via direct import or using automatic react-native entry)

If you're not ready to upgrade, you may consider using version 4 of this library.

Expand Down Expand Up @@ -65,6 +66,14 @@ Versions 3/4 supported a UMD-style module in the browser, but this is no longer

**NB:** Streams are not available within the browser, so `createReadStream` and `createWriteStream` are just stubbed. Calling them will throw an exception.

#### React-Native support

React-Native is better supported as of version `5.4.0`, using a specific build for the platform. The import should be automatic, but can be forced by importing from `/react-native` directly:

```typescript
import { createClient } from "webdav/react-native";
```

### Types

Typescript types are exported with this library for the Node build. All of the types can also be directly imported from the module:
Expand Down
Loading

0 comments on commit a07f9ed

Please sign in to comment.