Skip to content
Open
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
- name: Typecheck
run: bun run typecheck

- name: Typecheck provider types
run: bun run typecheck:provider-types

- name: Build
run: bun run build

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ jobs:
- name: Typecheck
run: bun run typecheck

- name: Typecheck provider types
run: bun run typecheck:provider-types

- name: Build
run: bun run build

Expand Down
356 changes: 26 additions & 330 deletions bun.lock

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions package/jest.config.js

This file was deleted.

15 changes: 9 additions & 6 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"build:plugin": "bun run clean:plugin && tsc --project tsconfig.plugin.json",
"prepack": "cp ../README.md ./README.md && bun run build",
"postpack": "rm ./README.md",
"test": "jest",
"test:ci": "jest --runInBand --ci --watchman=false",
"test": "bun test",
"test:ci": "bun test",
"typecheck": "tsc --noEmit && tsc --project tsconfig.plugin.json --noEmit",
"typecheck:provider-types": "tsc --noEmit -p tsconfig.type-tests.json",
"nitrogen": "nitrogen && bun ./scripts/patch-nitrogen-generated.mjs",
Expand Down Expand Up @@ -84,16 +84,14 @@
"devDependencies": {
"@expo/config-plugins": "~57.0.0",
"@release-it/conventional-changelog": "^12.0.0",
"@types/jest": "^29.5.14",
"@types/bun": "^1.4.0",
"@types/react": "^19.2.15",
"jest": "^29.7.0",
"nitrogen": "^0.35.9",
"react": "19.2.3",
"react-native": "0.86.0",
"react-native-builder-bob": "^0.43.0",
"react-native-nitro-modules": "^0.35.10",
"release-it": "^19.0.0",
"ts-jest": "^29.4.0",
"typescript": "^5.8.3"
},
"react-native-builder-bob": {
Expand All @@ -106,7 +104,12 @@
"esm": true
}
],
"typescript"
[
"typescript",
{
"project": "tsconfig.build.json"
}
]
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, mock, test } from 'bun:test';
import type { MarkerDescriptor } from '../../native/specs/overlays';
import type { MarkerDescriptor } from '../../types/overlays';

const resolveAssetSourceMock = mock(
(source: number | { uri: string; width?: number; height?: number; scale?: number }) => {
Expand All @@ -23,11 +23,11 @@ mock.module('../assetSourceResolver', () => ({
const { clearResolvedMarkerImageCacheForTests } = await import('../resolveMarkerImage');
const { normalizeMarkerDescriptors } = await import('../normalizeMarkerDescriptors');

const baseDescriptor: MarkerDescriptor = {
const baseDescriptor = {
id: 'marker-1',
coordinate: { latitude: 37.7749, longitude: -122.4194 },
title: 'Test',
};
} satisfies MarkerDescriptor;

describe('normalizeMarkerDescriptors', () => {
beforeEach(() => {
Expand Down Expand Up @@ -69,7 +69,10 @@ describe('normalizeMarkerDescriptors', () => {
test('stabilizes after the first require() resolution', () => {
const descriptors = [{ ...baseDescriptor, image: 7 as never }];
const first = normalizeMarkerDescriptors(descriptors);
const second = normalizeMarkerDescriptors(first);
// The serialized shape is not a public descriptor (`enteringAnimation` is a
// descriptor object there, a union here), but feeding the output back in is
// exactly what this test asserts is stable, so cast it back.
const second = normalizeMarkerDescriptors(first as MarkerDescriptor[]);

expect(second).toBe(first);
expect(resolveAssetSourceMock).toHaveBeenCalledTimes(1);
Expand Down
5 changes: 4 additions & 1 deletion package/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true
}
},
// Tests are typechecked by tsconfig.json but must never reach lib/: they
// import `bun:test`, which consumers do not have.
"exclude": ["src/**/__tests__/**"]
}
3 changes: 1 addition & 2 deletions package/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"outDir": "lib/typescript",
"noEmit": true
},
"include": ["src"],
"exclude": ["src/**/__tests__/**"]
"include": ["src"]
}
Loading