Skip to content

Commit 0a4fe27

Browse files
committed
feat: namespace additional exports under 'exports' key
1 parent dff3247 commit 0a4fe27

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed

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

Lines changed: 28 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
},
@@ -60,6 +64,7 @@ exports[`find-python-projects finds projects 1`] = `
6064
"install": "poetry install",
6165
},
6266
"directory": "test-fixtures/multi-project/project-1",
67+
"exports": {},
6368
"name": "sub-project-1",
6469
"path": "test-fixtures/multi-project/project-1/pyproject.toml",
6570
"pythonVersion": "^3.9",
@@ -73,6 +78,7 @@ exports[`find-python-projects finds projects 1`] = `
7378
"test": "poetry run pytest",
7479
},
7580
"directory": "test-fixtures/multi-project/project-2",
81+
"exports": {},
7682
"name": "sub-project-2",
7783
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
7884
"pythonVersion": "^3.9",
@@ -82,6 +88,7 @@ exports[`find-python-projects finds projects 1`] = `
8288
"install": null,
8389
},
8490
"directory": "test-fixtures/multi-project/project-4",
91+
"exports": {},
8592
"name": "sub-project-4",
8693
"path": "test-fixtures/multi-project/project-4/pyproject.toml",
8794
"pythonVersion": "^3.9",
@@ -93,6 +100,7 @@ exports[`find-python-projects finds projects 1`] = `
93100
"test": "pdm run test",
94101
},
95102
"directory": "test-fixtures/multi-project/project-5",
103+
"exports": {},
96104
"name": "project-5",
97105
"path": "test-fixtures/multi-project/project-5/pyproject.toml",
98106
"pythonVersion": "==3.12.*",
@@ -104,6 +112,7 @@ exports[`find-python-projects finds projects 1`] = `
104112
"test": "poe test",
105113
},
106114
"directory": "test-fixtures/multi-project/project-6",
115+
"exports": {},
107116
"name": "sub-project-6",
108117
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
109118
"pythonVersion": "^3.9",
@@ -117,6 +126,7 @@ exports[`find-python-projects finds projects 1`] = `
117126
"install": "poetry install",
118127
},
119128
"directory": "test-fixtures/multi-project/project-1",
129+
"exports": {},
120130
"name": "sub-project-1",
121131
"path": "test-fixtures/multi-project/project-1/pyproject.toml",
122132
"pythonVersion": "^3.9",
@@ -130,6 +140,7 @@ exports[`find-python-projects finds projects 1`] = `
130140
"test": "poetry run pytest",
131141
},
132142
"directory": "test-fixtures/multi-project/project-2",
143+
"exports": {},
133144
"name": "sub-project-2",
134145
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
135146
"pythonVersion": "^3.9",
@@ -141,6 +152,7 @@ exports[`find-python-projects finds projects 1`] = `
141152
"test": "pdm run test",
142153
},
143154
"directory": "test-fixtures/multi-project/project-5",
155+
"exports": {},
144156
"name": "project-5",
145157
"path": "test-fixtures/multi-project/project-5/pyproject.toml",
146158
"pythonVersion": "==3.12.*",
@@ -152,6 +164,7 @@ exports[`find-python-projects finds projects 1`] = `
152164
"test": "poe test",
153165
},
154166
"directory": "test-fixtures/multi-project/project-6",
167+
"exports": {},
155168
"name": "sub-project-6",
156169
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
157170
"pythonVersion": "^3.9",
@@ -167,6 +180,7 @@ exports[`find-python-projects finds projects 1`] = `
167180
"test": "poetry run pytest",
168181
},
169182
"directory": "test-fixtures/multi-project/project-2",
183+
"exports": {},
170184
"name": "sub-project-2",
171185
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
172186
"pythonVersion": "^3.9",
@@ -182,6 +196,7 @@ exports[`find-python-projects finds projects 1`] = `
182196
"test": "poetry run pytest",
183197
},
184198
"directory": "test-fixtures/multi-project/project-2",
199+
"exports": {},
185200
"name": "sub-project-2",
186201
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
187202
"pythonVersion": "^3.9",
@@ -197,6 +212,7 @@ exports[`find-python-projects finds projects 1`] = `
197212
"test": "poetry run pytest",
198213
},
199214
"directory": "test-fixtures/multi-project/project-2",
215+
"exports": {},
200216
"name": "sub-project-2",
201217
"path": "test-fixtures/multi-project/project-2/pyproject.toml",
202218
"pythonVersion": "^3.9",
@@ -208,6 +224,7 @@ exports[`find-python-projects finds projects 1`] = `
208224
"test": "pdm run test",
209225
},
210226
"directory": "test-fixtures/multi-project/project-5",
227+
"exports": {},
211228
"name": "project-5",
212229
"path": "test-fixtures/multi-project/project-5/pyproject.toml",
213230
"pythonVersion": "==3.12.*",
@@ -219,6 +236,7 @@ exports[`find-python-projects finds projects 1`] = `
219236
"test": "poe test",
220237
},
221238
"directory": "test-fixtures/multi-project/project-6",
239+
"exports": {},
222240
"name": "sub-project-6",
223241
"path": "test-fixtures/multi-project/project-6/pyproject.toml",
224242
"pythonVersion": "^3.9",

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+
exports: arbitraryMetadata,
100100
};
101101
}
102102

0 commit comments

Comments
 (0)