Skip to content

Commit 885117a

Browse files
committed
feat: namespace additional exports under 'exports' key
1 parent dff3247 commit 885117a

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

__snapshots__/find-python-projects.test.js.snap

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ exports[`find-python-projects Exports keys as instructed 1`] = `
1212
"install": "poetry install",
1313
},
1414
"directory": "test-fixtures/project-with-exports",
15+
"exports": {
16+
"tool.export.me.please": {
17+
"foo": "bar",
18+
"one": 1,
19+
"true": true,
20+
},
21+
},
1522
"name": "single-project",
1623
"path": "test-fixtures/project-with-exports/pyproject.toml",
1724
"pythonVersion": "^3.9",
18-
"tool.export.me.please": {
19-
"foo": "bar",
20-
"one": 1,
21-
"true": true,
22-
},
2325
},
2426
],
2527
"projects-by-command": {
@@ -30,14 +32,16 @@ exports[`find-python-projects Exports keys as instructed 1`] = `
3032
"install": "poetry install",
3133
},
3234
"directory": "test-fixtures/project-with-exports",
35+
"exports": {
36+
"tool.export.me.please": {
37+
"foo": "bar",
38+
"one": 1,
39+
"true": true,
40+
},
41+
},
3342
"name": "single-project",
3443
"path": "test-fixtures/project-with-exports/pyproject.toml",
3544
"pythonVersion": "^3.9",
36-
"tool.export.me.please": {
37-
"foo": "bar",
38-
"one": 1,
39-
"true": true,
40-
},
4145
},
4246
],
4347
},

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

find-python-projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async function createProjectResult(pyprojectPath, desiredExportPaths) {
9696
name: projectName,
9797
path: pyprojectPath,
9898
pythonVersion: pythonVersion,
99-
...arbitraryMetadata,
99+
...(desiredExportPaths && { exports: arbitraryMetadata }),
100100
};
101101
}
102102

0 commit comments

Comments
 (0)