Skip to content

Commit c673f09

Browse files
committed
Merge branch 'coder-xiaomo-feature-bump-docusaurus-version'
2 parents a7454c8 + 9f338b5 commit c673f09

File tree

8 files changed

+5305
-3906
lines changed

8 files changed

+5305
-3906
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: Contributing
3-
hide_title: true
4-
---
5-
61
<img src="https://github.com/Nozbe/WatermelonDB/raw/master/assets/needyou.jpg" alt="We need you" width="220" />
72

83
**WatermelonDB is an open-source project and it needs your help to thrive!**

docs-website/blog/2021-08-01-mdx-blog-post.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ tags: [docusaurus]
77

88
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
99

10+
<!--truncate-->
11+
1012
:::tip
1113

1214
Use the power of React to create interactive blog posts.

docs-website/docs/docs/CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ All React/React Native helpers for Watermelon are now available from a new `@noz
5858
- `DatabaseProvider`, `useDatabase`, `withDatabase`
5959
- NEW: `withObservables` - `@nozbe/with-observables` as a separate package is deprecated, and is now bundled with WatermelonDB
6060
- NEW: HOC helpers: `compose`, `withHooks`
61-
- NEW: `<WithObservables />` component, a component version of `withObservables` HOC. Useful when a value being observed is localized to a small part of a larger component, because you can effortlessly narrow down which parts of the component are re-rendered when the value changes without having to extract a new component.
61+
- NEW: `&lt;WithObservables />` component, a component version of `withObservables` HOC. Useful when a value being observed is localized to a small part of a larger component, because you can effortlessly narrow down which parts of the component are re-rendered when the value changes without having to extract a new component.
6262

6363
Imports from previous `@nozbe/watermelondb/DatabaseProvider` and `@nozbe/watermelondb/hooks` folders are deprecated and will be removed in a future version.
6464

@@ -76,7 +76,7 @@ All debug/dev/diagnostics tools for Watermelon are now available from a new `@no
7676

7777
Changes unlikely to cause issues:
7878

79-
- [iOS] If `import WatermelonDB` is used in your Swift app (for Turbo sync), remove it and replace with `#import <WatermelonDB/WatermelonDB.h>` in the bridging header
79+
- [iOS] If `import WatermelonDB` is used in your Swift app (for Turbo sync), remove it and replace with `#import &lt;WatermelonDB/WatermelonDB.h>` in the bridging header
8080
- [iOS] If you use `_watermelonDBLoggingHook`, remove it. No replacement is provided at this time, feel free to contribute if you need this
8181
- [iOS] If you use `-DENABLE_JSLOCK_PERFORMANCE_HACK`, remove it. JSLockPerfHack has been non-functional for some time already, and has now been removed. Please file an issue if you relied on it.
8282

@@ -257,7 +257,7 @@ help to do this! See: https://github.com/Nozbe/WatermelonDB/issues/1481
257257
### Fixes
258258

