fixup! - [x] Remove npm ci and version steps from release.yml - [x] Add .goreleaser-dist to .gitignore - [x] Configure dist dir and before hook in goreleaser.yaml

This commit is contained in:
2026-03-11 22:43:04 +00:00
parent 0249d13265
commit ce4ad31750
8 changed files with 1061 additions and 3915 deletions
+10 -9
View File
@@ -27,6 +27,8 @@ jobs:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm run build
- run: npm test
@@ -56,16 +58,15 @@ jobs:
- uses: actions/setup-node@v4
if: steps.version.outputs.version_tag != ''
with:
node-version: '24'
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Run GoReleaser
- name: Publish to npm
if: steps.version.outputs.version_tag != ''
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
run: |
npm ci
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
npm publish --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+1
View File
@@ -1,3 +1,4 @@
node_modules
.envrc
.goreleaser-dist
.beep
+3
View File
@@ -3,6 +3,9 @@
project_name: cloudflare-crawl-mcp
builds:
- skip: true
dist: .goreleaser-dist
before:
+9 -4
View File
@@ -213,12 +213,17 @@ Examples:
### Commands
```bash
npm run build # Build TypeScript
npm start # Run server
npm test # Run tests
npm run test:watch # Run tests in watch mode
npm install # Install dependencies
npm run typecheck # Type check with tsc
npm run lint # Lint with ESLint
npm run build # Build TypeScript
npm start # Run server
npm test # Run tests
npm run test:watch # Run tests in watch mode
```
CI runs typecheck, lint, build and test.
### Testing
The project includes comprehensive tests covering:
+20
View File
@@ -0,0 +1,20 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{ ignores: ['dist/**', 'node_modules/**'] },
js.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
parserOptions: {
project: true,
},
},
rules: {
'no-console': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
},
);
+1007 -3901
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -10,6 +10,8 @@
"start": "node dist/index.js",
"test": "vitest run",
"test:watch": "vitest",
"lint": "eslint src --ext .ts",
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run build"
},
"dependencies": {
@@ -17,9 +19,17 @@
},
"devDependencies": {
"@types/node": "^25.4.0",
"@typescript-eslint/eslint-plugin": "^8.26.1",
"@typescript-eslint/parser": "^8.26.1",
"eslint": "^9.25.0",
"eslint-formatter-compact": "^9.0.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.26.1",
"vitest": "^4.0.18"
},
"engines": {
"node": ">=18.0.0"
},
"publishConfig": {
"access": "public"
}
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { describe, it, expect, beforeEach, vi } from 'vitest';
const API_BASE = "https://api.cloudflare.com/client/v4";