diff --git a/package-lock.json b/package-lock.json index 482bc6e2..defce563 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17336,21 +17336,21 @@ }, "packages/core": { "name": "@orchidui/core", - "version": "1.0.22", + "version": "1.0.23-0", "license": "MIT" }, "packages/dashboard": { "name": "@orchidui/dashboard", - "version": "1.0.22", + "version": "1.0.23-0", "license": "MIT", "dependencies": { - "@orchidui/core": "1.0.20" + "@orchidui/core": "1.0.22" } }, "packages/dashboard/node_modules/@orchidui/core": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/@orchidui/core/-/core-1.0.20.tgz", - "integrity": "sha512-uc2clWAijK3SkYuqAbtgE8B58c0iYXQ+v5tt98ui+UEzk8cR/trSzR07hKVrEhMacSXS3IQbqcIkCoO5emgqVw==", + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/@orchidui/core/-/core-1.0.22.tgz", + "integrity": "sha512-9raAQbXeX6/tg4vB7JuEZPt8lOPQIK9ldePfU8AmIyUzCBgwRNvtiFU8q/QrFs9ldTrUwI1w5rqILM8pK1N7Rw==", "license": "MIT" } } diff --git a/package.json b/package.json index d6b7a00c..ecc55bf6 100644 --- a/package.json +++ b/package.json @@ -16,17 +16,12 @@ "build:core": "cd packages/core && npm run build", "build:dashboard": "npm install && cd packages/dashboard && npm run build", "build": "npm run build:core && npm run build:dashboard && npm install && npm run build:storybook && npm run build:landing", - "version:update-core": "cd packages/core && npm version minor", - "version:update-dashboard": "cd packages/dashboard && npm version minor", - "version:update-core-patch": "cd packages/core && npm version patch", - "version:update-dashboard-patch": "cd packages/dashboard && npm version patch", - "update:version-patch": "npm run version:update-core-patch && npm run version:update-dashboard-patch", - "update:version-minor": "npm run version:update-core && npm run version:update-dashboard", "publish:core": "npm run build:core && cd packages/core && npm publish", "publish:dashboard": "npm run build:dashboard && cd packages/dashboard && npm publish", "publish-dev:core": "npm run build:core && cd packages/core && npm publish --tag beta", "publish-dev:dashboard": "npm run build:dashboard && cd packages/dashboard && npm publish --tag beta", - "release": "npm run update:version-patch && bun run release.js" + "release-prod": "bun run release.js", + "release": "bun run release-dev.js" }, "dependencies": { "@popperjs/core": "^2.11.8", diff --git a/packages/core/package.json b/packages/core/package.json index 23110474..eafd4bfe 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@orchidui/core", "description": "Orchid UI, Library Vue 3 tailwind css", - "version": "1.0.22", + "version": "1.0.23-7", "type": "module", "scripts": { "build": "vite build" diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 8f440379..12036fd4 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -1,7 +1,7 @@ { "name": "@orchidui/dashboard", "description": "Orchid Dashboard UI , Dashboard Ui Library Vue 3 tailwind css", - "version": "1.0.22", + "version": "1.0.23-7", "type": "module", "scripts": { "build": "vite build" @@ -33,6 +33,6 @@ "rollup": "npm:@rollup/wasm-node" }, "dependencies": { - "@orchidui/core": "1.0.22" + "@orchidui/core": "1.0.23-6" } -} \ No newline at end of file +} diff --git a/release-dev.js b/release-dev.js new file mode 100644 index 00000000..e32de4d3 --- /dev/null +++ b/release-dev.js @@ -0,0 +1,23 @@ +import { exec } from 'child_process' +exec('cd packages/core && npm version prerelease') +exec('cd packages/dashboard && npm version prerelease') + +const { version } = require('./packages/core/package.json') +const fs = require('fs') +const packageJsonPath = './packages/dashboard/package.json' + +// Function to update a dependency version +function updateDependency(dependencyName, newVersion) { + // Read the package.json file + const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')) + // Check and update in dependencies + if (packageJson.dependencies && packageJson.dependencies[dependencyName]) { + packageJson.dependencies[dependencyName] = newVersion + console.log(`Updated ${dependencyName} to version ${newVersion} in dependencies.`) + } + // Write the updated package.json file back + fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8') + console.log('package.json updated successfully.') +} + +updateDependency('@orchidui/core', version) diff --git a/release.js b/release.js index d6018bf5..0743325d 100644 --- a/release.js +++ b/release.js @@ -1,3 +1,7 @@ +import { exec } from 'child_process' +exec('cd packages/core && npm version minor') +exec('cd packages/dashboard && npm version minor') + const { version } = require('./packages/core/package.json') const fs = require('fs')