Skip to content

Commit 2b7ebba

Browse files
authored
feat: replace prettier with oxfmt (#704)
* replace prettier with oxfmt * format * feat: support node: * build only changes sourcemaps * docs: changeset
1 parent 40c9e91 commit 2b7ebba

38 files changed

Lines changed: 390 additions & 331 deletions

.changeset/quiet-dragons-design.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"github-actions-cloudflare-pages": patch
3+
---
4+
5+
chore(deps-dev): replace prettier with oxfmt for code formatting

.devcontainer/devcontainer.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
{
3-
"name": "Container - Cloudflare Pages Action",
4-
"image": "mcr.microsoft.com/devcontainers/base:jammy",
5-
"customizations": {
6-
"vscode": {
7-
"extensions": [
8-
"dbaeumer.vscode-eslint",
9-
"eamodio.gitlens",
10-
"esbenp.prettier-vscode",
11-
"github.vscode-github-actions",
12-
"yoavbls.pretty-ts-errors",
13-
"redhat.vscode-yaml",
14-
"GraphQL.vscode-graphql",
15-
"GraphQL.vscode-graphql-syntax",
16-
"vitest.explorer"
17-
]
18-
}
19-
},
20-
"postCreateCommand": "sed -i '/^ZSH_THEME/c\\ZSH_THEME=\"bira\"' ~/.zshrc && pnpm i && pre-commit install",
21-
"updateContentCommand": "rm -rf .cache && pnpm i && pre-commit install",
22-
"features": {
23-
"ghcr.io/devcontainers-extra/features/act:1": {},
24-
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
25-
"ghcr.io/devcontainers/features/node:1": {
26-
"version": "24.7.0",
27-
"pnpmVersion": "10.15.1"
28-
},
29-
"ghcr.io/devcontainers/features/github-cli:1": {},
30-
"ghcr.io/devcontainers-extra/features/pre-commit:2": {}
31-
}
3+
"name": "Container - Cloudflare Pages Action",
4+
"image": "mcr.microsoft.com/devcontainers/base:jammy",
5+
"customizations": {
6+
"vscode": {
7+
"extensions": [
8+
"dbaeumer.vscode-eslint",
9+
"eamodio.gitlens",
10+
"oxc.oxc-vscode",
11+
"github.vscode-github-actions",
12+
"yoavbls.pretty-ts-errors",
13+
"redhat.vscode-yaml",
14+
"GraphQL.vscode-graphql",
15+
"GraphQL.vscode-graphql-syntax",
16+
"vitest.explorer"
17+
]
18+
}
19+
},
20+
"postCreateCommand": "sed -i '/^ZSH_THEME/c\\ZSH_THEME=\"bira\"' ~/.zshrc && pnpm i && pre-commit install",
21+
"updateContentCommand": "rm -rf .cache && pnpm i && pre-commit install",
22+
"features": {
23+
"ghcr.io/devcontainers-extra/features/act:1": {},
24+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
25+
"ghcr.io/devcontainers/features/node:1": {
26+
"version": "24.7.0",
27+
"pnpmVersion": "10.15.1"
28+
},
29+
"ghcr.io/devcontainers/features/github-cli:1": {},
30+
"ghcr.io/devcontainers-extra/features/pre-commit:2": {}
31+
}
3232

33-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
34-
// "remoteUser": "root"
33+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
34+
// "remoteUser": "root"
3535
}

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: ["andykenward"]
1+
github: ['andykenward']

.github/dependabot.yml

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ updates:
99
day: sunday
1010
cooldown:
1111
default-days: 5
12-
- package-ecosystem: "devcontainers"
13-
directory: "/"
12+
- package-ecosystem: 'devcontainers'
13+
directory: '/'
1414
schedule:
1515
interval: weekly
1616
day: sunday
@@ -29,41 +29,33 @@ updates:
2929
groups:
3030
graphql:
3131
patterns:
32-
- "@graphql-codegen/*"
33-
- "@graphql-typed-document-node/*"
34-
- "graphql"
35-
- "graphql-tag"
32+
- '@graphql-codegen/*'
33+
- '@graphql-typed-document-node/*'
34+
- 'graphql'
35+
- 'graphql-tag'
3636
vitest:
3737
patterns:
38-
- "@vitest*"
39-
- "vitest"
40-
- "vite"
38+
- '@vitest*'
39+
- 'vitest'
40+
- 'vite'
4141
eslint:
4242
patterns:
43-
- "@eslint/*"
44-
- "@types/eslint"
45-
- "@typescript-eslint/*"
46-
- "eslint"
47-
- "eslint-config-*"
48-
- "eslint-plugin-*"
49-
- "globals"
50-
- "typescript-eslint"
51-
exclude-patterns:
52-
- "eslint-config-prettier"
53-
prettier:
54-
patterns:
55-
- "prettier"
56-
- "eslint-config-prettier"
57-
- "@ianvs/prettier-plugin-sort-imports"
58-
- "prettier-plugin-packagejson"
43+
- '@eslint/*'
44+
- '@types/eslint'
45+
- '@typescript-eslint/*'
46+
- 'eslint'
47+
- 'eslint-config-*'
48+
- 'eslint-plugin-*'
49+
- 'globals'
50+
- 'typescript-eslint'
5951
octokit:
6052
patterns:
61-
- "@octokit/*"
62-
- "@octokit-next/*"
53+
- '@octokit/*'
54+
- '@octokit-next/*'
6355
cloudflare:
6456
patterns:
65-
- "@cloudflare/*"
66-
- "wrangler"
57+
- '@cloudflare/*'
58+
- 'wrangler'
6759
changesets:
6860
patterns:
69-
- "@changesets/*"
61+
- '@changesets/*'

.github/workflow-templates/delete.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 5
2020
steps:
21-
- name: "Checkout Github Action"
21+
- name: 'Checkout Github Action'
2222
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
23-
- name: "Deploy deletion from Cloudflare Pages"
23+
- name: 'Deploy deletion from Cloudflare Pages'
2424
uses: andykenward/github-actions-cloudflare-pages/delete@def80dd70ba3eb3d243520092bd303aa6454ec40 #v3.3.1
2525
with:
2626
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflow-templates/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
runs-on: ubuntu-latest
2020
timeout-minutes: 5
2121
steps:
22-
- name: "Checkout Github Action"
22+
- name: 'Checkout Github Action'
2323
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
24-
- name: "Deploy to Cloudflare Pages"
24+
- name: 'Deploy to Cloudflare Pages'
2525
uses: andykenward/github-actions-cloudflare-pages@def80dd70ba3eb3d243520092bd303aa6454ec40 #v3.3.1
2626
with:
2727
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/check-dist.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ on:
1414
branches:
1515
- main
1616
paths-ignore:
17-
- "**.md"
17+
- '**.md'
1818
pull_request:
1919
branches:
2020
- main
2121
paths-ignore:
22-
- "**.md"
22+
- '**.md'
2323
workflow_dispatch:
2424

2525
concurrency:
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
path: |
4242
~/.cache/
43-
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/eslint.config.js', '**/prettier.config.cjs', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
43+
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/eslint.config.js', '**/.oxfmtrc.json', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
4444
- name: Rebuild the dist/ directory
4545
run: pnpm run build
4646

.github/workflows/codeql.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
name: "CodeQL"
1+
name: 'CodeQL'
22
on:
33
push:
4-
branches: ["main"]
4+
branches: ['main']
55
pull_request:
6-
branches: ["main"]
6+
branches: ['main']
77
schedule:
8-
- cron: "34 6 * * 2"
8+
- cron: '34 6 * * 2'
99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212
jobs:
1313
analyze:
1414
name: Analyze
15-
runs-on: "ubuntu-latest"
15+
runs-on: 'ubuntu-latest'
1616
timeout-minutes: 360
1717
permissions:
1818
security-events: write
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
language: ["javascript-typescript", "actions"]
22+
language: ['javascript-typescript', 'actions']
2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
@@ -35,10 +35,10 @@ jobs:
3535
with:
3636
path: |
3737
~/.cache/
38-
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/eslint.config.js', '**/prettier.config.cjs', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
38+
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/eslint.config.js', '**/.oxfmtrc.json', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
3939
- name: Rebuild the dist/ directory
4040
run: pnpm run build
4141
- name: Perform CodeQL Analysis
4242
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 #v4.32.6
4343
with:
44-
category: "/language:${{matrix.language}}"
44+
category: '/language:${{matrix.language}}'

.github/workflows/deploy-delete.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
timeout-minutes: 5
2424
steps:
2525
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
26-
- id: "cloudflare-pages"
26+
- id: 'cloudflare-pages'
2727
uses: ./delete
2828
with:
2929
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
workflow_dispatch:
1212
inputs:
1313
environment:
14-
description: "Environment to run actiomn against"
14+
description: 'Environment to run actiomn against'
1515
type: environment
1616
required: false
1717

@@ -29,7 +29,7 @@ jobs:
2929
timeout-minutes: 5
3030
steps:
3131
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
32-
- id: "cloudflare-pages"
32+
- id: 'cloudflare-pages'
3333
uses: ./
3434
with:
3535
cloudflare-api-token: ${{secrets.CLOUDFLARE_API_TOKEN}}
@@ -39,7 +39,7 @@ jobs:
3939
github-token: ${{ secrets.GITHUB_TOKEN }}
4040
github-environment: ${{ inputs.environment || 'preview' }}
4141
working-directory: example
42-
- id: "cloudflare-pages-delete"
42+
- id: 'cloudflare-pages-delete'
4343
uses: ./delete
4444
# if main branch
4545
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)