Skip to content

Commit 4d6adc4

Browse files
authored
Merge pull request #94 from hackmdio/release/2.4.0
Releaes 2.4.0
2 parents 4df792b + a3158ef commit 4d6adc4

Some content is hidden

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

41 files changed

+9551
-5963
lines changed

.env.example

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
HMD_API_ENDPOINT_URL=
2-
HMD_API_ACCESS_TOKEN=
1+
# HackMD CLI Integration Test Configuration
2+
# Copy this file to .env and fill in your test values
3+
4+
# HackMD API endpoint URL (defaults to localhost:3000)
5+
# For local HackMD server, use: http://localhost:3000/api/openAPI/v1
6+
HMD_API_ENDPOINT_URL=http://localhost:3000/api/openAPI/v1
7+
8+
# Access token for testing (required for integration tests)
9+
HMD_API_ACCESS_TOKEN=your_access_token_here

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/config-test.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: ['18']
12+
node-version: ['24']
1313

1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
17+
18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 10.28.0
22+
1723
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v2
24+
uses: actions/setup-node@v4
1925
with:
20-
node-version: ${{ matrix.node-version }}
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'pnpm'
28+
2129
- name: Install dependencies
22-
run: npm install
23-
- run: npm run test
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Run tests
33+
run: pnpm run test
2434

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
name: Publish to npm
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 10.28.0
25+
26+
- name: Use Node.js 24
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '24'
30+
registry-url: 'https://registry.npmjs.org'
31+
cache: 'pnpm'
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Build project
37+
run: pnpm run build
38+
39+
- name: Run tests
40+
run: pnpm run test
41+
42+
- name: Publish to npm
43+
run: npm publish

.github/workflows/test.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
unit-test:
11+
name: Unit Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 10.28.0
22+
23+
- name: Use Node.js 24
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '24'
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Run unit tests
33+
run: pnpm run test:unit
34+
35+
smoke-test:
36+
name: Smoke Tests
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
43+
- name: Setup pnpm
44+
uses: pnpm/action-setup@v4
45+
with:
46+
version: 10.28.0
47+
48+
- name: Use Node.js 24
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '24'
52+
cache: 'pnpm'
53+
54+
- name: Install dependencies
55+
run: pnpm install --frozen-lockfile
56+
57+
- name: Build project
58+
run: pnpm run build
59+
60+
- name: Run smoke tests
61+
run: pnpm exec mocha --forbid-only "test/smoke/**/*.test.ts"

.gitignore

Lines changed: 142 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,150 @@
33
/.nyc_output
44
/dist
55
/lib
6-
/package-lock.json
76
/tmp
87
node_modules
98
oclif.manifest.json
109

1110
.env
11+
12+
# Logs
13+
logs
14+
*.log
15+
npm-debug.log*
16+
yarn-debug.log*
17+
yarn-error.log*
18+
lerna-debug.log*
19+
20+
# Diagnostic reports (https://nodejs.org/api/report.html)
21+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
22+
23+
# Runtime data
24+
pids
25+
*.pid
26+
*.seed
27+
*.pid.lock
28+
29+
# Directory for instrumented libs generated by jscoverage/JSCover
30+
lib-cov
31+
32+
# Coverage directory used by tools like istanbul
33+
coverage
34+
*.lcov
35+
36+
# nyc test coverage
37+
.nyc_output
38+
39+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
40+
.grunt
41+
42+
# Bower dependency directory (https://bower.io/)
43+
bower_components
44+
45+
# node-waf configuration
46+
.lock-wscript
47+
48+
# Compiled binary addons (https://nodejs.org/api/addons.html)
49+
build/Release
50+
51+
# Dependency directories
52+
node_modules/
53+
jspm_packages/
54+
55+
# Snowpack dependency directory (https://snowpack.dev/)
56+
web_modules/
57+
58+
# TypeScript cache
59+
*.tsbuildinfo
60+
61+
# Optional npm cache directory
62+
.npm
63+
64+
# Optional eslint cache
65+
.eslintcache
66+
67+
# Optional stylelint cache
68+
.stylelintcache
69+
70+
# Optional REPL history
71+
.node_repl_history
72+
73+
# Output of 'npm pack'
74+
*.tgz
75+
76+
# Yarn Integrity file
77+
.yarn-integrity
78+
79+
# dotenv environment variable files
80+
.env
81+
.env.*
82+
!.env.example
83+
84+
# parcel-bundler cache (https://parceljs.org/)
85+
.cache
86+
.parcel-cache
87+
88+
# Next.js build output
89+
.next
90+
out
91+
92+
# Nuxt.js build / generate output
93+
.nuxt
94+
dist
95+
.output
96+
97+
# Gatsby files
98+
.cache/
99+
# Comment in the public line in if your project uses Gatsby and not Next.js
100+
# https://nextjs.org/blog/next-9-1#public-directory-support
101+
# public
102+
103+
# vuepress build output
104+
.vuepress/dist
105+
106+
# vuepress v2.x temp and cache directory
107+
.temp
108+
.cache
109+
110+
# Sveltekit cache directory
111+
.svelte-kit/
112+
113+
# vitepress build output
114+
**/.vitepress/dist
115+
116+
# vitepress cache directory
117+
**/.vitepress/cache
118+
119+
# Docusaurus cache and generated files
120+
.docusaurus
121+
122+
# Serverless directories
123+
.serverless/
124+
125+
# FuseBox cache
126+
.fusebox/
127+
128+
# DynamoDB Local files
129+
.dynamodb/
130+
131+
# Firebase cache directory
132+
.firebase/
133+
134+
# TernJS port file
135+
.tern-port
136+
137+
# Stores VSCode versions used for testing VSCode extensions
138+
.vscode-test
139+
140+
# yarn v3
141+
.pnp.*
142+
.yarn/*
143+
!.yarn/patches
144+
!.yarn/plugins
145+
!.yarn/releases
146+
!.yarn/sdks
147+
!.yarn/versions
148+
149+
# Vite files
150+
vite.config.js.timestamp-*
151+
vite.config.ts.timestamp-*
152+
.vite/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
24

0 commit comments

Comments
 (0)