Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

migrate from notes-core to @streetwriters/notesnook-core

Ammar Ahmede97f540ff9ab
diff --git a/apps/mobile/share/share.js b/apps/mobile/share/share.js
index 3e9e1e553..ed63755dd 100644
--- a/apps/mobile/share/share.js
+++ b/apps/mobile/share/share.js
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import { getPreviewData } from '@flyerhq/react-native-link-preview';
-import { parseHTML } from 'notes-core/utils/htmlparser';
+import { parseHTML } from '@streetwriters/notesnook-core/utils/htmlparser';
import React, { useEffect, useRef, useState } from 'react';
import {
ActivityIndicator,
diff --git a/apps/mobile/src/components/launcher/index.js b/apps/mobile/src/components/launcher/index.js
index fa0d79bd9..035724597 100644
--- a/apps/mobile/src/components/launcher/index.js
+++ b/apps/mobile/src/components/launcher/index.js
@@ -1,4 +1,4 @@
-import { EVENTS } from 'notes-core/common';
+import { EVENTS } from '@streetwriters/notesnook-core/common';
import React, { useEffect, useRef } from 'react';
import { NativeModules, Platform, View } from 'react-native';
import RNBootSplash from 'react-native-bootsplash';
diff --git a/apps/mobile/src/screens/editor/index.tsx b/apps/mobile/src/screens/editor/index.tsx
index 7f7952666..f115a2e84 100755
--- a/apps/mobile/src/screens/editor/index.tsx
+++ b/apps/mobile/src/screens/editor/index.tsx
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
-import { EV, EVENTS } from 'notes-core/common';
+import { EV, EVENTS } from '@streetwriters/notesnook-core/common';
import React, { forwardRef, ReactElement, useEffect, useImperativeHandle, useState } from 'react';
import { Platform, ViewStyle } from 'react-native';
import WebView from 'react-native-webview';
diff --git a/apps/mobile/src/screens/notebook/index.tsx b/apps/mobile/src/screens/notebook/index.tsx
index 3b50f0dd1..8d0f6968a 100644
--- a/apps/mobile/src/screens/notebook/index.tsx
+++ b/apps/mobile/src/screens/notebook/index.tsx
@@ -1,4 +1,4 @@
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import { qclone } from 'qclone';
import React, { useEffect, useRef, useState } from 'react';
import { FloatingButton } from '../../components/container/floating-button';
diff --git a/apps/mobile/src/screens/notes/colored.tsx b/apps/mobile/src/screens/notes/colored.tsx
index 1c1ffeeb4..6c52112c3 100644
--- a/apps/mobile/src/screens/notes/colored.tsx
+++ b/apps/mobile/src/screens/notes/colored.tsx
@@ -1,4 +1,4 @@
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import React from 'react';
import NotesPage, { PLACEHOLDER_DATA } from '.';
import Navigation, { NavigationProps, NotesScreenParams } from '../../services/navigation';
diff --git a/apps/mobile/src/screens/notes/monographs.tsx b/apps/mobile/src/screens/notes/monographs.tsx
index c5d76b6cb..53d633842 100644
--- a/apps/mobile/src/screens/notes/monographs.tsx
+++ b/apps/mobile/src/screens/notes/monographs.tsx
@@ -1,4 +1,4 @@
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import React from 'react';
import NotesPage, { PLACEHOLDER_DATA } from '.';
import Navigation, { NavigationProps, NotesScreenParams } from '../../services/navigation';
diff --git a/apps/mobile/src/screens/notes/tagged.tsx b/apps/mobile/src/screens/notes/tagged.tsx
index 8eabaa81c..6c8771841 100644
--- a/apps/mobile/src/screens/notes/tagged.tsx
+++ b/apps/mobile/src/screens/notes/tagged.tsx
@@ -1,4 +1,4 @@
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import React from 'react';
import NotesPage, { PLACEHOLDER_DATA } from '.';
import Navigation, { NavigationProps, NotesScreenParams } from '../../services/navigation';
diff --git a/apps/mobile/src/screens/notes/topicnotes.tsx b/apps/mobile/src/screens/notes/topicnotes.tsx
index 54dc6a3b9..dbc76eacd 100644
--- a/apps/mobile/src/screens/notes/topicnotes.tsx
+++ b/apps/mobile/src/screens/notes/topicnotes.tsx
@@ -1,4 +1,4 @@
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import React from 'react';
import NotesPage, { PLACEHOLDER_DATA } from '.';
import { MoveNotes } from '../../components/sheets/move-notes/movenote';
diff --git a/apps/mobile/src/services/eventmanager.ts b/apps/mobile/src/services/eventmanager.ts
index a2a3fca5c..a43b2b751 100644
--- a/apps/mobile/src/services/eventmanager.ts
+++ b/apps/mobile/src/services/eventmanager.ts
@@ -1,5 +1,5 @@
import Clipboard from '@react-native-clipboard/clipboard';
-import EventManager from 'notes-core/utils/event-manager';
+import EventManager from '@streetwriters/notesnook-core/utils/event-manager';
import { RefObject } from 'react';
import ActionSheet from 'react-native-actions-sheet';
import {
diff --git a/apps/mobile/src/services/premium.js b/apps/mobile/src/services/premium.js
index 5d23c0561..977086ac5 100644
--- a/apps/mobile/src/services/premium.js
+++ b/apps/mobile/src/services/premium.js
@@ -1,4 +1,4 @@
-import { CHECK_IDS } from 'notes-core/common';
+import { CHECK_IDS } from '@streetwriters/notesnook-core/common';
import React from 'react';
import { Platform } from 'react-native';
import * as RNIap from 'react-native-iap';
diff --git a/apps/mobile/src/services/sync.js b/apps/mobile/src/services/sync.js
index 37e22143d..f07e64f8c 100644
--- a/apps/mobile/src/services/sync.js
+++ b/apps/mobile/src/services/sync.js
@@ -1,5 +1,5 @@
import NetInfo from '@react-native-community/netinfo';
-import { EVENTS } from 'notes-core/common';
+import { EVENTS } from '@streetwriters/notesnook-core/common';
import { editorController } from '../screens/editor/tiptap/utils';
import { initialize } from '../stores';
import { useUserStore } from '../stores/use-user-store';
diff --git a/apps/mobile/src/stores/useFavoriteStore.ts b/apps/mobile/src/stores/useFavoriteStore.ts
index ec3477482..984934398 100644
--- a/apps/mobile/src/stores/useFavoriteStore.ts
+++ b/apps/mobile/src/stores/useFavoriteStore.ts
@@ -1,5 +1,5 @@
//@ts-ignore
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import create, { State } from 'zustand';
import { db } from '../utils/database';
import { NoteType } from '../utils/types';
diff --git a/apps/mobile/src/stores/useNotebookStore.ts b/apps/mobile/src/stores/useNotebookStore.ts
index f81f045b7..74cdfe492 100644
--- a/apps/mobile/src/stores/useNotebookStore.ts
+++ b/apps/mobile/src/stores/useNotebookStore.ts
@@ -1,5 +1,5 @@
//@ts-ignore
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import create, { State } from 'zustand';
import { db } from '../utils/database';
import { NotebookType } from '../utils/types';
diff --git a/apps/mobile/src/stores/useNotesStore.ts b/apps/mobile/src/stores/useNotesStore.ts
index 8b73ca869..2425d929c 100644
--- a/apps/mobile/src/stores/useNotesStore.ts
+++ b/apps/mobile/src/stores/useNotesStore.ts
@@ -1,5 +1,5 @@
//@ts-ignore
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import create, { State } from 'zustand';
import { db } from '../utils/database';
import { NoteType } from '../utils/types';
diff --git a/apps/mobile/src/stores/useTagStore.ts b/apps/mobile/src/stores/useTagStore.ts
index 42b02bc44..9bbfa6236 100644
--- a/apps/mobile/src/stores/useTagStore.ts
+++ b/apps/mobile/src/stores/useTagStore.ts
@@ -1,6 +1,6 @@
//@ts-ignore
-import 'notes-core/types';
-import { groupArray } from 'notes-core/utils/grouping';
+import '@streetwriters/notesnook-core/types';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import create, { State } from 'zustand';
import { db } from '../utils/database';
import { TagType } from '../utils/types';
diff --git a/apps/mobile/src/stores/useTrashStore.ts b/apps/mobile/src/stores/useTrashStore.ts
index 2b3bdeda5..b3594e585 100644
--- a/apps/mobile/src/stores/useTrashStore.ts
+++ b/apps/mobile/src/stores/useTrashStore.ts
@@ -1,5 +1,5 @@
//@ts-ignore
-import { groupArray } from 'notes-core/utils/grouping';
+import { groupArray } from '@streetwriters/notesnook-core/utils/grouping';
import create, { State } from 'zustand';
import { db } from '../utils/database';
import { TrashType } from '../utils/types';
diff --git a/apps/mobile/src/utils/database/index.js b/apps/mobile/src/utils/database/index.js
index 9609558e0..902290c41 100644
--- a/apps/mobile/src/utils/database/index.js
+++ b/apps/mobile/src/utils/database/index.js
@@ -3,10 +3,10 @@ import filesystem from '../filesystem';
import EventSource from '../sse/even-source-ios';
import AndroidEventSource from '../sse/event-source';
import Storage from './storage';
-import Database from 'notes-core/api/index';
+import Database from '@streetwriters/notesnook-core/api/index';
/**
- * @type {import("notes-core/api/index").default}
+ * @type {import("@streetwriters/notesnook-core/api/index").default}
*/
export var db = new Database(
Storage,
diff --git a/apps/mobile/src/utils/filesystem/download.js b/apps/mobile/src/utils/filesystem/download.js
index 738a42602..211516c0d 100644
--- a/apps/mobile/src/utils/filesystem/download.js
+++ b/apps/mobile/src/utils/filesystem/download.js
@@ -9,7 +9,7 @@ import { presentSheet, ToastEvent } from '../../services/event-manager';
import { db } from '../database';
import Storage from '../database/storage';
import { cacheDir, fileCheck } from './utils';
-import hosts from 'notes-core/utils/constants';
+import hosts from '@streetwriters/notesnook-core/utils/constants';
import NetInfo from '@react-native-community/netinfo';
export async function downloadFile(filename, data, cancelToken) {
diff --git a/apps/mobile/src/utils/hooks/useAppEvents.js b/apps/mobile/src/utils/hooks/useAppEvents.js
index 611d73251..f7f87af23 100644
--- a/apps/mobile/src/utils/hooks/useAppEvents.js
+++ b/apps/mobile/src/utils/hooks/useAppEvents.js
@@ -1,5 +1,5 @@
import NetInfo from '@react-native-community/netinfo';
-import { EV, EVENTS } from 'notes-core/common';
+import { EV, EVENTS } from '@streetwriters/notesnook-core/common';
import { useEffect, useRef } from 'react';
import {
Appearance,
diff --git a/apps/mobile/src/utils/hooks/useSyncProgress.ts b/apps/mobile/src/utils/hooks/useSyncProgress.ts
index 4b4d601d1..c8a03a8d0 100644
--- a/apps/mobile/src/utils/hooks/useSyncProgress.ts
+++ b/apps/mobile/src/utils/hooks/useSyncProgress.ts
@@ -1,5 +1,5 @@
//@ts-ignore
-import { EVENTS } from 'notes-core/common';
+import { EVENTS } from '@streetwriters/notesnook-core/common';
import { createRef, useCallback, useEffect, useRef, useState } from 'react';
import { db } from '../database';
diff --git a/apps/mobile/webpack.config.cjs b/apps/mobile/webpack.config.cjs
index 559dad15c..4ea7b83cd 100644
--- a/apps/mobile/webpack.config.cjs
+++ b/apps/mobile/webpack.config.cjs
@@ -148,7 +148,7 @@ module.exports = env => {
/node_modules(.*[/\\])+@react-native-masked-view\/masked-view/,
/node_modules(.*[/\\])+toggle-switch-react-native/,
/node_modules(.*[/\\])+rn-fetch-blob/,
- /node_modules(.*[/\\])+notes-core/,
+ /node_modules(.*[/\\])+@streetwriters[/\\]notesnook-core/,
/node_modules(.*[/\\])+@microsoft/,
/node_modules(.*[/\\])+@msgpack/,
/node_modules(.*[/\\])+liqe/,