Skip to content

Commit

Permalink
docs(changeset): Update keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Aug 26, 2023
1 parent 01b5a7c commit 5761879
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-donuts-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"persistnsync": patch
---

Update keywords
22 changes: 22 additions & 0 deletions .github/workflows/publish-to-npm-on-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,28 @@ jobs:
with:
registry-url: https://registry.npmjs.org

- name: Publish Zustand-Sync to NPM
id: syncZustand
working-directory: ./packages/zustand-sync
continue-on-error: true
run: pnpm build && pnpm publish-package && pnpm pp2 && pnpm pp3 && pnpm pp4
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
- uses: actions/setup-node@v3
if: steps.syncZustand.outcome == 'success'
with:
registry-url: https://npm.pkg.github.com/
- name: Publish to GitHub Public Repository
if: steps.syncZustand.outcome == 'success'
working-directory: ./packages/zustand-sync
run: pnpm p-gpr && pnpm pp2 && pnpm pp3 && pnpm pp4
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- uses: actions/setup-node@v3
if: steps.syncZustand.outcome == 'success'
with:
registry-url: https://registry.npmjs.org

- name: Publish nextjs-themes to NPM
run: pnpm build && pnpm publish-package && pnpm publish-package2
env:
Expand Down
3 changes: 3 additions & 0 deletions packages/persistnsync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"api",
"broadcast",
"channel",
"sync-tabs",
"sync-windows",
"sync",
"broadcast-channel",
"persist",
"localStorage",
Expand Down
2 changes: 1 addition & 1 deletion packages/zustand-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- ✅ Full TypeScript Support
- ✅ solid reliability in 1 writing and n reading tab-scenarios (with changing writing tab)
- ✅ Fire and forget approach of always using the latest state. Perfect for single user systems
-Share state between multiple browsing contexts
-Sync Zustand state between multiple browsing contexts

> Checkout `[persistnsync](https://github.com/mayank1513/nextjs-themes/tree/main/packages/persistnsync#readme)` if you are looking for persisting state locally over reload/refresh or after closing site
Expand Down
9 changes: 7 additions & 2 deletions packages/zustand-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"scripts": {
"build": "tsc && node createPackageJSON.js",
"publish-package": "cp README.md dist && cd dist && npm publish && cd ..",
"publish-package2": "node seo.js && cd dist && npm publish && cd ..",
"publish-gpr": "node createPackageJSON.js && cp README.md dist && node prepGPR.js && cd dist && npm publish && cd .."
"pp2": "node seo.js && cd dist && npm publish && cd ..",
"pp3": "node seo1.js && cd dist && npm publish && cd ..",
"pp4": "node seo2.js && cd dist && npm publish && cd ..",
"p-gpr": "node createPackageJSON.js && cp README.md dist && node prepGPR.js && cd dist && npm publish && cd .."
},
"funding": {
"type": "github",
Expand All @@ -32,6 +34,9 @@
"api",
"broadcast",
"channel",
"sync-tabs",
"sync-windows",
"sync",
"broadcast-channel",
"hooks",
"react",
Expand Down
17 changes: 17 additions & 0 deletions packages/zustand-sync/seo1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use strict";

const fs = require("fs");
const path = require("path");

const name = "sync-zustand";
const ref = "zustand-sync-tabs";

const packageJsonPath = path.resolve(__dirname, "dist", "package.json");
const packageJson = require(packageJsonPath);
packageJson.name = packageJson.name.replace(ref, name);
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));

const readMePath = path.resolve(__dirname, "dist", "README.md");
let readMe = fs.readFileSync(readMePath, { encoding: "utf8" });
readMe = readMe.replace(new RegExp(ref, "g"), name);
fs.writeFileSync(readMePath, readMe);
17 changes: 17 additions & 0 deletions packages/zustand-sync/seo2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use strict";

const fs = require("fs");
const path = require("path");

const name = "sync-tabs-zustand";
const ref = "sync-zustand";

const packageJsonPath = path.resolve(__dirname, "dist", "package.json");
const packageJson = require(packageJsonPath);
packageJson.name = packageJson.name.replace(ref, name);
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));

const readMePath = path.resolve(__dirname, "dist", "README.md");
let readMe = fs.readFileSync(readMePath, { encoding: "utf8" });
readMe = readMe.replace(new RegExp(ref, "g"), name);
fs.writeFileSync(readMePath, readMe);

0 comments on commit 5761879

Please sign in to comment.