Skip to content

Convert to npm#45

Open
peachbits wants to merge 4 commits into
masterfrom
convert-to-npm
Open

Convert to npm#45
peachbits wants to merge 4 commits into
masterfrom
convert-to-npm

Conversation

@peachbits
Copy link
Copy Markdown

@peachbits peachbits commented May 25, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Note

Low Risk
Tooling and documentation only; no application or library runtime logic changes in the diff.

Overview
Switches the repo from Yarn to npm for installs, CI, and contributor docs.

CI (.travis.yml) now runs npm ci, npm run prepare, npm run lint, and npm run test instead of the Yarn equivalents. .yarnrc is removed; root and ReactNativeDiskletTest get .npmrc with legacy-peer-deps=true and ignore-scripts=true (same ignore-scripts behavior Yarn had). .gitignore no longer ignores package-lock.json, so the npm lockfile can be tracked.

README files are updated to tell people to use npm install / npm run instead of yarn.

Reviewed by Cursor Bugbot for commit f026e19. Bugbot is set up for automated code reviews on this repo. Configure here.

"disklet": "^0.5.1",
"react": "17.0.2",
"react-native": "0.66.3"
"react-native": "0.76.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Incomplete React Native upgrade

Medium Severity

The demo app pins react-native at 0.76.0 but still depends on react 17.0.2, leaves metro-react-native-babel-preset at 0.66.x, and the Android project still applies react-native/react.gradle. RN 0.76 expects React 18, the new Gradle plugin, and matching Metro/Babel tooling, so the README’s npm run android / npm run ios flow is likely to fail after install.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 662782d. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Out of scope for this PR. The demo app's react@17.0.2, metro-react-native-babel-preset 0.66.x, and react.gradle usage pre-date this change and are not touched by the yarn→npm conversion. The RN 0.76 toolchain alignment is a separate upgrade concern.

@peachbits peachbits force-pushed the convert-to-npm branch 2 times, most recently from e4541ae to ce4dd47 Compare May 26, 2026 20:50
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ce4dd47. Configure here.

Comment thread ReactNativeDiskletTest/README.md
convert-to-npm and others added 3 commits June 2, 2026 10:05
@j0ntz
Copy link
Copy Markdown

j0ntz commented Jun 2, 2026

CI status: Travis is red (Bugbot itself is clean). Verified from the build log: install and lint pass, but npm run test fails with:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"test/helpers/listing.test.ts

After the yarn→npm conversion, mocha is no longer loading the TypeScript register, so .ts specs can't be imported. The mocha .ts loader needs wiring up (e.g. -r sucrase/register / --loader) before this goes green.

@j0ntz
Copy link
Copy Markdown

j0ntz commented Jun 2, 2026

Applied in f026e19. Pinned get-func-name to 2.0.2 via npm overrides. The lock had resolved the broken ESM-only get-func-name@2.0.1, which chai (CommonJS) can't require → mocha falls back to import() of the .ts specs → ERR_UNKNOWN_FILE_EXTENSION. Verified on Node 16 (matching this PR's CI): npm ci in sync + lint and test green (36 passing). Flagging since this is my change on your branch — please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants