Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/lint-js-and-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ jobs:
run: yarn start format.listDifferent
- name: Type-check TypeScript
run: yarn run type-check
- name: Lint package publishing
# --profile because we don't care about node10
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolving ReactOnRails/client under --moduleResolution node is technically possible, but better just to tell people to update their TS config. It isn't a breaking change because nobody needed to resolve it before (and the other change fixes resolution for ReactOnRails itself).

# --ignore-rules CJS default export can't be resolved at the moment,
# revisit in 15.0.0
Comment on lines +92 to +93
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, maybe we could fix it by using Babel to compile TS instead of TSC. I'm not sure it's worth the effort at the moment.

run: yarn run attw --pack . --profile node16 --ignore-rules cjs-only-exports-default
# We only download and run Actionlint if there is any difference in GitHub Action workflows
# https://github.com/rhysd/actionlint/blob/main/docs/usage.md#on-github-actions
- name: Check for GitHub Actions changes
Expand Down
2 changes: 2 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const config: KnipConfig = {
// though we don't actually use its rules anywhere.
'eslint-plugin-jsx-a11y',
'eslint-plugin-react',
// Used in CI
'@arethetypeswrong/cli',
],
},
'spec/dummy': {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-on-rails",
"version": "14.1.1",
"description": "react-on-rails JavaScript for react_on_rails Ruby gem",
"main": "node_package/lib/ReactOnRails.js",
"main": "node_package/lib/ReactOnRails.full.js",
Copy link
Collaborator Author

@alexeyr-ci alexeyr-ci Mar 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have that file anymore.

"exports": {
".": {
"node": "./node_package/lib/ReactOnRails.node.js",
Expand All @@ -14,6 +14,7 @@
"doc": "docs"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@tsconfig/node14": "^14.1.2",
Expand Down
3 changes: 2 additions & 1 deletion script/convert
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ File.rename(old_config, new_config)

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

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

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

Expand Down
Loading
Loading