Skip to content
Merged
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
4 changes: 2 additions & 2 deletions packages/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
"app.plugin.d.ts"
],
"scripts": {
"build": "tsup",
"build": "tsdown",
"build:declarations": "tsc -p tsconfig.declarations.json",
"clean": "rimraf ./dist",
"dev": "tsup --watch",
"dev": "tsdown --watch",
"dev:pub": "pnpm dev -- --env.publish",
"format": "node ../../scripts/format-package.mjs",
"format:check": "node ../../scripts/format-package.mjs --check",
Expand Down
8 changes: 4 additions & 4 deletions packages/expo/src/polyfills/base64Polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { decode, encode } from 'base-64';
import { isHermes } from '../utils';

// See Default Expo 51 engine Hermes' issue: https://github.com/facebook/hermes/issues/1379
if (!global.btoa || isHermes()) {
global.btoa = encode;
if (!globalThis.btoa || isHermes()) {
globalThis.btoa = encode;
}

// See Default Expo 51 engine Hermes' issue: https://github.com/facebook/hermes/issues/1379
if (!global.atob || isHermes()) {
global.atob = decode;
if (!globalThis.atob || isHermes()) {
globalThis.atob = decode;
}
3 changes: 1 addition & 2 deletions packages/expo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"compilerOptions": {
"outDir": "dist",
"baseUrl": ".",
"lib": ["es6", "dom"],
"lib": ["es2019", "dom"],
"jsx": "react-jsx",
"module": "NodeNext",
"moduleResolution": "NodeNext",
Expand Down
17 changes: 8 additions & 9 deletions packages/expo/tsup.config.ts → packages/expo/tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Options } from 'tsup';
import { defineConfig } from 'tsup';
import type { Options } from 'tsdown';
import { defineConfig } from 'tsdown';

import { runAfterLast } from '../../scripts/utils';
import { version as clerkJsVersion } from '../clerk-js/package.json';
import { name, version } from './package.json';
import { runAfterLast } from '../../scripts/utils.ts';
import clerkJsPkgJson from '../clerk-js/package.json' with { type: 'json' };
import pkgJson from './package.json' with { type: 'json' };

export default defineConfig(overrideOptions => {
const isWatch = !!overrideOptions.watch;
Expand All @@ -17,11 +17,10 @@ export default defineConfig(overrideOptions => {
clean: true,
minify: false,
sourcemap: true,
legacyOutput: true,
define: {
PACKAGE_NAME: `"${name}"`,
PACKAGE_VERSION: `"${version}"`,
JS_PACKAGE_VERSION: `"${clerkJsVersion}"`,
PACKAGE_NAME: `"${pkgJson.name}"`,
PACKAGE_VERSION: `"${pkgJson.version}"`,
JS_PACKAGE_VERSION: `"${clerkJsPkgJson.version}"`,
__DEV__: `${isWatch}`,
},
};
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Options } from 'tsup';
import type { Options } from 'tsdown';

export const runAfterLast =
(commands: Array<string | false>) =>
Expand Down
Loading