-
Notifications
You must be signed in to change notification settings - Fork 20
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
Prep work for splitting clis #1086
base: main
Are you sure you want to change the base?
Conversation
"@osdk/generator": "workspace:~", | ||
"@osdk/cli.common": "workspace:*", | ||
"@osdk/generator": "workspace:*", | ||
"@osdk/generator-utils": "workspace:*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these we don't want surprises so we are locking exactly in.
packages/create-app/src/cli.test.ts
Outdated
@@ -47,6 +55,14 @@ beforeEach(() => { | |||
describe.each(TEMPLATES)("template $id", (template) => { | |||
const supportedVersions = Object.keys(template.files); | |||
describe.each(supportedVersions)("For SDK version %s", (sdkVersion) => { | |||
beforeAll(() => { | |||
vi.stubEnv("STABLE_PACKAGE_CLIENT_VERSION", "2.1.0-beta.20"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't run babel or anything for tests
babel.config.mjs
Outdated
@@ -18,6 +18,7 @@ import { findUp } from "find-up"; | |||
import { readFile } from "fs/promises"; | |||
import * as path from "node:path"; | |||
|
|||
process.env.STABLE_PACKAGE_CLIENT_VERSION = "~2.0.11"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After we move this to the other repo, we can put a devDependency on @osdk/client
in the packages that need this and can just read from there instead of doing the hard coding.
3e37527
to
74b71b8
Compare
fa59ebe
to
1e6387e
Compare
The ultimate goal is to move a bunch of packages to
osdk-ts-clis
, specifically:@osdk/create-app
@osdk/create-app.*
@osdk/create-widget
@osdk/create-widget.*
@osdk/cli
@osdk/cli.common
@osdk/example-generator
NOTE: Intent is to keep
cli.cmd.typescript
in this repo still.This meant:
create-app
being the exact same as theclient
. (We now need to hard code theSTABLE_PACKAGE_CLIENT_VERSION
.@osdk/cli.cmd.typscript
not private. (We need to be able to depend on it from the other repo)@osdk/cli.common
not private. (Its going to move to the other repo but we need to be able to depend on it)handleGenerate.mts
->handleGenerate.ts
)Additional changes in here:
tsup
was doing some duplicative work related to havingshims: true
and thought this would not be needed any more as we don't need to have__dirname
in our code since everything is a module now.__dirname
entries, I had to fix a few places in the code that weren't using theimport.meta.url
method, and I renamed all the times we doconst __dirname = path.dirname(fileURLToPath(import.meta.url));
to a different name so I could validate in the output there wasn't any uses of__dirname
.