@todesktop/cli 1.8.0 → 1.9.0

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
 
@@ -648,6 +648,12 @@ Example: `8.10.5`.
648
648
 
649
649
  The version of pnpm that ToDesktop should use for installation.
650
650
 
651
+ ### `rebuildLibrary` - (optional) string
652
+
653
+ Default: `app-builder`.
654
+
655
+ The library that ToDesktop should use for rebuilding native modules. Valid values are `app-builder` or `@electron/rebuild`.
656
+
651
657
  ### `schemaVersion` - number
652
658
 
653
659
  Example: `1`.
@@ -834,12 +840,6 @@ Default: `undefined`.
834
840
 
835
841
  The path to NSIS script to customize installer.
836
842
 
837
- ### `yarnVersion` - string
838
-
839
- Example: `1.22.1`.
840
-
841
- The version of Yarn that ToDesktop should use for installation.
842
-
843
843
  ## Build lifecycle hooks (package.json scripts)
844
844
 
845
845
  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 +948,24 @@ To summarize:
948
948
 
949
949
  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
950
 
951
+ ### How can I specify a specific yarnVersion for use with my app?
952
+
953
+ 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:
954
+
955
+ ```yml
956
+ yarnPath: .yarn/releases/yarn-3.1.1.cjs
957
+ ```
958
+
959
+ 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`
960
+
961
+ 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:
962
+
963
+ Example: `[".yarn/**", ".yarnrc.yml", "...include your other changes here..."]`
964
+
965
+ 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:
966
+
967
+ Example: `["!.yarn/**", "!.yarnrc.yml"]`
968
+
951
969
  ### How do I create a staging version of my app?
952
970
 
953
971
  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 +1056,14 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
1038
1056
 
1039
1057
  ## Changelog
1040
1058
 
1059
+ ## v1.9.0
1060
+
1061
+ - You can now specify `@electron/rebuild` as a custom `rebuildLibrary` in your `todesktop.json` file.
1062
+
1063
+ ### v1.8.1
1064
+
1065
+ - Revert support for `yarnVersion` in config. Instead use `.yarnrc.yml` file to specify yarn version.
1066
+
1041
1067
  ### v1.8.0
1042
1068
 
1043
1069
  - Add support for `--webhook` flag for `todesktop build` command
package/dist/cli.js CHANGED
@@ -1451,6 +1451,11 @@ var full_default = (context) => {
1451
1451
  type: "object",
1452
1452
  required: ["id", "icon", "schemaVersion"],
1453
1453
  properties: {
1454
+ appBuilderLibVersion: {
1455
+ type: "string",
1456
+ validSemver: {},
1457
+ minLength: 1
1458
+ },
1454
1459
  appId: { type: "string", minLength: 1 },
1455
1460
  appFiles: {
1456
1461
  type: "array",
@@ -1679,20 +1684,14 @@ var full_default = (context) => {
1679
1684
  validSemver: {},
1680
1685
  minLength: 1
1681
1686
  },
1682
- yarnVersion: {
1683
- type: "string",
1684
- validSemver: {},
1685
- minLength: 1
1686
- },
1687
- appBuilderLibVersion: {
1688
- type: "string",
1689
- validSemver: {},
1690
- minLength: 1
1691
- },
1692
1687
  packageManager: {
1693
1688
  type: "string",
1694
1689
  enum: ["npm", "yarn", "pnpm"]
1695
1690
  },
1691
+ rebuildLibrary: {
1692
+ type: "string",
1693
+ enum: ["app-builder", "@electron/rebuild"]
1694
+ },
1696
1695
  schemaVersion: { type: "number", minimum: 1, maximum: 1 },
1697
1696
  snap: {
1698
1697
  type: "object",
@@ -2445,7 +2444,6 @@ async function runBuild({
2445
2444
  nodeVersion: config2.nodeVersion,
2446
2445
  npmVersion: config2.npmVersion,
2447
2446
  pnpmVersion: config2.pnpmVersion,
2448
- yarnVersion: config2.yarnVersion,
2449
2447
  appBuilderLibVersion: config2.appBuilderLibVersion
2450
2448
  });
2451
2449
  } catch (e) {
@@ -4086,8 +4084,7 @@ async function getBuildAttributes({
4086
4084
  id: appId,
4087
4085
  nodeVersion,
4088
4086
  npmVersion,
4089
- pnpmVersion,
4090
- yarnVersion
4087
+ pnpmVersion
4091
4088
  } = getProjectConfig(configPath).config;
4092
4089
  const { id: userId } = await findAppUserId_default(appId);
4093
4090
  const { uid: contextUserId } = currentUser();
@@ -4100,7 +4097,6 @@ async function getBuildAttributes({
4100
4097
  nodeVersion,
4101
4098
  npmVersion,
4102
4099
  pnpmVersion,
4103
- yarnVersion,
4104
4100
  userId
4105
4101
  };
4106
4102
  }
@@ -4931,7 +4927,6 @@ async function queueSmokeTest({
4931
4927
  nodeVersion,
4932
4928
  npmVersion,
4933
4929
  pnpmVersion,
4934
- yarnVersion,
4935
4930
  userId
4936
4931
  }) {
4937
4932
  try {
@@ -4941,7 +4936,6 @@ async function queueSmokeTest({
4941
4936
  nodeVersion,
4942
4937
  npmVersion,
4943
4938
  pnpmVersion,
4944
- yarnVersion,
4945
4939
  userId,
4946
4940
  contextUserId
4947
4941
  });
@@ -5059,7 +5053,6 @@ async function smokeTestWorkflow({
5059
5053
  nodeVersion,
5060
5054
  npmVersion,
5061
5055
  pnpmVersion,
5062
- yarnVersion,
5063
5056
  userId
5064
5057
  } = await getBuildAttributes({
5065
5058
  buildId,
@@ -5074,7 +5067,6 @@ async function smokeTestWorkflow({
5074
5067
  nodeVersion,
5075
5068
  npmVersion,
5076
5069
  pnpmVersion,
5077
- yarnVersion,
5078
5070
  userId,
5079
5071
  contextUserId
5080
5072
  });
@@ -5170,7 +5162,7 @@ var package_default = {
5170
5162
  access: "public"
5171
5163
  },
5172
5164
  name: "@todesktop/cli",
5173
- version: "1.7.7",
5165
+ version: "1.8.1",
5174
5166
  license: "MIT",
5175
5167
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
5176
5168
  homepage: "https://todesktop.com/cli",