feat: recursively copy cwd into temp folder#2479
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
ec4395d to
92f5785
Compare
jorgemoya
left a comment
There was a problem hiding this comment.
Looks good to me, just have some questions.
| } | ||
|
|
||
| export const build = new Command('build') | ||
| .option('--keep-temp-dir', 'Keep the temporary directory after the build') |
There was a problem hiding this comment.
Should we set the pattern to use kebab case for all options? In preference over camel case?
There was a problem hiding this comment.
Yeah, POSIX standardized on --kebab-case convention, so it's what people are used to IMO. Commander automatically transforms those to camel case too:
Multi-word options such as "--template-engine" are camel-cased, becoming
program.opts().templateEngineetc.
| import { cp, mkdtemp, rm } from 'node:fs/promises'; | ||
| import { tmpdir } from 'node:os'; | ||
| import { join, relative, sep } from 'node:path'; |
There was a problem hiding this comment.
Curious to understand why we use these libs instead of using path or fs?
There was a problem hiding this comment.
Not required, I just do it to explicitly indicate a built-in Node.js module and avoid ambiguity between built-ins and potentially conflicting userland modules (like https://www.npmjs.com/package/test vs node:test)
| await expect(access(path)).rejects.toThrow(); | ||
| }); | ||
|
|
||
| test('cleanup is idempotent', async () => { |
There was a problem hiding this comment.
Yeah, in other words, cleanup() should not fail on the second call
|
|
||
| import { createFilter, mkTempDir } from '../../src/commands/build'; | ||
|
|
||
| describe('mkTempDir', () => { |
There was a problem hiding this comment.
Should we wrap all describes under the build command describe?
There was a problem hiding this comment.
Chatted offline, will leave as is until it gets unwieldy
92f5785 to
91d0d22
Compare
…rtal (#2504) * Version Packages (`canary`) (#2452) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Bump next to latest canary (#2465) * docs: how to verify new merge base established when syncing (#2451) Improve explanation around the importance of establishing a new merge base every time `canary` is merged into `integrations/makeswift` * chore(core): remove runtime edge declarations (#2464) * Update translations (#2468) * feat(other): LOCAL-1444 delivery translation * chore(core): create translations patch --------- Co-authored-by: bc-svc-local <bc-svc-local@users.noreply.github.com> Co-authored-by: Jorge Moya <jorge.moya@bigcommerce.com> * Use min and max purchase quantity to set bounds of quantity number input (#2474) * chore: update ci to include @bigcommerce/catalyst (#2463) * chore: update deps mostly related to packages/cli (#2461) * chore: use @commander-js/extra-typings as devDep (#2462) * feat: render scripts from Script Manager (#2477) * chore: hoist eslint plugins for ide support (#2460) * feat: recursively copy cwd into temp folder (#2479) * feat(cli): scaffold deploy command and generate bundle zip (#2481) * feat(cli): scaffold deploy command and generate bundle zip * feat: remove archiver and only use adm-zip * feat: add extra checks for build files * refactor: move checks around * fix: use .bigcommerce/dist as build path * refactor: split mkTempDir to own lib file and update tests * fix: remove file * fix: set default value for prefix * fix: remove extra-typings * feat: install and build all deps required to bundle catalyst (#2486) * chore: bump opennextjs-cloudflare version (#2487) * feat(cli): generate upload signature and upload bundle.zip (#2484) * feat(cli): generate upload signature and upload bundle.zip * feat: read from env variables * feat: use zod to validate response * refactor: parse * feat: read api host from env * refactor: infer option types in deploy command action (#2490) * feat: copy templates from cli to catalyst build tmpdir (#2489) * Version Packages (`canary`) (#2466) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nathan Booker <bookernath@users.noreply.github.com> Co-authored-by: Matthew Volk <matt.volk@bigcommerce.com> Co-authored-by: Jorge Moya <jorge.moya@bigcommerce.com> Co-authored-by: bc-svc-local <102379007+bc-svc-local@users.noreply.github.com> Co-authored-by: bc-svc-local <bc-svc-local@users.noreply.github.com>
What/Why?
consolafor loggingTesting
Includes unit tests
Migration
N/A