Skip to content

Commit f6b85d9

Browse files
committed
chore: merge w main
2 parents 118788e + 7891a91 commit f6b85d9

30 files changed

Lines changed: 256 additions & 270 deletions

.changeset/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changesets
2+
3+
This directory contains [**Changesets**](https://github.com/changesets/changesets) which are markdown files that describe package changes for the next release.
4+
5+
For guidance on when and how to add changesets, checkout the [Maintainer's Guide](../.github/maintainers_guide.md#-updating-changesets).

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,11 @@ updates:
206206
- "github_actions"
207207
schedule:
208208
interval: "monthly"
209+
210+
- package-ecosystem: "npm"
211+
directory: "/"
212+
labels:
213+
- "dependencies"
214+
- "javascript"
215+
schedule:
216+
interval: "weekly"

.github/maintainers_guide.md

Lines changed: 75 additions & 116 deletions
Large diffs are not rendered by default.

.github/workflows/ci-build.yml

Lines changed: 25 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -33,56 +33,39 @@ jobs:
3333
run: |
3434
git config --global core.autocrlf false
3535
git config --global core.eol lf
36-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
36+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3737
with:
3838
persist-credentials: false
3939
- name: Use Node.js ${{ matrix.node-version }}
40-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
40+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4141
with:
4242
node-version: ${{ matrix.node-version }}
4343
- run: npm --version
44-
- run: npm install --verbose
45-
working-directory: packages/${{ matrix.package }}
46-
- name: Link dependent packages (*nix)
47-
if: matrix.os == 'ubuntu-latest'
48-
working-directory: packages/${{ matrix.package }}
44+
- name: Install dependencies
4945
run: |
50-
# depending on which package we are testing, also npm link up dependent packages within this monorepo
51-
case "$PWD" in
52-
*/webhook) pushd ../types && npm i && popd && npm link ../types;;
53-
*/web-api) pushd ../types && npm i && popd && npm link ../types && pushd ../logger && npm i && popd && npm link ../logger;;
54-
*/oauth) pushd ../logger && npm i && popd && npm link ../logger && pushd ../web-api && npm i && popd && npm link ../web-api;;
55-
*/socket-mode) pushd ../logger && npm i && popd && npm link ../logger && pushd ../web-api && npm i && popd && npm link ../web-api;;
56-
*) ;; # default
57-
esac
58-
- name: Link dependent packages (Windows)
59-
if: matrix.os == 'windows-latest'
60-
working-directory: packages/${{ matrix.package }}
46+
npm install --verbose
47+
- name: Build packages
48+
run: |
49+
# Build packages without internal dependencies
50+
npm run build --workspace=@slack/cli-hooks
51+
npm run build --workspace=@slack/cli-test
52+
53+
# Build base dependencies
54+
npm run build --workspace=@slack/logger
55+
npm run build --workspace=@slack/types
56+
57+
# Build packages requiring base dependencies
58+
npm run build --workspace=@slack/web-api
59+
npm run build --workspace=@slack/webhook
60+
61+
# Build packages that depend on the Web API
62+
npm run build --workspace=@slack/oauth
63+
npm run build --workspace=@slack/rtm-api
64+
npm run build --workspace=@slack/socket-mode
65+
- name: Run tests
6166
run: |
62-
# depending on which package we are testing, also npm link up dependent packages within this monorepo
63-
# NOTE: the following is PowerShell
64-
echo "$pwd"
65-
switch -Wildcard ( "$pwd" )
66-
{
67-
'*\webhook'
68-
{
69-
pushd ..\types && npm i && popd && npm link ..\types
70-
}
71-
'*\web-api'
72-
{
73-
pushd ..\types && npm i && popd && npm link ..\types && pushd ..\logger && npm i && popd && npm link ..\logger
74-
}
75-
'*\oauth'
76-
{
77-
pushd ..\logger && npm i && popd && npm link ..\logger && pushd ..\web-api && npm i && popd && npm link ..\web-api
78-
}
79-
'*\socket-mode'
80-
{
81-
pushd ..\logger && npm i && popd && npm link ..\logger && pushd ..\web-api && npm i && popd && npm link ..\web-api
82-
}
83-
}
84-
- run: npm test
85-
working-directory: packages/${{ matrix.package }}
67+
npm run lint
68+
npm test --workspace=@slack/${{ matrix.package }}
8669
- name: Check for coverage report existence
8770
id: check_coverage
8871
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
environment: publish
16+
permissions:
17+
contents: write
18+
id-token: write # OIDC: https://docs.npmjs.com/trusted-publishers
19+
pull-requests: write
20+
steps:
21+
- name: Checkout Repo
22+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
23+
with:
24+
persist-credentials: true
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
28+
with:
29+
node-version: 24
30+
registry-url: "https://registry.npmjs.org"
31+
32+
- name: Install dependencies
33+
run: npm install
34+
35+
- name: Gather changesets
36+
uses: changesets/action@c48e67d110a68bc90ccf1098e9646092baacaa87 # v1.6.0
37+
with:
38+
createGithubReleases: true
39+
commit: "chore: release"
40+
title: "chore: release"
41+
publish: npm run changeset -- publish
42+
version: npm run changeset -- version
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

