Skip to content

Commit 1e478cd

Browse files
committed
Fix build script flags and clean up old scripts
- Change build flag from --source to --src for consistency - Remove lint-affected from sync removal list (keep it in repos) - Remove old build:dist, build:dist:src, build:dist:types scripts - Update package.json to use new lint.mjs script - Sync all changes to socket-cli, socket-sdk-js, socket-registry
1 parent a6e0d40 commit 1e478cd

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,8 @@
3131
"scripts": {
3232
"check": "node scripts/check.mjs",
3333
"lint-ci": "pnpm run check:lint",
34-
"check:lint": "node scripts/lint-affected.mjs --all",
35-
"lint": "node scripts/lint-affected.mjs",
34+
"check:lint": "node scripts/lint.mjs --all",
3635
"build": "node scripts/build.mjs",
37-
"build:dist": "node scripts/build.mjs",
38-
"build:dist:src": "node scripts/build.mjs --src-only",
39-
"build:dist:types": "node scripts/build.mjs --types-only",
4036
"check:tsc": "tsgo --noEmit -p .config/tsconfig.check.json",
4137
"clean:dist": "node scripts/clean.mjs --dist",
4238
"clean:dist:types": "node scripts/clean.mjs --dist-types",

scripts/build.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ async function main() {
145145
type: 'boolean',
146146
default: false,
147147
},
148-
source: {
148+
src: {
149149
type: 'boolean',
150150
default: false,
151151
},
@@ -176,14 +176,14 @@ async function main() {
176176
console.log('\nUsage: pnpm build [options]')
177177
console.log('\nOptions:')
178178
console.log(' --help Show this help message')
179-
console.log(' --source Build source code only')
179+
console.log(' --src Build source code only')
180180
console.log(' --types Build TypeScript declarations only')
181181
console.log(' --watch Watch mode for development')
182182
console.log(' --if-needed Only build if dist files are missing')
183183
console.log(' --quiet Suppress progress messages')
184184
console.log('\nExamples:')
185185
console.log(' pnpm build # Full build (source + types)')
186-
console.log(' pnpm build --source # Build source only')
186+
console.log(' pnpm build --src # Build source only')
187187
console.log(' pnpm build --types # Build types only')
188188
console.log(' pnpm build --watch # Watch mode')
189189
console.log(' pnpm build --if-needed # Build only if needed')
@@ -213,14 +213,14 @@ async function main() {
213213
exitCode = await watchBuild({ quiet: values.quiet })
214214
}
215215
// Build types only
216-
else if (values.types && !values.source) {
216+
else if (values.types && !values.src) {
217217
if (!values.quiet) {
218218
log.step('Building TypeScript declarations only')
219219
}
220220
exitCode = await buildTypes({ quiet: values.quiet })
221221
}
222222
// Build source only
223-
else if (values.source && !values.types) {
223+
else if (values.src && !values.types) {
224224
if (!values.quiet) {
225225
log.step('Building source only')
226226
}

scripts/sync-scripts.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ async function updatePackageJson(projectPath) {
7373
'test:unit:update',
7474
'test-pre-commit',
7575
'pretest:unit',
76-
'lint-affected',
7776
'test:old',
7877
'build:src',
7978
'build:types',

0 commit comments

Comments
 (0)