@vercel/rust 1.0.5 → 1.0.6

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/index.js +7 -6
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -63,15 +63,16 @@ var installRustToolchain = async () => {
63
63
  try {
64
64
  await (0, import_execa.default)(`rustup -V`, [], { shell: true, stdio: "ignore" });
65
65
  (0, import_build_utils.debug)("Rust Toolchain is already installed, skipping download");
66
- } catch (err) {
66
+ } catch (_err) {
67
67
  await downloadRustToolchain();
68
68
  }
69
69
  };
70
70
 
71
71
  // src/lib/cargo.ts
72
- var import_node_fs = __toESM(require("fs"));
72
+ var import_promises = require("fs/promises");
73
+ var import_node_fs = require("fs");
73
74
  var import_node_path = __toESM(require("path"));
74
- var import_toml = __toESM(require("@iarna/toml"));
75
+ var import_smol_toml = require("smol-toml");
75
76
  var import_execa2 = __toESM(require("execa"));
76
77
  async function getCargoMetadata(options) {
77
78
  const { stdout: cargoMetaData } = await (0, import_execa2.default)(
@@ -89,7 +90,7 @@ async function findCargoWorkspace(config) {
89
90
  );
90
91
  const projectDescription = JSON.parse(projectDescriptionStr);
91
92
  return {
92
- toml: await import_toml.default.parse.stream(import_node_fs.default.createReadStream(projectDescription.root)),
93
+ toml: (0, import_smol_toml.parse)(await (0, import_promises.readFile)(projectDescription.root, "utf8")),
93
94
  root: projectDescription.root
94
95
  };
95
96
  }
@@ -98,10 +99,10 @@ async function findCargoBuildConfiguration(workspace) {
98
99
  import_node_path.default.dirname(workspace.root),
99
100
  ".cargo/config.toml"
100
101
  );
101
- if (!import_node_fs.default.existsSync(configPath)) {
102
+ if (!(0, import_node_fs.existsSync)(configPath)) {
102
103
  return null;
103
104
  }
104
- const config = await import_toml.default.parse.stream(import_node_fs.default.createReadStream(configPath));
105
+ const config = (0, import_smol_toml.parse)(await (0, import_promises.readFile)(configPath, "utf8"));
105
106
  return config;
106
107
  }
107
108
  function findBinaryName(workspace, entryPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/rust",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/rust",
@@ -13,7 +13,7 @@
13
13
  "dist"
14
14
  ],
15
15
  "dependencies": {
16
- "@iarna/toml": "^2.2.5",
16
+ "smol-toml": "1.5.2",
17
17
  "execa": "5"
18
18
  },
19
19
  "devDependencies": {
@@ -29,8 +29,8 @@
29
29
  "rimraf": "^4.1.1",
30
30
  "ts-jest": "^29.0.5",
31
31
  "typescript": "^4.9.4",
32
- "@vercel/build-utils": "13.2.15",
33
- "@vercel/routing-utils": "5.3.2"
32
+ "@vercel/build-utils": "13.12.1",
33
+ "@vercel/routing-utils": "6.1.1"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "node ../../utils/build-builder.mjs",