mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 20:44:23 +01:00
Merge 'introduce package.json for separate *-browser package (both database and sync)' from Nikita Sivukhin
This PR introduces separate `package.browser.json` file for `*-browser` npm packages (`@tursodatabase/sync-browser` and `@tursodatabase/database-browser`). The packages are nearly identical and the only change is `package.json` content (browser package mentions only WASM optional dependency which shouldn't confuse NPM and force it to download WASM dep package instead of native one). Due to that, innocent "hack" is implemented which swap `package.json` with `package.browser.json` before publish of `browser` package. Closes #2906
This commit is contained in:
6
.github/workflows/napi-sync.yml
vendored
6
.github/workflows/napi-sync.yml
vendored
@@ -175,11 +175,13 @@ jobs:
|
||||
if git log -1 --pretty=%B | grep "^Turso [0-9]\+\.[0-9]\+\.[0-9]\+$";
|
||||
then
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
npm publish --access public
|
||||
make publish-native
|
||||
make publish-browser
|
||||
elif git log -1 --pretty=%B | grep "^Turso [0-9]\+\.[0-9]\+\.[0-9]\+";
|
||||
then
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
npm publish --tag next --access public
|
||||
make publish-native-next
|
||||
make publish-browser-next
|
||||
else
|
||||
echo "Not a release, skipping publish"
|
||||
fi
|
||||
|
||||
6
.github/workflows/napi.yml
vendored
6
.github/workflows/napi.yml
vendored
@@ -175,11 +175,13 @@ jobs:
|
||||
if git log -1 --pretty=%B | grep "^Turso [0-9]\+\.[0-9]\+\.[0-9]\+$";
|
||||
then
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
npm publish --access public
|
||||
make publish-native
|
||||
make publish-browser
|
||||
elif git log -1 --pretty=%B | grep "^Turso [0-9]\+\.[0-9]\+\.[0-9]\+";
|
||||
then
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
npm publish --tag next --access public
|
||||
make publish-native-next
|
||||
make publish-browser-next
|
||||
else
|
||||
echo "Not a release, skipping publish"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user