Skip to content

Commit

Permalink
Fix script path and runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Jan 21, 2025
1 parent 0b3320b commit e3cddba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/autopublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: bun run changeset-release
createGithubReleases: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"postinstall": "cp manual-patches/sofa-api/package.json node_modules/sofa-api/",
"prepush": "bunx turbo run lint test typecheck --continue",
"generate-cms-json-schema": "typescript-json-schema ./packages/cms/tsconfig.json CmsConfigFile --include ./packages/cms/types.ts --out ./packages/cms/entities-json-schema.json --required --strictNullChecks --rejectDateType",
"nail-workspace-dependency-versions": "node scripts/nail-workspace-dependency-versions.js",
"nail-workspace-dependency-versions": "bun run scripts/nail-workspace-dependency-versions.ts",
"changeset-release": "bun run nail-workspace-dependency-versions && bunx changeset publish",
"create-changeset": "bunx changeset",
"reinstall": "rm -rf node_modules/ && find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + && bun install --force",
Expand Down
6 changes: 3 additions & 3 deletions scripts/nail-workspace-dependency-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import fs from 'fs'
// Find all package.json files (excluding node_modules)
const packageFilesUnfiltered = new Glob('./**/package.json').scanSync()

const packageFiles = packageFiles.filter((filePath) => !filePath.includes('node_modules'))
const packageFiles = new Array(...packageFilesUnfiltered).filter((filePath) => !filePath.includes('node_modules'))

// Create a map of package names to their versions
const packageVersions = {}
const packageVersions: Record<string, string> = {}
packageFiles.forEach((filePath) => {
const pkg = JSON.parse(fs.readFileSync(filePath, 'utf8'))
if (pkg.name && pkg.version) {
Expand All @@ -21,7 +21,7 @@ packageFiles.forEach((filePath) => {
let modified = false

// Helper function to process dependencies
const processDeps = (deps) => {
const processDeps = (deps: Record<string, string>) => {
if (!deps) return deps
const newDeps = { ...deps }

Expand Down

0 comments on commit e3cddba

Please sign in to comment.