Skip to content

Commit

Permalink
Merge branch 'master' into feature/make-locations-visible-intellij
Browse files Browse the repository at this point in the history
  • Loading branch information
daniilsapa committed Dec 24, 2024
2 parents 32bc7eb + 58c325a commit 9a396c8
Show file tree
Hide file tree
Showing 15 changed files with 1,347 additions and 1,318 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/pkg-pr-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Approved Pull Requests to pkg.pr.new
on:
pull_request_review:
types: [submitted]

permissions:
contents: read
pull-requests: read

jobs:
check:
# First, trigger a permissions check on the user approving the pull request.
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
outputs:
has-permissions: ${{ steps.checkPermissions.outputs.result }}
steps:
- name: Check permissions
id: checkPermissions
uses: actions/github-script@v7
with:
result-encoding: string
# The approver must have write access to the repository to trigger the package preview.
script: |
const { data: { permission } } =
await github.rest.repos.getCollaboratorPermissionLevel({
...context.repo,
username: context.actor,
});
return permission === 'write' || permission === 'admin';
publish:
needs: check
# Publish the preview package only if the permissions check passed.
if: needs.check.outputs.has-permissions == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm exec turbo build

- run: pnpm dlx pkg-pr-new publish './packages/*'
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
"name": "@steiger/root",
"private": true,
"scripts": {
"format": "prettier --write . \"!packages/** !tooling/**\" --cache",
"check-formatting": "prettier --check . \"!packages/** !tooling/**\" --cache",
"format": "prettier --cache --write . \"!packages/**\" \"!tooling/**\"",
"check-formatting": "prettier --cache --check . \"!packages/**\" \"!tooling/**\"",
"check-monorepo": "manypkg check",
"prepare": "husky"
},
"engines": {
"node": ">= 20"
"node": ">= 18"
},
"packageManager": "[email protected]",
"dependencies": {
"@changesets/cli": "^2.27.9",
"@manypkg/cli": "^0.21.4",
"devDependencies": {
"@changesets/cli": "^2.27.10",
"@manypkg/cli": "^0.23.0",
"@steiger/eslint-config": "workspace:*",
"@tsconfig/node-lts": "^20.1.3",
"eslint": "^9.12.0",
"husky": "^9.1.6",
"eslint": "^9.16.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"turbo": "^2.1.3"
"prettier": "^3.4.2",
"turbo": "^2.3.3"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown",
Expand Down
12 changes: 6 additions & 6 deletions packages/pretty-reporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
"@steiger/eslint-config": "workspace:*",
"@steiger/tsconfig": "workspace:*",
"@steiger/types": "workspace:*",
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^20.16.11",
"eslint": "^9.12.0",
"prettier": "^3.3.3",
"tsx": "^4.19.1",
"typescript": "^5.6.3"
"@total-typescript/ts-reset": "^0.6.1",
"@types/node": "^18.11.9",
"eslint": "^9.16.0",
"prettier": "^3.4.2",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
},
"dependencies": {
"chalk": "^5.3.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/steiger-plugin-fsd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"@steiger/eslint-config": "workspace:*",
"@steiger/toolkit": "workspace:*",
"@steiger/tsconfig": "workspace:*",
"@total-typescript/ts-reset": "^0.5.1",
"@total-typescript/ts-reset": "^0.6.1",
"@types/lodash-es": "^4.17.12",
"@types/pluralize": "^0.0.33",
"tsup": "^8.3.0",
"typescript": "^5.6.3",
"vitest": "^1.6.0"
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
}
}
2 changes: 1 addition & 1 deletion packages/steiger-plugin-fsd/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import segmentsByPurpose from './segments-by-purpose/index.js'
import sharedLibGrouping from './shared-lib-grouping/index.js'
import typoInLayerName from './typo-in-layer-name/index.js'
import noProcesses from './no-processes/index.js'
import packageJson from '../package.json'
import packageJson from '../package.json' with { type: 'json' }

const rules = [
ambiguousSliceNames,
Expand Down
4 changes: 2 additions & 2 deletions packages/steiger/cjs-shim.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Source: https://github.com/evanw/esbuild/issues/1921#issuecomment-1898197331

import { createRequire } from 'node:module'
import module from 'node:module'
import path from 'node:path'
import url from 'node:url'

globalThis.require = createRequire(import.meta.url)
globalThis.require = module.createRequire(import.meta.url)
globalThis.__filename = url.fileURLToPath(import.meta.url)
globalThis.__dirname = path.dirname(__filename)
14 changes: 7 additions & 7 deletions packages/steiger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
],
"dependencies": {
"@feature-sliced/steiger-plugin": "workspace:*",
"chokidar": "^3.6.0",
"chokidar": "^4.0.1",
"cosmiconfig": "^9.0.0",
"effector": "^23.2.3",
"globby": "^14.0.2",
Expand All @@ -51,7 +51,7 @@
"patronum": "^2.3.0",
"prexit": "^2.3.0",
"yargs": "^17.7.2",
"zod": "^3.23.8",
"zod": "^3.24.0",
"zod-validation-error": "^3.4.0"
},
"devDependencies": {
Expand All @@ -60,12 +60,12 @@
"@steiger/toolkit": "workspace:*",
"@steiger/tsconfig": "workspace:*",
"@steiger/types": "workspace:*",
"@total-typescript/ts-reset": "^0.5.1",
"@total-typescript/ts-reset": "^0.6.1",
"@types/lodash-es": "^4.17.12",
"@types/yargs": "^17.0.33",
"tsup": "^8.3.0",
"tsx": "^4.19.1",
"typescript": "^5.6.3",
"vitest": "^1.6.0"
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
}
}
1 change: 0 additions & 1 deletion packages/steiger/src/features/transfer-fs-to-vfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export async function createWatcher(path: string) {
ignoreInitial: false,
alwaysStat: true,
awaitWriteFinish: true,
disableGlobbing: true,
cwd: path,
})

Expand Down
10 changes: 5 additions & 5 deletions packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
],
"peerDependencies": {
"vitest": "^1.6.0"
"vitest": "^2.1.8"
},
"peerDependenciesMeta": {
"vitest": {
Expand All @@ -41,9 +41,9 @@
"@steiger/eslint-config": "workspace:*",
"@steiger/tsconfig": "workspace:*",
"@steiger/types": "workspace:*",
"@total-typescript/ts-reset": "^0.5.1",
"tsup": "^8.3.0",
"typescript": "^5.6.3",
"vitest": "^1.6.0"
"@total-typescript/ts-reset": "^0.6.1",
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
}
}
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
"devDependencies": {
"@steiger/tsconfig": "workspace:*",
"@types/node": "^20.16.11",
"typescript": "^5.6.3"
"@types/node": "^18.11.9",
"typescript": "^5.7.2"
}
}
Loading

0 comments on commit 9a396c8

Please sign in to comment.