Skip to content
This repository was archived by the owner on Jun 15, 2025. It is now read-only.

Commit 4fa9abd

Browse files
committed
Drop Socket versions before 0.5
1 parent 47cf955 commit 4fa9abd

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

index.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ async function main (argv) {
170170
...templates[templateName]?.deps ?? []
171171
]
172172

173-
// remove eventually
174-
let isSocket05orGreater = true
175-
176173
try {
177174
const { stdout } = await exec('ssc --version')
178175

@@ -182,8 +179,6 @@ async function main (argv) {
182179
.split('.')
183180
// convert to numbers
184181
.map(s => parseInt(s))
185-
186-
isSocket05orGreater = sscVersion[0] >= 1 || sscVersion[1] >= 5
187182
} catch (err) {}
188183
} catch (err) {
189184
process.stdout.write('Installing \'@socketsupply/socket\' locally (ssc not in PATH)\n')
@@ -210,7 +205,6 @@ async function main (argv) {
210205
}
211206

212207
pkg.type = 'module'
213-
pkg.scripts['init-project'] = `ssc init${isSocket05orGreater ? ' --config' : ''}`
214208
pkg.scripts.start = 'ssc build -r -o'
215209
pkg.scripts.build = 'ssc build -o'
216210
pkg.scripts.test = 'ssc build -r -o --test=./test/index.js --headless'
@@ -231,8 +225,8 @@ async function main (argv) {
231225
process.stdout.write('Creating socket files...')
232226
// Use spawn so we can pass stdio, fte is interactive
233227
const initProcess = spawn(
234-
`npm${os.platform() === 'win32' ? '.cmd' : ''}`,
235-
['run', 'init-project'],
228+
'ssc',
229+
['init', '--config'],
236230
{
237231
stdio: [process.stdin, process.stdout, process.stderr]
238232
})
@@ -299,10 +293,6 @@ async function main (argv) {
299293
if (line.includes('script = ')) {
300294
return line.replace(line, 'script = "node build.js"')
301295
}
302-
// Socket 0.5 compatibility
303-
if (isSocket05orGreater && line.includes('forward_arguments = ')) {
304-
return line.replace(line, 'forward_arguments = true')
305-
}
306296
return line
307297
}).join('\n')
308298

0 commit comments

Comments
 (0)