259259
- [TypeScript] Improve typings: add unsafeExecute method, localStorage property to Database
260-
- [android] Fixed compilation on some setups due to a missing `<cassert>` import
260+
- [android] Fixed compilation on some setups due to a missing `&lt;cassert>` import
261261
- [sync] Fixed marking changes as synced for users that don't keep globally unique (only per-table unique) IDs
262262
- Fix `Model.experimentalMarkAsDeleted/experimentalDestroyPermanently()` throwing an error in some cases
263263
- Fixes included in updated `withObservables`
@@ -414,7 +414,7 @@ Please don't get scared off the long list of breaking changes - they are all eit
414414
- [adapters] `onSetUpError: Error => void` option is added to both `SQLiteAdapter` and `LokiJSAdapter`. Supply this option to catch initialization errors and offer the user to reload or log out
415415
- [LokiJS] new `extraLokiOptions` and `extraIncrementalIDBOptions` options
416416
- [Android] Autolinking is now supported.
417-
- If You upgrade to `<= v0.21.0` **AND** are on a version of React Native which supports Autolinking, you will need to remove the config manually linking WatermelonDB.
417+
- If You upgrade to `&lt;= v0.21.0` **AND** are on a version of React Native which supports Autolinking, you will need to remove the config manually linking WatermelonDB.
418418
- You can resolve this issue by **REMOVING** the lines of config from your project which are _added_ in the `Manual Install ONLY` section of the [Android Install docs](https://nozbe.github.io/WatermelonDB/Installation.html#android-react-native).
419419

420420
### Performance
@@ -733,7 +733,7 @@ This is a **massive** new update to WatermelonDB! 🍉
733733
- [withObservables] Improved performance and debuggability (update withObservables package separately)
734734
- Improved debuggability of Watermelon -- shortened Rx stacks and added function names to aid in understanding
735735
call stacks and profiles
736-
- [adapters] The adapters interface has changed. `query()` and `count()` methods now receive a `SerializedQuery`, and `batch()` now takes `TableName<any>` and `RawRecord` or `RecordId` instead of `Model`.
736+
- [adapters] The adapters interface has changed. `query()` and `count()` methods now receive a `SerializedQuery`, and `batch()` now takes `TableName&lt;any>` and `RawRecord` or `RecordId` instead of `Model`.
737737
- [Typescript] Typing improvements
738738
- Added 3 missing properties `collections`, `database` and `asModel` in Model type definition.
739739
- Removed optional flag on `actionsEnabled` in the Database constructor options since its mandatory since 0.13.0.
@@ -890,13 +890,13 @@ Hotfix for rambdax crash
890890
### Changes
891891

892892
- [Android] Changed `compile` to `implementation` in Library Gradle file
893-
- ⚠️ might break build if you are using Android Gradle Plugin <3.X
893+
- ⚠️ might break build if you are using Android Gradle Plugin &lt;3.X
894894
- Updated `peerDependency` `react-native` to `0.57.0`
895895
- [Sync] Added `hasUnsyncedChanges()` helper method
896896
- [Sync] Improved documentation for backends that can't distinguish between `created` and `updated` records
897897
- [Sync] Improved diagnostics / protection against edge cases
898898
- [iOS] Add missing `header search path` to support **ejected** expo project.
899-
- [Android] Fix crash on android < 5.0
899+
- [Android] Fix crash on android &lt; 5.0
900900
- [iOS] `SQLiteAdapter`'s `dbName` path now allows you to pass an absolute path to a file, instead of a name
901901
- [Web] Add adaptive layout for demo example with smooth scrolling for iOS
902902

docs-website/docs/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Watermelon fixes it **by being lazy**. Nothing is loaded until it's requested. A
5757
But unlike using SQLite directly, Watermelon is **fully observable**. So whenever you change a record, all UI that depends on it will automatically re-render. For example, completing a task in a to-do app will re-render the task component, the list (to reorder), and all relevant task counters. [**Learn more**](https://www.youtube.com/watch?v=UlZ1QnFF4Cw).
5858

5959
| <a href="https://www.youtube.com/watch?v=UlZ1QnFF4Cw"><img src="https://github.com/Nozbe/WatermelonDB/raw/master/assets/watermelon-talk-thumbnail.jpg" alt="React Native EU: Next-generation React Databases" width="300" /></a> |
60-
| ---- | --- |
60+
| ---- |
6161
| <p align="center"><a href="https://www.youtube.com/watch?v=UlZ1QnFF4Cw">📺 <strong>Next-generation React databases</strong><br/>(a talk about WatermelonDB)</a></p> |
6262

6363
## Usage

docs-website/docusaurus.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require('prism-react-renderer/themes/github')
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
4+
const { themes } = require('prism-react-renderer')
5+
const lightTheme = themes.github
6+
const darkTheme = themes.dracula
67
const { version } = require('./package.json')
78

89
/** @type {import('@docusaurus/types').Config} */
@@ -153,8 +154,8 @@ const config = {
153154
copyright: `WatermelonDB by <a href="https://radex.io">Radek Pietruszewski</a> and <a href="https://nozbe.com">Nozbe</a>.`,
154155
},
155156
prism: {
156-
theme: lightCodeTheme,
157-
darkTheme: darkCodeTheme,
157+
theme: lightTheme,
158+
darkTheme: darkTheme,
158159
},
159160
}),
160161
}

docs-website/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "2.3.0",
18-
"@docusaurus/preset-classic": "2.3.0",
19-
"@mdx-js/react": "^1.6.22",
17+
"@docusaurus/core": "3.7.0",
18+
"@docusaurus/preset-classic": "3.7.0",
19+
"@mdx-js/react": "^3.0.0",
2020
"clsx": "^1.2.1",
21-
"prism-react-renderer": "^1.3.5",
22-
"react": "^17.0.2",
23-
"react-dom": "^17.0.2"
21+
"prism-react-renderer": "^2.1.0",
22+
"react": "^18.2.0",
23+
"react-dom": "^18.2.0"
2424
},
2525
"devDependencies": {
26-
"@docusaurus/module-type-aliases": "2.3.0"
26+
"@docusaurus/module-type-aliases": "3.7.0"
2727
},
2828
"browserslist": {
2929
"production": [
@@ -38,6 +38,6 @@
3838
]
3939
},
4040
"engines": {
41-
"node": ">=16.14"
41+
"node": ">=18.0"
4242
}
4343
}

0 commit comments

Comments
 (0)