@twin.org/nameof-transformer 0.0.1-next.12 → 0.0.1-next.14
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/dist/cjs/index.cjs +3 -15
- package/dist/esm/index.mjs +3 -15
- package/dist/types/index.d.ts +1 -1
- package/docs/changelog.md +1 -1
- package/docs/reference/variables/version.md +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -122,22 +122,10 @@ function manual(content) {
|
|
|
122
122
|
// Replace the nameof<IMyObject>() with "IMyObject"
|
|
123
123
|
// or the nameof<IMyObject<IType2>>() with "IMyObject"
|
|
124
124
|
const nameRegEx = /nameof<(.*?)(?:<.*>)?>\(\)/g;
|
|
125
|
-
|
|
126
|
-
do {
|
|
127
|
-
matchName = nameRegEx.exec(content);
|
|
128
|
-
if (matchName && matchName.length === 2) {
|
|
129
|
-
content = content.replace(matchName[0], `"${matchName[1].replace(/\?/g, "")}"`);
|
|
130
|
-
}
|
|
131
|
-
} while (matchName);
|
|
125
|
+
content = content.replace(nameRegEx, '"$1"');
|
|
132
126
|
// Replace the nameof(object?.prop) with "object.prop"
|
|
133
127
|
const propRegEx = /nameof\((.*?)\)/g;
|
|
134
|
-
|
|
135
|
-
do {
|
|
136
|
-
matchProp = propRegEx.exec(content);
|
|
137
|
-
if (matchProp && matchProp.length === 2) {
|
|
138
|
-
content = content.replace(matchProp[0], `"${matchProp[1].replace(/\?/g, "")}"`);
|
|
139
|
-
}
|
|
140
|
-
} while (matchProp);
|
|
128
|
+
content = content.replace(propRegEx, '"$1"');
|
|
141
129
|
}
|
|
142
130
|
return content;
|
|
143
131
|
}
|
|
@@ -174,7 +162,7 @@ const factory = () => transformerFactory;
|
|
|
174
162
|
* Exports the factory version.
|
|
175
163
|
* @returns The factory.
|
|
176
164
|
*/
|
|
177
|
-
const version = "0.0.1-next.
|
|
165
|
+
const version = "0.0.1-next.14";
|
|
178
166
|
/**
|
|
179
167
|
* Exports the factory name.
|
|
180
168
|
* @returns The factory.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -99,22 +99,10 @@ function manual(content) {
|
|
|
99
99
|
// Replace the nameof<IMyObject>() with "IMyObject"
|
|
100
100
|
// or the nameof<IMyObject<IType2>>() with "IMyObject"
|
|
101
101
|
const nameRegEx = /nameof<(.*?)(?:<.*>)?>\(\)/g;
|
|
102
|
-
|
|
103
|
-
do {
|
|
104
|
-
matchName = nameRegEx.exec(content);
|
|
105
|
-
if (matchName && matchName.length === 2) {
|
|
106
|
-
content = content.replace(matchName[0], `"${matchName[1].replace(/\?/g, "")}"`);
|
|
107
|
-
}
|
|
108
|
-
} while (matchName);
|
|
102
|
+
content = content.replace(nameRegEx, '"$1"');
|
|
109
103
|
// Replace the nameof(object?.prop) with "object.prop"
|
|
110
104
|
const propRegEx = /nameof\((.*?)\)/g;
|
|
111
|
-
|
|
112
|
-
do {
|
|
113
|
-
matchProp = propRegEx.exec(content);
|
|
114
|
-
if (matchProp && matchProp.length === 2) {
|
|
115
|
-
content = content.replace(matchProp[0], `"${matchProp[1].replace(/\?/g, "")}"`);
|
|
116
|
-
}
|
|
117
|
-
} while (matchProp);
|
|
105
|
+
content = content.replace(propRegEx, '"$1"');
|
|
118
106
|
}
|
|
119
107
|
return content;
|
|
120
108
|
}
|
|
@@ -151,7 +139,7 @@ const factory = () => transformerFactory;
|
|
|
151
139
|
* Exports the factory version.
|
|
152
140
|
* @returns The factory.
|
|
153
141
|
*/
|
|
154
|
-
const version = "0.0.1-next.
|
|
142
|
+
const version = "0.0.1-next.14";
|
|
155
143
|
/**
|
|
156
144
|
* Exports the factory name.
|
|
157
145
|
* @returns The factory.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const factory: () => ts.TransformerFactory<ts.Node>;
|
|
|
8
8
|
* Exports the factory version.
|
|
9
9
|
* @returns The factory.
|
|
10
10
|
*/
|
|
11
|
-
export declare const version = "0.0.1-next.
|
|
11
|
+
export declare const version = "0.0.1-next.14";
|
|
12
12
|
/**
|
|
13
13
|
* Exports the factory name.
|
|
14
14
|
* @returns The factory.
|
package/docs/changelog.md
CHANGED
package/package.json
CHANGED