Repository navigation
Conversation
…le rest spread
- Read useWindowDimensions() so cards react to rotation/resize instead of capturing Dimensions.get('window') once at module load (style files become size factories; identical ratios).
- Route ...rest to a single intended pressable instead of double-spreading onto both RNBounceable and ImageBackground.
- Add accessibilityRole=button, default accessibilityLabel and hitSlop to pressable areas; add optional accessibilityLabel prop.
- Wrap both cards in React.memo with a stable displayName.
- Tighten AppOfTheDayCard.iconSource from any to ImageSourcePropType (breaking TS).
- Export IAppleCardProps and IAppOfTheDayCardProps; keep gradientColors as a documented reserved no-op.
…onfig - package.json: repoint repository/homepage/bugs/author/funding to kuraydev; add types/module/react-native/source/exports/files fields (main + types still resolve at build/dist); add wide peerDependencies (react>=17, react-native>=0.64, bounceable>=1) + peerDependenciesMeta. - Remove dead/deprecated devDeps (@types/react-native, react-native-typescript-transformer, prettier-format, npm-post-install, eslint-config-airbnb, @react-native-community/eslint-config, cpx); align @types/react to 18. - Replace dead tslint script with eslint; add typecheck/test/build/lint:fix scripts; build via dedicated tsconfig.build.json. - Migrate legacy .eslintrc.js to flat eslint.config.js (typescript-eslint + react + react-hooks + prettier). - Update Babel preset to @react-native/babel-preset; ignore *.tsbuildinfo.
15 tests across both components and the barrel: render, prop wiring, independent onPress/onButtonPress handlers, accessibility labels, the footnote prop-name regression guard, the reserved gradientColors prop, the responsive style factory, and the public export surface. Deterministic RNBounceable test double under __mocks__.
…abot
CI runs install + lint + typecheck + test + build on Node 18/20/22 for push/PR and asserts build/dist/index.{js,d.ts} exist. Restore the dependabot.yml deleted in 828fded (npm weekly grouped dev-deps + github-actions). Repoint FUNDING to kuraydev.
…& templates - README: correct props tables (footnote not footnoteText; drop non-existent defaults), add required/optional columns, TS usage, New Architecture/Expo compatibility table, RN/peer version matrix, example-run instructions, contributing/changelog links, kuraydev badges. - Add CHANGELOG.md (Keep a Changelog), CONTRIBUTING.md, CODE_OF_CONDUCT.md, issue templates, PR template. - Delete stale root app.json (copy-paste from react-native-header-view referencing non-existent assets).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review fixes applied: pushed the local HEAD commit, and bumped
package.json3.0.0→4.0.0to avoid colliding with the already-published3.0.0on npm.Summary
react-native-apple-card-viewshad not shipped in 3+ years and its tooling was broken: thelintscript invokedtslint(dead, not even installed), ESLint 9 could not load the legacy.eslintrc.js, there were no tests and no CI, package metadata still pointed at the previous owner, and there were noreact/react-nativepeer declarations. This PR is a full maintenance overhaul that repairs all of that without changing the public runtime API (the two named exports, their prop names, and the no-default-props behavior are preserved). Where the README disagreed with the code, the README was fixed to match the code, never the reverse.The package npm name (
react-native-apple-card-views) and the runtime peer (@freakycoder/react-native-bounceable) are unchanged.Non-breaking improvements
Tooling & build
tslintscript with ESLint; migrated.eslintrc.js→ flateslint.config.js(ESLint 9).lint,lint:fix,typecheck,test,formatscripts.tsconfig.build.json; the published entry (main) andtypesstay atbuild/dist..tsbuildinfofrom the published tarball (pack dropped 20.5kB → 11.4kB, 28 files).Metadata
repository/homepage/bugs/author/ FUNDING from the legacy WrathChaos/freakycoder URLs tokuraydev.types,module,react-native,source,exports, and afilesallowlist (npm name unchanged).@types/react-native,react-native-typescript-transformer,prettier-format,npm-post-install,@react-native-community/eslint-config,cpx; aligned@types/reactto 18.app.json(a copy-paste fromreact-native-header-viewreferencing non-existent assets).CI
.github/workflows/ci.yml: install + lint + typecheck + test + build across Node 18/20/22, with assertions thatbuild/dist/index.jsandindex.d.tsare produced.dependabot.yml(deleted in the last commit before this branch).CONTRIBUTING.md,CODE_OF_CONDUCT.md, and a Keep-a-ChangelogCHANGELOG.md.Tests
@testing-library/react-nativesuite (15 tests / 3 suites): render of all text props,onPress/onButtonPress,accessibilityRole="button"+ default and overridden labels, afootnoteregression guard against the old README drift, and the responsive style factory. DeterministicRNBounceablemock under__mocks__/.Source (no public prop renames, no default changes)
useWindowDimensions()instead of capturingDimensions.get('window')once at module load, so layout reacts to rotation/resize.React.memowith an explicitdisplayName.accessibilityRole="button",accessibilityLabel(optional prop, defaults to the title), andhitSlopon pressables....restonto multiple elements (previously spread onto bothRNBounceableandImageBackground, twice inAppOfTheDayCard); rest now routes to the single intended pressable.gradientColorskept as an accepted no-op prop (documented) rather than removed, to preserve the prop surface without pulling in a gradient dependency.README
footnote(older docs saidfootnoteText), and the fictional default values were removed (props are required, there are nodefaultProps).kuraydev. Kept the existing, real media references (assets/logo.png, the two screenshots, and the demo GIF all exist) — no invented screenshots.Breaking changes (recommend v4.0.0 major)
@freakycoder/react-native-bounceable>=0.1.1→>=1.0.0, reconciling the previous three-way mismatch (package>=0.1.1, README>=1.0.3, npm latest2.x).react >=17.0.0andreact-native >=0.64.0(deliberately wide). Consumers on very old/unpinned setups may now see peer-range install warnings.AppOfTheDayCard.iconSourcetype narrowed fromany→ImageSourcePropType. Compile-time only; no runtime change.exportsmap.main/module/typesare preserved and the bare package-name import still resolves to the samebuild/distoutput (verified vianpm pack), but strict exports-aware resolvers now only see the declared subpaths (.and./package.json).No runtime default values or exported names changed.
Verification
Local, Node 20.20.2 / npm 10.8.2 (no lockfile committed; CI uses
npm install --legacy-peer-deps):tsc --noEmiteslint libjest --citsc -p tsconfig.build.jsonbuild/dist/index.js+index.d.tsemittednpm pack --dry-runbuild/dist+ types +libsource, no.tsbuildinfoBare import resolution confirmed preserved:
main/module/typesstill resolve to./build/dist, and theexportsmap keeps adefault→build/dist/index.jsplus areact-native→libsource condition.No open issues to close (0 open issues / 0 open PRs at time of writing).