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' node-version: '20'
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm run build - run: npm run build
- run: npm test - run: npm test
@@ -56,16 +58,15 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
if: steps.version.outputs.version_tag != '' if: steps.version.outputs.version_tag != ''
with: with:
node-version: '24' node-version: '20'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Run GoReleaser - name: Publish to npm
if: steps.version.outputs.version_tag != '' if: steps.version.outputs.version_tag != ''
uses: goreleaser/goreleaser-action@v6 run: |
with: npm ci
distribution: goreleaser npm version ${{ steps.version.outputs.version }} --no-git-tag-version
version: latest npm publish --access public
args: release --clean
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+1
View File
@@ -1,3 +1,4 @@
node_modules node_modules
.envrc .envrc
.goreleaser-dist .goreleaser-dist
.beep
+3
View File
@@ -3,6 +3,9 @@
project_name: cloudflare-crawl-mcp project_name: cloudflare-crawl-mcp
builds:
- skip: true
dist: .goreleaser-dist dist: .goreleaser-dist
before: before:
+9 -4
View File
@@ -213,12 +213,17 @@ Examples:
### Commands ### Commands
```bash ```bash
npm run build # Build TypeScript npm install # Install dependencies
npm start # Run server npm run typecheck # Type check with tsc
npm test # Run tests npm run lint # Lint with ESLint
npm run test:watch # Run tests in watch mode 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 ### Testing
The project includes comprehensive tests covering: 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", "start": "node dist/index.js",
"test": "vitest run", "test": "vitest run",
"test:watch": "vitest", "test:watch": "vitest",
"lint": "eslint src --ext .ts",
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run build" "prepublishOnly": "npm run build"
}, },
"dependencies": { "dependencies": {
@@ -17,9 +19,17 @@
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^25.4.0", "@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": "^5.9.3",
"typescript-eslint": "^8.26.1",
"vitest": "^4.0.18" "vitest": "^4.0.18"
}, },
"engines": {
"node": ">=18.0.0"
},
"publishConfig": { "publishConfig": {
"access": "public" "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"; const API_BASE = "https://api.cloudflare.com/client/v4";