Skip to content

Commit

Permalink
Merge pull request #313 from yhatt/update-dependent-packages
Browse files Browse the repository at this point in the history
Upgrade Node.js and dependent packages to the latest version
  • Loading branch information
yhatt authored Feb 11, 2024
2 parents 1e56115 + 266902d commit 67d6fb0
Show file tree
Hide file tree
Showing 10 changed files with 1,447 additions and 1,775 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ executors:
node-18:
working_directory: ~/jsx-slack
docker:
- image: cimg/node:18.18
- image: cimg/node:18.19

node-20:
working_directory: ~/jsx-slack
docker:
- image: cimg/node:20.9.0
- image: cimg/node:20.11.0

commands:
test:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.9.0
20.11.0
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- `JSXSlackTemplateTag` type now accepts pure readonly string array ([#312](https://github.com/yhatt/jsx-slack/pull/312))

### Changed

- Upgrade Node.js and dependent packages ([#313](https://github.com/yhatt/jsx-slack/pull/313))

## v6.1.1 - 2023-12-14

### Fixed
Expand Down
16 changes: 8 additions & 8 deletions docs/how-to-setup-jsx-transpiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ Or you can instruct to use jsx-slack in all TSX files by setting up `tsconfig.js
{
"compilerOptions": {
"jsx": "react-jsx", // or "react-jsxdev" for development
"jsxImportSource": "jsx-slack"
"jsxImportSource": "jsx-slack",
// ...
}
},
}
```

Expand Down Expand Up @@ -171,9 +171,9 @@ Please note that `jsxFrag` pragma is available only in [TypeScript >= 4.0](https
"jsx": "react",
"jsxFactory": "JSXSlack.h",
// NOTE: jsxFragmentFactory is available only in TypeScript >= v4.0.
"jsxFragmentFactory": "JSXSlack.Fragment"
"jsxFragmentFactory": "JSXSlack.Fragment",
// ...
}
},
}
```

Expand Down Expand Up @@ -235,9 +235,9 @@ console.log(
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "npm:jsx-slack@5"
"jsxImportSource": "npm:jsx-slack@5",
// ...
}
},
}
```

Expand Down Expand Up @@ -274,9 +274,9 @@ console.log(
"compilerOptions": {
"jsx": "react",
"jsxFactory": "JSXSlack.h",
"jsxFragmentFactory": "JSXSlack.Fragment"
"jsxFragmentFactory": "JSXSlack.Fragment",
// ...
}
},
}
```

Expand Down
51 changes: 25 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"format": "prettier \"**/*.{css,html,js,json,jsx,md,mjs,scss,ts,tsx,yaml,yml}\"",
"format:write": "yarn -s format --write",
"lint": "eslint --cache --ignore-pattern \"*.d.ts\" .",
"measure-font": "node ./tools/measure-font.js",
"measure-font": "NODE_PATH=$(npm exec --package=puppeteer --cmd \"which puppeteer | xargs dirname | xargs dirname\") node ./tools/measure-font.js",
"prepack": "npm-run-all -p check:* lint test:coverage -p test:esm types",
"preversion": "run-p check:* lint test:coverage",
"test": "jest",
Expand All @@ -83,53 +83,52 @@
"singleQuote": true
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.23.2",
"@rollup/plugin-alias": "^5.0.1",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/jest": "^29.5.7",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"babel-plugin-transform-rename-import": "^2.3.0",
"codemirror": "^5.65.5",
"cssnano": "^6.0.1",
"esbuild": "^0.19.5",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.6.0",
"cssnano": "^6.0.3",
"esbuild": "^0.20.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-react": "^7.33.2",
"hast-util-to-mdast": "10.1.0",
"he": "^1.2.0",
"htm": "^3.1.1",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"lodash.debounce": "^4.0.8",
"mdast-util-phrasing": "^4.0.0",
"mdast-util-phrasing": "^4.1.0",
"npm-run-all": "^4.1.5",
"pako": "^2.1.0",
"postcss": "^8.4.31",
"postcss": "^8.4.35",
"postcss-import": "^15.1.0",
"prettier": "^3.0.3",
"puppeteer": "^21.5.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"rollup": "^4.2.0",
"rollup": "^4.10.0",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-esbuild": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-serve": "^2.0.2",
"ts-jest": "^29.1.1",
"rollup-plugin-serve": "^1.1.1",
"ts-jest": "^29.1.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"typescript": "^5.3.3",
"unist-util-parents": "^3.0.0",
"unist-util-visit": "^5.0.0"
},
"dependencies": {
"@slack/types": "^2.9.0"
"@slack/types": "^2.11.0"
}
}
22 changes: 16 additions & 6 deletions test/block-kit/block-elements/interactive-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,9 @@ describe('Interactive components', () => {
JSXSlack(
<Blocks>
<Actions>
<Select>{}</Select>
<Select>
<></>
</Select>
</Actions>
</Blocks>,
),
Expand Down Expand Up @@ -1061,7 +1063,11 @@ describe('Interactive components', () => {
))

it('throws error when <Overflow> has no <OverflowItem> in children', () =>
expect(() => <Overflow>{}</Overflow>).toThrow())
expect(() => (
<Overflow>
<></>
</Overflow>
)).toThrow())

it('throws error when <Overflow> has 6 and more <OverflowItem> elements in children', () =>
expect(() => (
Expand Down Expand Up @@ -1385,9 +1391,11 @@ describe('Interactive components', () => {
))

it('throws error when <RadioButtonGroup> has not contained <RadioButton>', () => {
expect(() => <RadioButtonGroup>{}</RadioButtonGroup>).toThrow(
/must contain/i,
)
expect(() => (
<RadioButtonGroup>
<></>
</RadioButtonGroup>
)).toThrow(/must contain/i)

expect(() => (
<RadioButtonGroup>
Expand Down Expand Up @@ -1545,7 +1553,9 @@ describe('Interactive components', () => {
JSXSlack(
<Blocks>
<Actions>
<CheckboxGroup>{}</CheckboxGroup>
<CheckboxGroup>
<></>
</CheckboxGroup>
</Actions>
</Blocks>,
),
Expand Down
4 changes: 3 additions & 1 deletion test/block-kit/builtin-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ describe('Built-in components', () => {
expect(
JSXSlack(
<SelectFragment>
<Optgroup label="empty">{}</Optgroup>
<Optgroup label="empty">
<></>
</Optgroup>
</SelectFragment>,
),
).toStrictEqual({
Expand Down
7 changes: 4 additions & 3 deletions test/block-kit/container-components.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @jsx JSXSlack.h */
/** @jsxFrag JSXSlack.Fragment */
import { PlainTextElement, View } from '@slack/types'
import {
Actions,
Expand Down Expand Up @@ -333,7 +334,7 @@ describe('Container components', () => {
it('assigns submit_disabled field as true if defined submit as false', () => {
expect(
<Modal type="workflow_step" submit={false}>
{}
<></>
</Modal>,
).toStrictEqual({
type: 'workflow_step',
Expand All @@ -345,7 +346,7 @@ describe('Container components', () => {
it('assigns submit_disabled field as false if defined truthy value', () => {
expect(
<Modal type="workflow_step" submit>
{}
<></>
</Modal>,
).toStrictEqual({
type: 'workflow_step',
Expand All @@ -358,7 +359,7 @@ describe('Container components', () => {
expect(
// @ts-expect-error
<Modal type="modal" submit={false}>
{}
<></>
</Modal>,
).not.toHaveProperty('submit_disabled')
})
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"target": "es2019",
"noErrorTruncation": true
},
"include": ["src"]
"include": ["src", "test"]
}
Loading

0 comments on commit 67d6fb0

Please sign in to comment.