Skip to content

Commit

Permalink
Merge 5d830f0 into 3551ada
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Feb 24, 2024
2 parents 3551ada + 5d830f0 commit 66a86c6
Show file tree
Hide file tree
Showing 88 changed files with 1,401 additions and 1,728 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr-realm-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
path: |
README.md
packages/*/dist
packages/realm/binding/dist
packages/realm/binding/generated
build:
name: Build for ${{ matrix.variant.os }} ${{ matrix.variant.arch }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ coverage/
# Generated artifacts
/packages/realm/bindgen/vendor/bindgen-lib/generated/
/packages/realm/generated/
/packages/realm/binding/generated

# Build artifacts
/packages/realm/dist/
/packages/realm/binding/dist/
/packages/realm/binding/build/
/packages/realm/prebuilds/
/packages/realm/react-native/android/src/main/java/io/realm/react/Version.java
/packages/realm/react-native/android/src/main/jniLibs/
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/environments/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"test:main": {
"command": "mocha-remote --reporter @realm/mocha-reporter --id main tsx runner.ts main",
"dependencies": [
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/realm:build:node",
"../../../packages/mocha-reporter:bundle"
]
},
"test:renderer": {
"command": "mocha-remote --reporter @realm/mocha-reporter --id renderer tsx runner.ts renderer",
"dependencies": [
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/realm:build:node",
"../../../packages/mocha-reporter:bundle"
]
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/environments/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"test": {
"command": "mocha-remote --reporter @realm/mocha-reporter tsx index.mjs",
"dependencies": [
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/realm:build:node",
"../../../packages/mocha-reporter:bundle"
]
},
"test:commonjs": {
"command": "mocha-remote --reporter @realm/mocha-reporter tsx index.cjs",
"dependencies": [
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/realm:build:node",
"../../../packages/mocha-reporter:bundle"
]
Expand Down
12 changes: 6 additions & 6 deletions integration-tests/environments/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"command": "npm run common",
"dependencies": [
"../../../packages/realm:build:android",
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/mocha-reporter:bundle"
],
"env": {
Expand All @@ -116,7 +116,7 @@
"command": "npm run common",
"dependencies": [
"pod-install:simulator",
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/mocha-reporter:bundle"
],
"env": {
Expand All @@ -128,7 +128,7 @@
"command": "npm run common",
"dependencies": [
"pod-install:catalyst",
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/mocha-reporter:bundle"
],
"env": {
Expand All @@ -155,7 +155,7 @@
"command": "npm run common",
"dependencies": [
"../../../packages/realm:build:android",
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/mocha-reporter:bundle"
],
"env": {
Expand All @@ -168,7 +168,7 @@
"dependencies": [
"pod-install:simulator",
"../../../packages/realm:build:ios:debug:simulator",
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/mocha-reporter:bundle"
],
"env": {
Expand All @@ -181,7 +181,7 @@
"dependencies": [
"pod-install:catalyst",
"../../../packages/realm:build:ios:debug:catalyst",
"../../../packages/realm:bundle",
"../../../packages/realm:build:ts",
"../../../packages/mocha-reporter:bundle"
],
"env": {
Expand Down
5 changes: 4 additions & 1 deletion integration-tests/tests/.mocharc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"no-warnings"
],
"reporter": "@realm/mocha-reporter",
"require": "src/node/inject-globals.ts",
"require": [
"source-map-support/register",
"src/node/inject-globals.ts"
],
"spec": "src/index.ts"
}
3 changes: 1 addition & 2 deletions integration-tests/tests/.nycrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"cwd": "../..",
"include": [
"packages/realm/dist/**",
"packages/realm/src/**"
]
}
9 changes: 2 additions & 7 deletions integration-tests/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,42 @@
"lint": {
"command": "eslint --ext .js,.ts . && tsc --noEmit",
"dependencies": [
"../../packages/realm:bundle"
"build-dependencies"
]
},
"build": {
"command": "tsc",
"dependencies": [
"../../packages/realm:bundle",
"build-dependencies"
]
},
"start": {
"command": "mocha --watch",
"dependencies": [
"../../packages/realm:bundle",
"build-dependencies"
]
},
"test": {
"command": "mocha --exit",
"dependencies": [
"../../packages/realm:bundle",
"build-dependencies"
]
},
"coverage": {
"command": "nyc mocha --exit",
"dependencies": [
"../../packages/realm:bundle:coverage",
"build-dependencies"
]
},
"ci:coverage": {
"command": "nyc --reporter=lcov -- mocha --exit",
"dependencies": [
"../../packages/realm:bundle:coverage",
"build-dependencies"
]
},
"build-dependencies": {
"dependencies": [
"../../packages/realm:build:ts",
"../../packages/realm:build:node",
"../../packages/mocha-reporter:bundle"
]
Expand All @@ -69,7 +65,6 @@
"realm": "*"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@realm/app-importer": "*",
"@realm/mocha-reporter": "*",
"@thi.ng/bench": "^3.1.16",
Expand Down
1 change: 0 additions & 1 deletion integration-tests/tests/src/tests/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import Realm from "realm";
import { expect } from "chai";
import { DogSchema, IDog, IPerson, PersonSchema } from "../schemas/person-and-dogs";
import { BSON } from "realm/dist/bundle";

const TestSchema = {
name: "Test",
Expand Down
16 changes: 11 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"build": {
"dependencies": [
"bundle",
"./packages/realm:build"
"./packages/realm:build:ts"
]
},
"bundle": {
"dependencies": [
"./packages/realm:bundle",
"./packages/realm:build:ts",
"./packages/babel-plugin:bundle",
"./packages/mocha-reporter:bundle",
"./packages/realm-react:bundle",
Expand Down Expand Up @@ -78,6 +78,7 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-typescript": "^11.1.6",
"@tsconfig/node-lts": "^20.1.1",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"clang-format": "^1.8.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"test": {
"command": "jest",
"dependencies": [
"../realm:bundle"
"../realm:build:ts",
"../realm:bindgen:build:typescript"
]
}
},
Expand Down
4 changes: 2 additions & 2 deletions packages/fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
}
},
"exports": {
"types": "./dist/types/types.d.ts",
"node": {
"import": "./dist/node-esm/node.js",
"require": "./dist/node-cjs/node.js"
},
"react-native": "./dist/react-native/react-native.js",
"browser": "./dist/browser/browser.js",
"types": "./dist/types/types.d.ts"
"browser": "./dist/browser/browser.js"
},
"react-native": "./dist/react-native/react-native.js",
"types": "./dist/types/types.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/fetch/tsconfig.node.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"@tsconfig/node18/tsconfig.json",
],
"files": [
"src/node.ts"
"src/node.ts",
"src/types.ts"
]
}
3 changes: 2 additions & 1 deletion packages/fetch/tsconfig.node.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "./tsconfig.node.base.json",
"compilerOptions": {
"outDir": "./dist/node-cjs",
"module": "CommonJS"
"module": "Node16",
"moduleResolution": "Node16"
},
"references": [
{ "path": "tsconfig.types.json" }
Expand Down
3 changes: 2 additions & 1 deletion packages/fetch/tsconfig.node.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "./tsconfig.node.base.json",
"compilerOptions": {
"outDir": "./dist/node-esm",
"module": "ES2022"
"module": "es2022",
"moduleResolution": "Bundler"
},
"references": [
{ "path": "tsconfig.types.json" }
Expand Down
4 changes: 2 additions & 2 deletions packages/realm-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"bundle": {
"command": "rollup --config && tsc -p tsconfig.types.json",
"dependencies": [
"../realm:bundle",
"../realm:build:ts",
"../realm-common:bundle"
],
"files": [
Expand All @@ -33,7 +33,7 @@
"test": {
"command": "jest --forceExit",
"dependencies": [
"../realm:bundle",
"../realm:build:ts",
"../realm:build:node",
"../realm-common:bundle",
"../realm-app-importer:type-check"
Expand Down
1 change: 1 addition & 0 deletions packages/realm-react/src/UserProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
////////////////////////////////////////////////////////////////////////////

import React, { createContext, useContext, useEffect, useState } from "react";
import type Realm from "realm";

import { useApp } from "./AppProvider";

Expand Down
2 changes: 1 addition & 1 deletion packages/realm-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build": {
"command": "tsc -p tsconfig.build.json",
"dependencies": [
"../realm:bundle"
"../realm:build:ts"
],
"files": [
"tsconfig.build.json",
Expand Down
3 changes: 3 additions & 0 deletions packages/realm/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ dist/
docs/
bindgen/vendor/realm-core/
src/tests/realms/

# Files transpiled by babel from generated files
binding/generated/*.cjs
Loading

0 comments on commit 66a86c6

Please sign in to comment.