ts-proto 1.108.0 → 1.109.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/CHANGELOG.md +7 -0
- package/build/utils.js +7 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.109.0](https://github.com/stephenh/ts-proto/compare/v1.108.0...v1.109.0) (2022-03-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* import proto as type import if onlyTypes is set ([25d8e8b](https://github.com/stephenh/ts-proto/commit/25d8e8b9042142f1032feadc8a799b7a01115cc2))
|
|
7
|
+
|
|
1
8
|
# [1.108.0](https://github.com/stephenh/ts-proto/compare/v1.107.0...v1.108.0) (2022-03-07)
|
|
2
9
|
|
|
3
10
|
|
package/build/utils.js
CHANGED
|
@@ -170,6 +170,12 @@ function getPropertyAccessor(objectName, propertyName, optional = false) {
|
|
|
170
170
|
}
|
|
171
171
|
exports.getPropertyAccessor = getPropertyAccessor;
|
|
172
172
|
function impProto(options, module, type) {
|
|
173
|
-
|
|
173
|
+
const importString = `${type}@./${module}${options.fileSuffix}`;
|
|
174
|
+
if (options.onlyTypes) {
|
|
175
|
+
return ts_poet_1.imp('t:' + importString);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
return ts_poet_1.imp(importString);
|
|
179
|
+
}
|
|
174
180
|
}
|
|
175
181
|
exports.impProto = impProto;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-proto",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.109.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/plugin.js",
|
|
6
6
|
"repository": "github:stephenh/ts-proto",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dataloader": "^1.4.0",
|
|
65
65
|
"object-hash": "^1.3.1",
|
|
66
66
|
"protobufjs": "^6.8.8",
|
|
67
|
-
"ts-poet": "^4.
|
|
67
|
+
"ts-poet": "^4.10.0",
|
|
68
68
|
"ts-proto-descriptors": "1.6.0"
|
|
69
69
|
}
|
|
70
70
|
}
|