Skip to content

Commit 4c0fd9c

Browse files
fix(@turbo/repository): correct exports from native lib (#10475)
### Description The actual exports had drifted from our type declarations. ### Testing Instructions Quick red/green unit test to verify we actually provide what we say we provide.
1 parent 07cb01a commit 4c0fd9c

File tree

11 files changed

+38
-19
lines changed

11 files changed

+38
-19
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { describe, it } from "node:test";
2+
import { strict as assert } from "node:assert";
3+
import {
4+
Package,
5+
PackageDetails,
6+
PackageManager,
7+
Workspace,
8+
} from "../js/dist/index.js";
9+
10+
const nativeLibExports = [Package, PackageDetails, PackageManager, Workspace];
11+
12+
describe("exports", () => {
13+
for (const nativeExport of nativeLibExports) {
14+
it("is defined", () => {
15+
assert.notEqual(nativeExport, undefined);
16+
});
17+
}
18+
});

packages/turbo-repository/js/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ switch (platform) {
118118

119119
nativeBinding = loadViaSuffix(suffix);
120120

121-
const { PackageManagerRoot, PackageManager, Workspace } = nativeBinding;
121+
const { PackageDetails, PackageManager, Workspace, Package } = nativeBinding;
122122

123-
module.exports.PackageManagerRoot = PackageManagerRoot;
124123
module.exports.PackageManager = PackageManager;
125124
module.exports.Workspace = Workspace;
125+
module.exports.PackageDetails = PackageDetails;
126+
module.exports.Package = Package;
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"description": "",
55
"bugs": "https://github.com/vercel/turborepo/issues",
66
"homepage": "https://turborepo.com",
@@ -15,13 +15,13 @@
1515
],
1616
"types": "dist/index.d.ts",
1717
"optionalDependencies": {
18-
"@turbo/repository-darwin-x64": "0.0.1-canary.15",
19-
"@turbo/repository-darwin-arm64": "0.0.1-canary.15",
20-
"@turbo/repository-linux-x64-gnu": "0.0.1-canary.15",
21-
"@turbo/repository-linux-arm64-gnu": "0.0.1-canary.15",
22-
"@turbo/repository-linux-x64-musl": "0.0.1-canary.15",
23-
"@turbo/repository-linux-arm64-musl": "0.0.1-canary.15",
24-
"@turbo/repository-win32-x64-msvc": "0.0.1-canary.15",
25-
"@turbo/repository-win32-arm64-msvc": "0.0.1-canary.15"
18+
"@turbo/repository-darwin-x64": "0.0.1-canary.16",
19+
"@turbo/repository-darwin-arm64": "0.0.1-canary.16",
20+
"@turbo/repository-linux-x64-gnu": "0.0.1-canary.16",
21+
"@turbo/repository-linux-arm64-gnu": "0.0.1-canary.16",
22+
"@turbo/repository-linux-x64-musl": "0.0.1-canary.16",
23+
"@turbo/repository-linux-arm64-musl": "0.0.1-canary.16",
24+
"@turbo/repository-win32-x64-msvc": "0.0.1-canary.16",
25+
"@turbo/repository-win32-arm64-msvc": "0.0.1-canary.16"
2626
}
2727
}

packages/turbo-repository/npm/darwin-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository-darwin-arm64",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/vercel/turborepo",

packages/turbo-repository/npm/darwin-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository-darwin-x64",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/vercel/turborepo",

packages/turbo-repository/npm/linux-arm64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository-linux-arm64-gnu",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/vercel/turborepo",

packages/turbo-repository/npm/linux-arm64-musl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository-linux-arm64-musl",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/vercel/turborepo",

packages/turbo-repository/npm/linux-x64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository-linux-x64-gnu",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/vercel/turborepo",

packages/turbo-repository/npm/linux-x64-musl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository-linux-x64-musl",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/vercel/turborepo",

packages/turbo-repository/npm/win32-arm64-msvc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turbo/repository-win32-arm64-msvc",
3-
"version": "0.0.1-canary.15",
3+
"version": "0.0.1-canary.16",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/vercel/turborepo",

0 commit comments

Comments
 (0)