diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 9a6d34f0c..037e25aec 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -15,17 +15,18 @@ jobs: example: - examples/getting-started-typescript - examples/custom-receiver + - examples/oauth-express-receiver steps: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - uses: actions/checkout@v4 - - name: Install dependencies and link bolt-js - run: npm i && npm link . - - name: Install example dependencies and link bolt-js + - name: Package the latest changes to bolt-js + run: npm i && npm pack . && rm -rf node_modules + - name: Install example dependencies for testing working-directory: ${{ matrix.example }} - run: npm i && npm link @slack/bolt + run: npm i && npm i ../../slack-bolt-*.tgz - name: Compile sample working-directory: ${{ matrix.example }} run: npm run build @@ -46,18 +47,17 @@ jobs: uses: actions/checkout@v4 with: path: ./bolt-js - - name: Install and link bolt-js + - name: Package the latest changes to bolt-js working-directory: ./bolt-js - run: npm i && npm link . + run: npm i && npm pack . && rm -rf node_modules - name: Checkout ${{ matrix.sample }} uses: actions/checkout@v4 with: repository: ${{ matrix.sample }} path: ./sample - - name: Install sample dependencies and link bolt-js + - name: Install sample dependencies for testing working-directory: ./sample - run: npm i && npm link @slack/bolt + run: npm i && npm i ../bolt-js/slack-bolt-*.tgz - name: Compile sample working-directory: ./sample run: npx tsc - diff --git a/examples/oauth-express-receiver/app.js b/examples/oauth-express-receiver/app.js index 779812ba9..988d2554f 100644 --- a/examples/oauth-express-receiver/app.js +++ b/examples/oauth-express-receiver/app.js @@ -1,5 +1,10 @@ const { App, ExpressReceiver, LogLevel, FileInstallationStore } = require('@slack/bolt'); +/** + * @type {import("@slack/bolt/dist/receivers/ParamsIncomingMessage").ParamsIncomingMessage}; + */ +const _example = null; + // Create an ExpressReceiver const receiver = new ExpressReceiver({ signingSecret: process.env.SLACK_SIGNING_SECRET, diff --git a/examples/oauth-express-receiver/package.json b/examples/oauth-express-receiver/package.json index 3b07a1369..dcc6d7398 100644 --- a/examples/oauth-express-receiver/package.json +++ b/examples/oauth-express-receiver/package.json @@ -5,11 +5,14 @@ "main": "app.js", "scripts": { "start": "node app.js", - "test": "echo \"Error: no test specified\" && exit 1" + "build": "npx tsc --allowJs --noEmit --esModuleInterop app.js" }, "author": "Slack Technologies, Inc.", "license": "MIT", "dependencies": { "@slack/bolt": "^3.6.0" + }, + "devDependencies": { + "typescript": "^5.7.2" } }