biome.json

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
}
88
}
99
},
10+
"files": {
11+
"includes": [
12+
"packages/**",
13+
"!!packages/client",
14+
"!!packages/events-api",
15+
"!!packages/interactive-messages"
16+
]
17+
},
1018
"formatter": {
1119
"enabled": true,
1220
"formatWithErrors": false,
@@ -44,5 +52,30 @@
4452
"enabled": true,
4553
"clientKind": "git",
4654
"useIgnoreFile": true
47-
}
55+
},
56+
"overrides": [
57+
{
58+
"includes": ["packages/web-api/src/types/response/**/*.ts"],
59+
"linter": {
60+
"rules": {
61+
"complexity": {
62+
"noBannedTypes": "off"
63+
},
64+
"suspicious": {
65+
"noExplicitAny": "off"
66+
}
67+
}
68+
}
69+
},
70+
{
71+
"includes": ["packages/web-api/src/index.ts"],
72+
"assist": {
73+
"actions": {
74+
"source": {
75+
"organizeImports": "off"
76+
}
77+
}
78+
}
79+
}
80+
]
4881
}

package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@slack",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/slackapi/node-slack-sdk.git"
9+
},
10+
"workspaces": [
11+
"packages/cli-hooks",
12+
"packages/cli-test",
13+
"packages/logger",
14+
"packages/oauth",
15+
"packages/rtm-api",
16+
"packages/socket-mode",
17+
"packages/types",
18+
"packages/web-api",
19+
"packages/webhook"
20+
],
21+
"scripts": {
22+
"changeset": "npx @changesets/cli",
23+
"lint": "npx @biomejs/biome check packages",
24+
"lint:fix": "npx @biomejs/biome check --write packages"
25+
},
26+
"devDependencies": {
27+
"@biomejs/biome": "^2.0.5",
28+
"@changesets/cli": "^2.29.8"
29+
}
30+
}

packages/cli-hooks/biome.json

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

packages/cli-hooks/package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@
3535
"url": "https://github.com/slackapi/node-slack-sdk/issues"
3636
},
3737
"scripts": {
38-
"prebuild": "shx rm -rf ./coverage",
3938
"build": "shx chmod +x src/*.js",
39+
"prebuild": "shx rm -rf ./coverage",
4040
"prelint": "tsc --noemit --module es2022 --maxNodeModuleJsDepth 0 --project ./jsconfig.json",
41-
"lint": "npx @biomejs/biome check .",
42-
"lint:fix": "npx @biomejs/biome check --write .",
43-
"pretest": "npm run lint",
4441
"test": "c8 --config ./test/.c8rc.json mocha --config ./test/.mocharc.json src/*.spec.js"
4542
},
4643
"bin": {
@@ -55,7 +52,6 @@
5552
"semver": "^7.5.4"
5653
},
5754
"devDependencies": {
58-
"@biomejs/biome": "^2.0.5",
5955
"@types/minimist": "^1.2.5",
6056
"@types/mocha": "^10.0.6",
6157
"@types/node": "^25.0.3",

0 commit comments

Comments
 (0)