Skip to content

Commit 987dbb1

Browse files
alexeyr-cialexeyr
andauthored
Check published types in CI (#1702)
* Check published types in CI * Dedupe dependencies --------- Co-authored-by: Alexey Romanov <[email protected]>
1 parent 35a6aae commit 987dbb1

File tree

5 files changed

+332
-888
lines changed

5 files changed

+332
-888
lines changed

.github/workflows/lint-js-and-ruby.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ jobs:
8787
run: yarn start format.listDifferent
8888
- name: Type-check TypeScript
8989
run: yarn run type-check
90+
- name: Lint package publishing
91+
# --profile because we don't care about node10
92+
# --ignore-rules CJS default export can't be resolved at the moment,
93+
# revisit in 15.0.0
94+
run: yarn run attw --pack . --profile node16 --ignore-rules cjs-only-exports-default
9095
# We only download and run Actionlint if there is any difference in GitHub Action workflows
9196
# https://github.com/rhysd/actionlint/blob/main/docs/usage.md#on-github-actions
9297
- name: Check for GitHub Actions changes

knip.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const config: KnipConfig = {
2424
// though we don't actually use its rules anywhere.
2525
'eslint-plugin-jsx-a11y',
2626
'eslint-plugin-react',
27+
// Used in CI
28+
'@arethetypeswrong/cli',
2729
],
2830
},
2931
'spec/dummy': {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-on-rails",
33
"version": "14.1.1",
44
"description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5-
"main": "node_package/lib/ReactOnRails.js",
5+
"main": "node_package/lib/ReactOnRails.full.js",
66
"exports": {
77
".": {
88
"node": "./node_package/lib/ReactOnRails.node.js",
@@ -14,6 +14,7 @@
1414
"doc": "docs"
1515
},
1616
"devDependencies": {
17+
"@arethetypeswrong/cli": "^0.17.4",
1718
"@babel/core": "^7.20.12",
1819
"@babel/preset-env": "^7.20.2",
1920
"@tsconfig/node14": "^14.1.2",

script/convert

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ File.rename(old_config, new_config)
1515

1616
gsub_file_content("../Gemfile.development_dependencies", 'gem "shakapacker", "8.0.0"', 'gem "shakapacker", "6.6.0"')
1717

18-
# Knip doesn't work on the oldest supported Node version and isn't needed there anyway
18+
# The below packages don't work on the oldest supported Node version and aren't needed there anyway
1919
gsub_file_content("../package.json", /"knip": "[^"]*",/, "")
20+
gsub_file_content("../package.json", %r{"@arethetypeswrong/cli": "[^"]*",}, "")
2021

2122
gsub_file_content("../spec/dummy/package.json", '"shakapacker": "8.0.0",', '"shakapacker": "6.6.0",')
2223

0 commit comments

Comments
 (0)