Skip to content

Commit 6019076

Browse files
authored
Merge pull request #19 from md2docx/optimize-toolchain
Optimize toolchain
2 parents 6d82de8 + 55b2e3a commit 6019076

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+732
-2774
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"access": "public",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
10-
"ignore": ["@example/*"]
10+
"ignore": ["@example/*", "@repo/*"]
1111
}

.deepsource.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ name = "javascript"
77
plugins = ["react"]
88
environment = [
99
"nodejs",
10-
"browser",
11-
"vitest"
12-
]
10+
"vitest",
11+
"browser"
12+
]

.github/workflows/manual-publish.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ jobs:
1717
with:
1818
token: ${{ secrets.GITHUB_TOKEN }}
1919

20-
- uses: actions/setup-node@v4
20+
- uses: pnpm/action-setup@v4
21+
name: Install pnpm
22+
with:
23+
run_install: true
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
2126
with:
2227
node-version: 20
23-
registry-url: https://registry.npmjs.org
28+
registry-url: "https://registry.npmjs.org"
29+
cache: "pnpm"
2430
- name: Setup Git
2531
run: |
2632
git config --global user.name "mayank1513"
2733
git config --global user.email "mayank.srmu@gmail.com"
28-
- run: npm i -g pnpm && pnpm i
29-
name: Install dependencies
30-
- run: pnpm build --filter @m2d/*
31-
name: Build @m2d/* packages
3234
# fail and not publish if any of the unit tests are failing
3335
- name: Test
3436
run: pnpm test
@@ -38,7 +40,7 @@ jobs:
3840
- name: Copy Readme file
3941
run: cp ./README.md ./lib # todo: uncomment this line while rebranding
4042
- name: Apply changesets, publish and create release, branches and tags
41-
run: node ./scripts/manual-publish.js
43+
run: pnpm tsx ./scripts/manual-publish.ts
4244
env:
4345
BRANCH: ${{ github.ref_name }}
4446
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}

.github/workflows/publish.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,27 @@ jobs:
2222
with:
2323
token: ${{ secrets.GITHUB_TOKEN }}
2424

25-
- uses: actions/setup-node@v4
25+
- uses: pnpm/action-setup@v4
26+
name: Install pnpm
27+
with:
28+
run_install: true
29+
- name: Install Node.js
30+
uses: actions/setup-node@v4
2631
with:
2732
node-version: 20
28-
registry-url: https://registry.npmjs.org
33+
registry-url: "https://registry.npmjs.org"
34+
cache: "pnpm"
2935
- name: Setup Git
3036
run: |
3137
git config --global user.name "mayank1513"
3238
git config --global user.email "mayank.srmu@gmail.com"
33-
- run: npm i -g pnpm && pnpm i
34-
name: Install dependencies
35-
- run: pnpm build --filter @m2d/*
36-
name: Build @m2d/* packages
37-
# fail and not publish if any of the unit tests are failing
3839
- name: Test
3940
run: pnpm test
4041
working-directory: ./lib
4142
- name: Copy Readme file
4243
run: cp ./README.md ./lib # will be uncommented while rebranding
4344
- name: Apply changesets, publish and create release, branches and tags
44-
run: node ./scripts/publish.js
45+
run: pnpm tsx ./scripts/publish.ts
4546
env:
4647
BRANCH: ${{ github.ref_name }}
4748
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}

.github/workflows/test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ jobs:
1313
contents: read
1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: actions/setup-node@v4
16+
- uses: pnpm/action-setup@v4
17+
name: Install pnpm
18+
with:
19+
run_install: true
20+
- name: Install Node.js
21+
uses: actions/setup-node@v4
1722
with:
1823
node-version: 20
19-
- run: npm i -g pnpm && pnpm i --no-frozen-lockfile
20-
name: Install dependencies
21-
- run: pnpm build --filter @m2d/*
22-
name: Build @m2d/* packages
24+
cache: "pnpm"
2325
- name: Run unit tests
2426
run: pnpm test
2527
working-directory: ./lib

.github/workflows/upgrade.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Update dependencies
33
on:
44
schedule:
55
- cron: "0 */8 * * *"
6+
workflow_dispatch:
7+
68
jobs:
79
update-deps:
810
runs-on: ubuntu-latest
@@ -13,22 +15,25 @@ jobs:
1315
with:
1416
token: ${{ secrets.GITHUB_TOKEN }}
1517

16-
- uses: actions/setup-node@v4
18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
20+
with:
21+
run_install: true
22+
- name: Install Node.js
23+
uses: actions/setup-node@v4
1724
with:
18-
registry-url: https://registry.npmjs.org
1925
node-version: 20
26+
cache: "pnpm"
2027
- name: Setup Git
2128
run: |
2229
git config --global user.name "mayank1513"
2330
git config --global user.email "mayank.srmu@gmail.com"
2431
git fetch
2532
git checkout main
2633
git pull
27-
- run: npm i -g pnpm && pnpm i --no-frozen-lockfile
28-
name: Install dependencies
2934
- run: git stash --include-untracked
3035
name: clean up working directory
31-
- run: pnpx @turbo/codemod update . && node ./scripts/upgrade.js
36+
- run: pnpm upgrade
3237
name: Update dependencies
3338
- run: pnpm build --filter @example/nextjs
3439
name: Build all apps to make sure it is not broken due to dependency upgrades

.husky/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|tsx|js|json)$' || true)
3+
[ -z "$FILES" ] && exit 0
4+
5+
biome check --write $FILES
6+
7+
git add $FILES

.turborepo-template.lst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fbc8209399d013c930c30f50dd19aba01ff17b79
1+
ef43c835da36607d3b9eb56788f9baf35b0dbe8a

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["esbenp.prettier-vscode", "mayank1513.trello-kanban-task-board"]
2+
"recommendations": ["mayank1513.trello-kanban-task-board"]
33
}

.vscode/settings.json

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
{
2-
// Formatting using Prettier by default for all languages
3-
"editor.defaultFormatter": "esbenp.prettier-vscode",
2+
// Formatting using Prettier by default for all languages
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
44

5-
// Ensure enough terminal history is preserved when running tests.
6-
"terminal.integrated.scrollback": 10000,
5+
// Ensure enough terminal history is preserved when running tests.
6+
"terminal.integrated.scrollback": 10000,
77

8-
// Disable TypeScript surveys.
9-
"typescript.surveys.enabled": false,
8+
// Disable TypeScript surveys.
9+
"typescript.surveys.enabled": false,
1010

11-
"editor.tabSize": 2,
12-
"editor.wordWrap": "on",
13-
"editor.formatOnSave": true,
14-
"editor.formatOnPaste": true,
15-
"editor.formatOnSaveMode": "file",
16-
"mayank1513.trello-kanban.Workspace.filePath": ".tkb",
17-
"cSpell.words": [
18-
"mdast",
19-
"skipcq"
20-
]
11+
"editor.tabSize": 2,
12+
"editor.wordWrap": "on",
13+
"editor.formatOnSave": true,
14+
"editor.formatOnPaste": true,
15+
"editor.formatOnSaveMode": "file",
16+
"mayank1513.trello-kanban.Workspace.filePath": ".tkb",
17+
"cSpell.words": ["mdast", "skipcq"]
2118
}

0 commit comments

Comments
 (0)