Skip to content

fix: update cpy and fix type errors #4877

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
3,803 changes: 84 additions & 3,719 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"ava": "^4.0.0",
"c8": "^7.12.0",
"copyfiles": "^2.4.1",
"cpy": "^8.1.0",
"cpy": "^9.0.1",
"del": "^6.0.0",
"fast-safe-stringify": "^2.0.7",
"get-bin-path": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cache-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"license": "MIT",
"dependencies": {
"cpy": "^8.1.0",
"cpy": "^9.0.1",
"del": "^6.0.0",
"get-stream": "^6.0.0",
"globby": "^13.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/cache-utils/src/fs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { promises as fs, Stats } from 'fs'
import { basename, dirname } from 'path'

import cpy from 'cpy'
import cpy, { Options as cpyOptions } from 'cpy'
import { Options, globby } from 'globby'
import { isNotJunk } from 'junk'
import { moveFile } from 'move-file'
Expand All @@ -20,7 +20,7 @@ export const moveCacheFile = async function (src: string, dest: string, move = f

const { srcGlob, ...options } = await getSrcGlob(src)
if (srcGlob) {
return cpy(srcGlob, dirname(dest), { ...options, parents: true, overwrite: false })
return cpy(srcGlob, dirname(dest), { ...options, parents: true, overwrite: false } as cpyOptions)
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/framework-info/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"devDependencies": {
"babel-loader": "^8.2.2",
"cpy": "^9.0.0",
"cpy": "^9.0.1",
"cpy-cli": "^4.0.0",
"del": "^6.0.0",
"fast-glob": "^3.2.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/functions-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"license": "MIT",
"dependencies": {
"@netlify/zip-it-and-ship-it": "^8.7.0",
"cpy": "^8.1.0",
"cpy": "^9.0.1",
"path-exists": "^5.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/functions-utils/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { promises as fs } from 'fs'
import { basename, dirname } from 'path'

import { listFunctions, listFunctionsFiles } from '@netlify/zip-it-and-ship-it'
import cpy from 'cpy'
import cpy, { Options as cpyOptions } from 'cpy'
import { pathExists } from 'path-exists'

// Add a Netlify Function file to the `functions` directory so it is processed
Expand All @@ -22,7 +22,7 @@ export const add = async function (src?: string, dist?: string, { fail = default

const srcBasename = basename(src)
const srcGlob = await getSrcGlob(src, srcBasename)
await cpy(srcGlob, dist, { cwd: dirname(src), parents: true, overwrite: true })
await cpy(srcGlob, dist, { cwd: dirname(src), parents: true, overwrite: true } as cpyOptions)
}

const getSrcGlob = async function (src, srcBasename) {
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@types/node": "^14.18.31",
"ava": "^4.0.0",
"c8": "^7.12.0",
"cpy": "^8.1.0",
"cpy": "^9.0.1",
"del": "^6.0.0",
"execa": "^6.0.0",
"fast-safe-stringify": "^2.0.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/testing/src/fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { env } from 'process'
import { fileURLToPath } from 'url'

import test from 'ava'
import cpy from 'cpy'
import cpy, { Options as cpyOptions } from 'cpy'
import { execa, execaCommand } from 'execa'
import stringify from 'fast-safe-stringify'
import { getBinPathSync } from 'get-bin-path'
Expand Down Expand Up @@ -147,7 +147,7 @@ export class Fixture {
} = { git: true },
): Promise<this> {
this.copyRootDir = normalize(createRepoDir(copyRoot.git))
await cpy('**', this.copyRootDir, { cwd: this.repositoryRoot, parents: true })
await cpy('**', this.copyRootDir, { cwd: this.repositoryRoot, parents: true } as cpyOptions)

if (copyRoot.branch !== undefined) {
await execaCommand(`git checkout -b ${copyRoot.branch}`, { cwd: this.copyRootDir })
Expand Down