@twin.org/nameof-transformer 0.9.2-next.8 → 0.9.2
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/es/index.js +1 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/manual.js +2 -0
- package/dist/es/manual.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/changelog.md +43 -0
- package/docs/reference/variables/version.md +1 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export function factory() {
|
|
|
10
10
|
* Exports the factory version.
|
|
11
11
|
* @returns The factory.
|
|
12
12
|
*/
|
|
13
|
-
export const version = "0.9.2
|
|
13
|
+
export const version = "0.9.2"; // x-release-please-version
|
|
14
14
|
/**
|
|
15
15
|
* Exports the factory name.
|
|
16
16
|
* @returns The factory.
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,OAAO;IACtB,OAAO,kBAAkB,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,OAAO;IACtB,OAAO,kBAAkB,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,8BAA8B,CAAC;AAEnD,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,eAAe,OAAO,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type * as ts from \"typescript\";\nimport { transformerFactory } from \"./transformer.js\";\n\n/**\n * Exports the factory.\n * @returns The factory.\n */\nexport function factory(): ts.TransformerFactory<ts.Node> {\n\treturn transformerFactory;\n}\n\n/**\n * Exports the factory version.\n * @returns The factory.\n */\nexport const version = \"0.9.2\"; // x-release-please-version\n\n/**\n * Exports the factory name.\n * @returns The factory.\n */\nexport const name = \"@twin.org/nameof-transformer\";\n\nexport * from \"./manual.js\";\nexport * from \"./svelte.js\";\n\nexport default factory;\n"]}
|
package/dist/es/manual.js
CHANGED
|
@@ -7,6 +7,8 @@ import { camelCase, kebabCase } from "./stringHelper.js";
|
|
|
7
7
|
* @returns The content with the transformers replace.
|
|
8
8
|
*/
|
|
9
9
|
export function manual(content) {
|
|
10
|
+
// allowed to disable rule here as it is before Is is available
|
|
11
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
10
12
|
if (typeof content === "string" && content.includes("nameof")) {
|
|
11
13
|
// Remove the import
|
|
12
14
|
content = content.replace(/import.*from "@twin\.org\/nameof";/g, "");
|
package/dist/es/manual.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual.js","sourceRoot":"","sources":["../../src/manual.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,OAAe;IACrC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/D,oBAAoB;QACpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAC;QAErE,mDAAmD;QACnD,sDAAsD;QACtD,MAAM,SAAS,GAAG,6BAA6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n/**\n * Replace the transformers manually.\n * @param content The content to replace the transformers in.\n * @returns The content with the transformers replace.\n */\nexport function manual(content: string): string {\n\tif (typeof content === \"string\" && content.includes(\"nameof\")) {\n\t\t// Remove the import\n\t\tcontent = content.replace(/import.*from \"@twin\\.org\\/nameof\";/g, \"\");\n\n\t\t// Replace the nameof<IMyObject>() with \"IMyObject\"\n\t\t// or the nameof<IMyObject<IType2>>() with \"IMyObject\"\n\t\tconst nameRegEx = /nameof<(.*?)(?:<.*>)?>\\(\\)/g;\n\t\tcontent = content.replace(nameRegEx, '\"$1\"');\n\n\t\t// Replace the nameofCamelCase<IMyObject>() with the camelCase version of the type name\n\t\t// e.g. nameofCamelCase<IMyObject>() => \"myObject\"\n\t\t// and nameofCamelCase<IMyObject<IType2>>() => \"myObject\"\n\t\tconst nameRegExCamelCase = /nameofCamelCase<(.*?)(?:<.*?>)?>\\(\\)/g;\n\t\tcontent = content.replace(\n\t\t\tnameRegExCamelCase,\n\t\t\t(match, typeName: string) => `\"${camelCase(typeName)}\"`\n\t\t);\n\n\t\t// Replace the nameofKebabCase<IMyObject>() with the kebabCase version of the type name\n\t\t// e.g. nameofKebabCase<IMyObject>() => \"my-object\"\n\t\t// and nameofKebabCase<IMyObject<IType2>>() => \"my-object\"\n\t\tconst nameRegExKebabCase = /nameofKebabCase<(.*?)(?:<.*?>)?>\\(\\)/g;\n\t\tcontent = content.replace(\n\t\t\tnameRegExKebabCase,\n\t\t\t(match, typeName: string) => `\"${kebabCase(typeName)}\"`\n\t\t);\n\n\t\t// Replace the nameof(object?.prop) with \"object.prop\"\n\t\tconst propRegEx = /nameof\\((.*?)\\)/g;\n\t\tcontent = content.replace(propRegEx, '\"$1\"');\n\n\t\t// Replace the nameofCamelCase(object?.prop) with \"object.prop\"\n\t\tconst propRegExCamelCase = /nameofCamelCase\\((.*?)\\)/g;\n\t\tcontent = content.replace(\n\t\t\tpropRegExCamelCase,\n\t\t\t(match, typeName: string) => `\"${camelCase(typeName)}\"`\n\t\t);\n\n\t\t// Replace the nameofKebabCase(object?.prop) with \"object.prop\"\n\t\tconst propRegExKebabCase = /nameofKebabCase\\((.*?)\\)/g;\n\t\tcontent = content.replace(\n\t\t\tpropRegExKebabCase,\n\t\t\t(match, typeName: string) => `\"${kebabCase(typeName)}\"`\n\t\t);\n\t}\n\treturn content;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"manual.js","sourceRoot":"","sources":["../../src/manual.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,OAAe;IACrC,+DAA+D;IAC/D,gDAAgD;IAChD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/D,oBAAoB;QACpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAC;QAErE,mDAAmD;QACnD,sDAAsD;QACtD,MAAM,SAAS,GAAG,6BAA6B,CAAC;QAChD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAE7C,uFAAuF;QACvF,kDAAkD;QAClD,yDAAyD;QACzD,MAAM,kBAAkB,GAAG,uCAAuC,CAAC;QACnE,OAAO,GAAG,OAAO,CAAC,OAAO,CACxB,kBAAkB,EAClB,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CACvD,CAAC;QAEF,uFAAuF;QACvF,mDAAmD;QACnD,0DAA0D;QAC1D,MAAM,kBAAkB,GAAG,uCAAuC,CAAC;QACnE,OAAO,GAAG,OAAO,CAAC,OAAO,CACxB,kBAAkB,EAClB,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CACvD,CAAC;QAEF,sDAAsD;QACtD,MAAM,SAAS,GAAG,kBAAkB,CAAC;QACrC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAE7C,+DAA+D;QAC/D,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;QACvD,OAAO,GAAG,OAAO,CAAC,OAAO,CACxB,kBAAkB,EAClB,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CACvD,CAAC;QAEF,+DAA+D;QAC/D,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;QACvD,OAAO,GAAG,OAAO,CAAC,OAAO,CACxB,kBAAkB,EAClB,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CACvD,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { camelCase, kebabCase } from \"./stringHelper.js\";\n\n/**\n * Replace the transformers manually.\n * @param content The content to replace the transformers in.\n * @returns The content with the transformers replace.\n */\nexport function manual(content: string): string {\n\t// allowed to disable rule here as it is before Is is available\n\t// eslint-disable-next-line no-restricted-syntax\n\tif (typeof content === \"string\" && content.includes(\"nameof\")) {\n\t\t// Remove the import\n\t\tcontent = content.replace(/import.*from \"@twin\\.org\\/nameof\";/g, \"\");\n\n\t\t// Replace the nameof<IMyObject>() with \"IMyObject\"\n\t\t// or the nameof<IMyObject<IType2>>() with \"IMyObject\"\n\t\tconst nameRegEx = /nameof<(.*?)(?:<.*>)?>\\(\\)/g;\n\t\tcontent = content.replace(nameRegEx, '\"$1\"');\n\n\t\t// Replace the nameofCamelCase<IMyObject>() with the camelCase version of the type name\n\t\t// e.g. nameofCamelCase<IMyObject>() => \"myObject\"\n\t\t// and nameofCamelCase<IMyObject<IType2>>() => \"myObject\"\n\t\tconst nameRegExCamelCase = /nameofCamelCase<(.*?)(?:<.*?>)?>\\(\\)/g;\n\t\tcontent = content.replace(\n\t\t\tnameRegExCamelCase,\n\t\t\t(match, typeName: string) => `\"${camelCase(typeName)}\"`\n\t\t);\n\n\t\t// Replace the nameofKebabCase<IMyObject>() with the kebabCase version of the type name\n\t\t// e.g. nameofKebabCase<IMyObject>() => \"my-object\"\n\t\t// and nameofKebabCase<IMyObject<IType2>>() => \"my-object\"\n\t\tconst nameRegExKebabCase = /nameofKebabCase<(.*?)(?:<.*?>)?>\\(\\)/g;\n\t\tcontent = content.replace(\n\t\t\tnameRegExKebabCase,\n\t\t\t(match, typeName: string) => `\"${kebabCase(typeName)}\"`\n\t\t);\n\n\t\t// Replace the nameof(object?.prop) with \"object.prop\"\n\t\tconst propRegEx = /nameof\\((.*?)\\)/g;\n\t\tcontent = content.replace(propRegEx, '\"$1\"');\n\n\t\t// Replace the nameofCamelCase(object?.prop) with \"object.prop\"\n\t\tconst propRegExCamelCase = /nameofCamelCase\\((.*?)\\)/g;\n\t\tcontent = content.replace(\n\t\t\tpropRegExCamelCase,\n\t\t\t(match, typeName: string) => `\"${camelCase(typeName)}\"`\n\t\t);\n\n\t\t// Replace the nameofKebabCase(object?.prop) with \"object.prop\"\n\t\tconst propRegExKebabCase = /nameofKebabCase\\((.*?)\\)/g;\n\t\tcontent = content.replace(\n\t\t\tpropRegExKebabCase,\n\t\t\t(match, typeName: string) => `\"${kebabCase(typeName)}\"`\n\t\t);\n\t}\n\treturn content;\n}\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function factory(): ts.TransformerFactory<ts.Node>;
|
|
|
8
8
|
* Exports the factory version.
|
|
9
9
|
* @returns The factory.
|
|
10
10
|
*/
|
|
11
|
-
export declare const version = "0.9.2
|
|
11
|
+
export declare const version = "0.9.2";
|
|
12
12
|
/**
|
|
13
13
|
* Exports the factory name.
|
|
14
14
|
* @returns The factory.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.2](https://github.com/iotaledger/twin-framework/compare/nameof-transformer-v0.9.2...nameof-transformer-v0.9.2) (2026-08-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* release to production ([b24cba1](https://github.com/iotaledger/twin-framework/commit/b24cba1b6a969278d638e632590602ec881e49fb))
|
|
9
|
+
* release to production ([787287d](https://github.com/iotaledger/twin-framework/commit/787287d06ea8319657401589d61fff369310c422))
|
|
10
|
+
* release to production ([53f4843](https://github.com/iotaledger/twin-framework/commit/53f484326b2851d7a506d2620db24c4a65cee7b3))
|
|
11
|
+
* release to production ([56cda4d](https://github.com/iotaledger/twin-framework/commit/56cda4da93e978c5be19ec7cfd421ae2a7fe4147))
|
|
12
|
+
* release to production ([f7c6586](https://github.com/iotaledger/twin-framework/commit/f7c6586f6976b903b647b4c5ac5ad9421e0c9051))
|
|
13
|
+
* release to production ([829d53d](https://github.com/iotaledger/twin-framework/commit/829d53d3953b1e1b40b0243c04cfdfd3842aac7b))
|
|
14
|
+
* release to production ([5cf3a76](https://github.com/iotaledger/twin-framework/commit/5cf3a76a09eff2e6414d0cba846c7c37400a11d6))
|
|
15
|
+
* release to production ([#330](https://github.com/iotaledger/twin-framework/issues/330)) ([d73f565](https://github.com/iotaledger/twin-framework/commit/d73f565588d156d23ef49b2a5718973756f7a696))
|
|
16
|
+
* release to production ([#382](https://github.com/iotaledger/twin-framework/issues/382)) ([bbed01a](https://github.com/iotaledger/twin-framework/commit/bbed01a605ee9724bda77a0f7feab249118c2d90))
|
|
17
|
+
* release to production ([#417](https://github.com/iotaledger/twin-framework/issues/417)) ([59727e7](https://github.com/iotaledger/twin-framework/commit/59727e73903a137310ca48fe469189cf29879cb9))
|
|
18
|
+
* release to production ([#459](https://github.com/iotaledger/twin-framework/issues/459)) ([e26e2d9](https://github.com/iotaledger/twin-framework/commit/e26e2d9a88767364c32494c45232033447b26e22))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Miscellaneous Chores
|
|
22
|
+
|
|
23
|
+
* release to production ([63cae24](https://github.com/iotaledger/twin-framework/commit/63cae2401f6c11f93b2a01260b665064e8bd28e0))
|
|
24
|
+
|
|
25
|
+
## [0.9.2-next.11](https://github.com/iotaledger/twin-framework/compare/nameof-transformer-v0.9.2-next.10...nameof-transformer-v0.9.2-next.11) (2026-08-20)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Miscellaneous Chores
|
|
29
|
+
|
|
30
|
+
* **nameof-transformer:** Synchronize repo versions
|
|
31
|
+
|
|
32
|
+
## [0.9.2-next.10](https://github.com/iotaledger/twin-framework/compare/nameof-transformer-v0.9.2-next.9...nameof-transformer-v0.9.2-next.10) (2026-08-11)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Miscellaneous Chores
|
|
36
|
+
|
|
37
|
+
* **nameof-transformer:** Synchronize repo versions
|
|
38
|
+
|
|
39
|
+
## [0.9.2-next.9](https://github.com/iotaledger/twin-framework/compare/nameof-transformer-v0.9.2-next.8...nameof-transformer-v0.9.2-next.9) (2026-08-10)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Miscellaneous Chores
|
|
43
|
+
|
|
44
|
+
* **nameof-transformer:** Synchronize repo versions
|
|
45
|
+
|
|
3
46
|
## [0.9.2-next.8](https://github.com/iotaledger/twin-framework/compare/nameof-transformer-v0.9.2-next.7...nameof-transformer-v0.9.2-next.8) (2026-08-10)
|
|
4
47
|
|
|
5
48
|
|
package/package.json
CHANGED