Skip to content

Commit d549882

Browse files
committed
typescript-ify eslint config + meta updates + CI for publish
1 parent 32744d7 commit d549882

4 files changed

Lines changed: 78 additions & 28 deletions

File tree

.github/workflows/publish.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
packages: write
14+
id-token: write
15+
16+
jobs:
17+
publish:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
registry-url: "https://npm.pkg.github.com"
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: 10.26.x
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile && npm install -g npm@latest
36+
37+
- name: Build package
38+
run: pnpm build
39+
40+
- name: Create Release Pull Request or Publish
41+
uses: changesets/action@v1
42+
with:
43+
publish: pnpm changeset publish
44+
title: Release new tooling config version
45+
commit: Bump tooling configs
46+
commitMode: github-api
47+
createGithubReleases: true
48+
setupGitUser: true
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
NPM_TOKEN: ''
52+
NPM_CONFIG_PROVENANCE: true
File renamed without changes.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vsc-neuropilot/tooling-configurations",
3-
"version": "1.0.0",
3+
"version": "0.0.0",
44
"description": "VSC-NeuroPilot's npm tooling configurations",
55
"readme": "./README.md",
66
"files": [
@@ -27,7 +27,6 @@
2727
"devDependencies": {
2828
"@changesets/cli": "^2.29.7",
2929
"@rollup/plugin-commonjs": "^29.0.0",
30-
"@rollup/plugin-node-resolve": "^16.0.3",
3130
"@rollup/plugin-typescript": "^12.3.0",
3231
"@types/node": "^20.19.25",
3332
"esbuild": "^0.27.0",

rollup.config.js

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import typescript from '@rollup/plugin-typescript'
2-
import resolve from '@rollup/plugin-node-resolve'
32
import commonjs from '@rollup/plugin-commonjs'
43

54
const tsconfig = './tsconfig.json'
@@ -27,10 +26,8 @@ const config = [
2726
declarationDir: './dist/esbuild/types',
2827
rootDir: './esbuild'
2928
}),
30-
resolve(),
3129
commonjs()
32-
],
33-
external: ['esbuild']
30+
]
3431
},
3532
{
3633
input: 'esbuild/plugins.ts',
@@ -54,31 +51,33 @@ const config = [
5451
declarationDir: './dist/esbuild/types',
5552
rootDir: './esbuild'
5653
}),
57-
resolve(),
5854
commonjs()
5955
]
6056
},
61-
// {
62-
// input: 'eslint/index.mts',
63-
// output: [
64-
// {
65-
// file: 'dist/eslint/index.mjs',
66-
// format: 'esm',
67-
// sourcemap: true,
68-
// }
69-
// ],
70-
// plugins: [
71-
// typescript({
72-
// tsconfig,
73-
// declaration: true,
74-
// declarationDir: './dist/eslint/types',
75-
// rootDir: './eslint'
76-
// }),
77-
// resolve(),
78-
// commonjs()
79-
// ],
80-
// external: ['eslint']
81-
// }
57+
{
58+
input: 'eslint/index.mts',
59+
output: [
60+
{
61+
file: 'dist/eslint/index.mjs',
62+
format: 'esm',
63+
sourcemap: true,
64+
},
65+
{
66+
file: 'dist/eslint/index.cjs',
67+
format: 'cjs',
68+
sourcemap: true,
69+
}
70+
],
71+
plugins: [
72+
typescript({
73+
tsconfig,
74+
declaration: true,
75+
declarationDir: './dist/eslint/types',
76+
rootDir: './eslint'
77+
}),
78+
commonjs()
79+
]
80+
}
8281
]
8382

8483
export default config

0 commit comments

Comments
 (0)