Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(scripts): revert convert symlinkDependencies script to ts #5008

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env node
/* eslint-disable no-sync, no-console, strict */
/**
* **************************************************************
* This script needs to stay as a CommonJS/JavaScript file
* (it's executed in node by the `CLI unit tests`, and possibly other places)
* **************************************************************
**/
'use strict'

import fs from 'fs'

import path from 'path'
import rimraf from 'rimraf'
import minimist from 'minimist'
const fs = require('fs')
const path = require('path')
const rimraf = require('rimraf')
const minimist = require('minimist')

const argv = minimist(process.argv.slice(2), {boolean: ['all']})

Expand All @@ -15,9 +20,9 @@ if (!targetDir) {
throw new Error('Target directory must be specified (`.` for current dir)')
}

const notSanity = (dir: string) => dir !== '@sanity'
const prefix = (name: string) => `@sanity/${name}`
const normalize = (dir: string) => dir.replace(/@sanity\//g, `@sanity${path.sep}`)
const notSanity = (dir) => dir !== '@sanity'
const prefix = (name) => `@sanity/${name}`
const normalize = (dir) => dir.replace(/@sanity\//g, `@sanity${path.sep}`)

const pkgPath = path.join(__dirname, '..', 'packages')
const rootPackages = fs.readdirSync(pkgPath).filter(notSanity)
Expand Down
Loading