Skip to content

Commit 98bcf9e

Browse files
committed
fix: removing checksum
1 parent 0084571 commit 98bcf9e

File tree

10 files changed

+25
-162
lines changed

10 files changed

+25
-162
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@
2020
- Run `pnpm build` and `pnpm test` to make sure the changes work
2121
- Check your work and PR
2222

23+
# Testing Your Changes
24+
25+
When testing use `pnpm dev` at the top level of the `create-tsrouter-app` repo.
26+
27+
Then from a peer directory use:
28+
29+
```bash
30+
node ../create-tsrouter-app/cli/create-start-app/dist/index.js
31+
```
32+
33+
To test `create-start-app` (or any of the CLIs).
34+
35+
You can also do:
36+
37+
```bash
38+
npm_config_user_agent=pnpm node ../create-tsrouter-app/cli/create-start-app/dist/index.js
39+
```
40+
41+
If you want to specify a package manager.
42+
2343
# Testing Add-ons and Starters
2444

2545
Create the add-on or starter using the CLI. Then serve it locally from the project directory using `npx static-server`.

frameworks/react-cra/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"main": "./dist/index.js",
77
"types": "./dist/types/index.d.ts",
88
"scripts": {
9-
"prebuild": "node ../../scripts/generate-checksums.js",
109
"build": "tsc",
1110
"dev": "tsc --watch",
1211
"test": "eslint ./src && vitest run",

frameworks/react-cra/src/checksum.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

frameworks/react-cra/src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
scanProjectDirectory,
88
} from '@tanstack/cta-engine'
99

10-
import { contentChecksum } from './checksum.js'
11-
1210
import type { FrameworkDefinition } from '@tanstack/cta-engine'
1311

1412
export function createFrameworkDefinition(): FrameworkDefinition {
@@ -47,12 +45,9 @@ export function createFrameworkDefinition(): FrameworkDefinition {
4745
forceTypescript: true,
4846
},
4947
},
50-
contentChecksum,
5148
}
5249
}
5350

5451
export function register() {
5552
registerFramework(createFrameworkDefinition())
5653
}
57-
58-
export { contentChecksum }

frameworks/solid/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"main": "./dist/index.js",
77
"types": "./dist/types/index.d.ts",
88
"scripts": {
9-
"prebuild": "node ../../scripts/generate-checksums.js",
109
"build": "tsc",
1110
"dev": "tsc --watch",
1211
"test": "eslint ./src && vitest run",

frameworks/solid/src/checksum.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

frameworks/solid/src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
scanProjectDirectory,
88
} from '@tanstack/cta-engine'
99

10-
import { contentChecksum } from './checksum.js'
11-
1210
import type { FrameworkDefinition } from '@tanstack/cta-engine'
1311

1412
export function createFrameworkDefinition(): FrameworkDefinition {
@@ -47,12 +45,9 @@ export function createFrameworkDefinition(): FrameworkDefinition {
4745
forceTypescript: true,
4846
},
4947
},
50-
contentChecksum,
5148
}
5249
}
5350

5451
export function register() {
5552
registerFramework(createFrameworkDefinition())
5653
}
57-
58-
export { contentChecksum }

packages/cta-engine/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ export type FrameworkDefinition = {
160160
forceTypescript: boolean
161161
}
162162
>
163-
contentChecksum?: string
164163
}
165164

166165
export type Framework = Omit<FrameworkDefinition, 'base' | 'addOns'> &

scripts/README.md

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,8 @@
11
# Scripts
22

3-
## generate-checksums.js
3+
This directory contains utility scripts for the project.
44

5-
This script generates checksums for the `react-cra` and `solid` frameworks to ensure version bumps when content changes.
6-
7-
### Purpose
8-
9-
The checksum system ensures that when any files in the following directories change, the framework package will have a different build output, triggering proper version bumping:
10-
11-
- `add-ons/`
12-
- `examples/`
13-
- `hosts/`
14-
- `project/`
15-
- `toolchains/`
16-
17-
### How It Works
18-
19-
1. The script recursively scans all files in the specified directories
20-
2. Calculates a SHA-256 hash of all file contents and paths
21-
3. Generates `src/checksum.ts` in each framework with the exported checksum value
22-
4. The checksum is exported from `src/index.ts` and included in the built output
23-
24-
### Integration
25-
26-
The checksum generation runs automatically before each build via the `prebuild` script in:
27-
28-
- `frameworks/react-cra/package.json`
29-
- `frameworks/solid/package.json`
30-
31-
When running `pnpm build` at the root level, the checksums are automatically regenerated for both frameworks before TypeScript compilation.
32-
33-
### Generated Files
34-
35-
- `frameworks/react-cra/src/checksum.ts`
36-
- `frameworks/solid/src/checksum.ts`
37-
38-
**Note:** These generated files should be committed to git as they are part of the package's public API and need to be tracked for proper version management.
5+
Available scripts:
6+
- `publish.js` - Publishing script
7+
- `check-outdated-packages.js` - Check for outdated packages
8+
- `check-for-ejs-duplicates.sh` - Check for duplicate EJS files

scripts/generate-checksums.js

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)