@tscircuit/cli 0.1.748 → 0.1.749

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +25 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -73247,6 +73247,7 @@ var projectConfigSchema = z.object({
73247
73247
  snapshotsDir: z.string().optional(),
73248
73248
  prebuildCommand: z.string().optional(),
73249
73249
  buildCommand: z.string().optional(),
73250
+ alwaysUseLatestTscircuitOnCloud: z.boolean().optional(),
73250
73251
  build: z.object({
73251
73252
  circuitJson: z.boolean().optional(),
73252
73253
  kicadLibrary: z.boolean().optional(),
@@ -172593,7 +172594,8 @@ function collectTsciDependencies({
172593
172594
 
172594
172595
  // lib/shared/install-project-dependencies.ts
172595
172596
  async function installProjectDependencies({
172596
- cwd = process.cwd()
172597
+ cwd = process.cwd(),
172598
+ skipTscircuitPackage = false
172597
172599
  } = {}) {
172598
172600
  const projectRoot = path37.resolve(cwd);
172599
172601
  const packageJsonPath = path37.join(projectRoot, "package.json");
@@ -172615,6 +172617,24 @@ async function installProjectDependencies({
172615
172617
  fs37.writeFileSync(npmrcPath, "@tsci:registry=https://npm.tscircuit.com");
172616
172618
  }
172617
172619
  const packageJson = JSON.parse(fs37.readFileSync(packageJsonPath, "utf-8"));
172620
+ if (skipTscircuitPackage) {
172621
+ const isTscircuitPackage = (name) => name === "tscircuit";
172622
+ if (packageJson.dependencies) {
172623
+ for (const dep of Object.keys(packageJson.dependencies)) {
172624
+ if (isTscircuitPackage(dep)) {
172625
+ delete packageJson.dependencies[dep];
172626
+ }
172627
+ }
172628
+ }
172629
+ if (packageJson.devDependencies) {
172630
+ for (const dep of Object.keys(packageJson.devDependencies)) {
172631
+ if (isTscircuitPackage(dep)) {
172632
+ delete packageJson.devDependencies[dep];
172633
+ }
172634
+ }
172635
+ }
172636
+ console.log("Skipping tscircuit package installation (using cloud container version).");
172637
+ }
172618
172638
  if (packageJsonCreated) {
172619
172639
  const tsciDependencies = collectTsciDependencies({ cwd: projectRoot });
172620
172640
  if (tsciDependencies.length > 0) {
@@ -172655,8 +172675,11 @@ var applyCiBuildOptions = async ({
172655
172675
  if (!options?.ci) {
172656
172676
  return { resolvedOptions: options, handled: false };
172657
172677
  }
172658
- await installProjectDependencies({ cwd: projectDir });
172659
172678
  const projectConfig2 = loadProjectConfig(projectDir);
172679
+ await installProjectDependencies({
172680
+ cwd: projectDir,
172681
+ skipTscircuitPackage: projectConfig2?.alwaysUseLatestTscircuitOnCloud
172682
+ });
172660
172683
  const prebuildCommand = projectConfig2?.prebuildCommand?.trim();
172661
172684
  const buildCommand = projectConfig2?.buildCommand?.trim();
172662
172685
  if (prebuildCommand) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.748",
3
+ "version": "0.1.749",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",