@todesktop/cli 1.8.0 → 1.8.1

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.
package/README.md CHANGED
@@ -221,7 +221,7 @@ Example: `["dist/**", "!static/**"]`
221
221
 
222
222
  This option allows you to decide which files get uploaded to be built on the ToDesktop servers. By default, all files in your app path are included in your app, except for `node_modules` and `.git`. Dependencies are installed on our build servers as there could be platform-specific postinstall steps.
223
223
 
224
- If you wish to include files for the build process but exclude them in the distribtion version of your app then you should use the [`filesForDistribution`](#filesForDistribution---optional-array-of-glob-patterns) property
224
+ If you wish to include files for the build process but exclude them in the distribution version of your app then you should use the [`filesForDistribution`](#filesForDistribution---optional-array-of-glob-patterns) property
225
225
 
226
226
  The files must be within your [`appPath`](#apppath---optional-string).
227
227
 
@@ -834,12 +834,6 @@ Default: `undefined`.
834
834
 
835
835
  The path to NSIS script to customize installer.
836
836
 
837
- ### `yarnVersion` - string
838
-
839
- Example: `1.22.1`.
840
-
841
- The version of Yarn that ToDesktop should use for installation.
842
-
843
837
  ## Build lifecycle hooks (package.json scripts)
844
838
 
845
839
  Sometimes you want to do something before or during the build process. For example, you might want to run a script before the build starts, or you might want to run a script after the files have been packaged. Our lifecycle hooks provide a way to do this.
@@ -948,6 +942,24 @@ To summarize:
948
942
 
949
943
  Note: **Do not put a token in this file**. You are specifying a literal value of `${NPM_TOKEN}`. NPM will replace the value for you. 5. Add `.npmrc` to your `appFiles` array `[".npmrc"]` in `todesktop.json`.
950
944
 
945
+ ### How can I specify a specific yarnVersion for use with my app?
946
+
947
+ By default, ToDesktop uses version `1.x.x` of `Yarn` if a `yarn.lock` file is present in your project. You can override this by creating a `.yarnrc.yml` file in your project directory and specifying the `yarnPath` property to point to your specified version of yarn:
948
+
949
+ ```yml
950
+ yarnPath: .yarn/releases/yarn-3.1.1.cjs
951
+ ```
952
+
953
+ This can be done automatically by running `yarn set version x.x.x` from within your project directory. This will create a `.yarnrc.yml` file and a corresponding `.yarn/releases/yarn-x.x.x.cjs` that the `yarnPath` property points to. This will also add a `packageManager` field in your `package.json` with a value of `yarn@x.x.x`
954
+
955
+ It's important to ensure that the `.yarn` folder is included in your build. If you had previously changed your `todesktop.json`'s [`appFiles`](#appfiles---optional-array-of-glob-patterns) property from its default glob implementation of `**`, then please ensure that it includes the `.yarn` directory:
956
+
957
+ Example: `[".yarn/**", ".yarnrc.yml", "...include your other changes here..."]`
958
+
959
+ You will want to exclude the `.yarn` directory in the distribution version of your app. You can use the [`filesForDistribution`](#filesForDistribution---optional-array-of-glob-patterns) property to achieve this:
960
+
961
+ Example: `[".yarn/**", ".yarnrc.yml"]`
962
+
951
963
  ### How do I create a staging version of my app?
952
964
 
953
965
  ToDesktop CLI supports the concept of a staging version of your app. This is useful if you want to test your app before releasing it to the public. To create a staging version of your app, you need to do the following:
@@ -1038,6 +1050,10 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
1038
1050
 
1039
1051
  ## Changelog
1040
1052
 
1053
+ ### v1.8.1
1054
+
1055
+ - Revert support for `yarnVersion` in config. Instead use `.yarnrc.yml` file to specify yarn version.
1056
+
1041
1057
  ### v1.8.0
1042
1058
 
1043
1059
  - Add support for `--webhook` flag for `todesktop build` command
package/dist/cli.js CHANGED
@@ -1679,11 +1679,6 @@ var full_default = (context) => {
1679
1679
  validSemver: {},
1680
1680
  minLength: 1
1681
1681
  },
1682
- yarnVersion: {
1683
- type: "string",
1684
- validSemver: {},
1685
- minLength: 1
1686
- },
1687
1682
  appBuilderLibVersion: {
1688
1683
  type: "string",
1689
1684
  validSemver: {},
@@ -2445,7 +2440,6 @@ async function runBuild({
2445
2440
  nodeVersion: config2.nodeVersion,
2446
2441
  npmVersion: config2.npmVersion,
2447
2442
  pnpmVersion: config2.pnpmVersion,
2448
- yarnVersion: config2.yarnVersion,
2449
2443
  appBuilderLibVersion: config2.appBuilderLibVersion
2450
2444
  });
2451
2445
  } catch (e) {
@@ -4086,8 +4080,7 @@ async function getBuildAttributes({
4086
4080
  id: appId,
4087
4081
  nodeVersion,
4088
4082
  npmVersion,
4089
- pnpmVersion,
4090
- yarnVersion
4083
+ pnpmVersion
4091
4084
  } = getProjectConfig(configPath).config;
4092
4085
  const { id: userId } = await findAppUserId_default(appId);
4093
4086
  const { uid: contextUserId } = currentUser();
@@ -4100,7 +4093,6 @@ async function getBuildAttributes({
4100
4093
  nodeVersion,
4101
4094
  npmVersion,
4102
4095
  pnpmVersion,
4103
- yarnVersion,
4104
4096
  userId
4105
4097
  };
4106
4098
  }
@@ -4931,7 +4923,6 @@ async function queueSmokeTest({
4931
4923
  nodeVersion,
4932
4924
  npmVersion,
4933
4925
  pnpmVersion,
4934
- yarnVersion,
4935
4926
  userId
4936
4927
  }) {
4937
4928
  try {
@@ -4941,7 +4932,6 @@ async function queueSmokeTest({
4941
4932
  nodeVersion,
4942
4933
  npmVersion,
4943
4934
  pnpmVersion,
4944
- yarnVersion,
4945
4935
  userId,
4946
4936
  contextUserId
4947
4937
  });
@@ -5059,7 +5049,6 @@ async function smokeTestWorkflow({
5059
5049
  nodeVersion,
5060
5050
  npmVersion,
5061
5051
  pnpmVersion,
5062
- yarnVersion,
5063
5052
  userId
5064
5053
  } = await getBuildAttributes({
5065
5054
  buildId,
@@ -5074,7 +5063,6 @@ async function smokeTestWorkflow({
5074
5063
  nodeVersion,
5075
5064
  npmVersion,
5076
5065
  pnpmVersion,
5077
- yarnVersion,
5078
5066
  userId,
5079
5067
  contextUserId
5080
5068
  });
@@ -5170,7 +5158,7 @@ var package_default = {
5170
5158
  access: "public"
5171
5159
  },
5172
5160
  name: "@todesktop/cli",
5173
- version: "1.7.7",
5161
+ version: "1.8.0",
5174
5162
  license: "MIT",
5175
5163
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
5176
5164
  homepage: "https://todesktop.com/cli",