Releases: ItemConsulting/xp-codegen-plugin
Releases · ItemConsulting/xp-codegen-plugin
2.6.2
What's Changed
- Fix wrong path logged when generating from jar-file by @tajakobsen in #72
- Fix mixin index.d.ts on Windows by @tajakobsen in #73
Full Changelog: 2.6.1...2.6.2
2.6.1
What's Changed
- Prepend underscore when type name starts with digit by @tajakobsen in #69
Full Changelog: 2.6.0...2.6.1
2.6.0
What's Changed
- Ensure that file systems files wins over those in jars by @tajakobsen in #65
- Make output conform to prettier defaults by @tajakobsen in #67
Full Changelog: 2.5.0...2.6.0
2.5.0
What's Changed
- New Gradle-task
generateI18nPhrases
that reads all XML-files, and creates a new file (phrases.tmp.properties) with all phrases missing translations in phrases.properties #49
Full Changelog: 2.4.1...2.5.0
2.4.1
What's Changed
- Don't fail when no include dependencies by @tajakobsen in #61
- Don't fail task when missing
appName
in gradle by @tajakobsen in #62
Full Changelog: 2.4.0...2.4.1
2.4.0
What's Changed
- Generate typescript from jars in tmp folder by @tommyjl in #51
- Prevent duplicates in unions by @tajakobsen in #54
- Prevent site/styles.xml overwriting index.d.ts by @tajakobsen in #55
- Add index file for mixins by @tajakobsen in #57
Full Changelog: 2.3.0...2.4.0
Support ComponentMaps in XP 7.13
- Some new files will now be generated:
- /site/layout/index.d.ts
- /site/pages/index.d.ts
- /site/parts/index.d.ts
- These files re-exports the types. So you can now write
import type { ArticleList, EmployeeList } from "/site/parts";
- The new file also declares some global interfaces:
XpPartMap
,XpLayoutMap
andXpPageMap
. The@enonic-types
libraries after 7.13 will use these interfaces to automatically generate Component-trees that the developer can traverse when doinggetComponent()
orgetComponent()?.page?...
. The developer can now do if-statements againstcomponent.type
andcomponent.descriptor
, and will get the correct shape incomponent.config
. - This library doesn't generate
export interface Article { ... }
anymore, but instead generatesexport type Article = { ... }
. The reason is thatinterface Article
would not extendRecord<string, unknown>
, since interfaces can be expanded by 3rd party code (read project code), TypeScript could not guarantee that the key would be astring
. By making this atype
instead we lock down the shape, and can useRecord<string, unknown>
to constrain the shape.
Full Changelog: 2.2.2...2.3.0
Fix nested mixins inside sets
Fixes issue where nested mixins inside sets were not taken into account in some cases.
Full Changelog: 2.2.0...2.2.2
Sort imports in contentTypeIndex and xDataIndex files
There was an issue where this was not deterministic, and Linux and Mac outputted different files.
Full Changelog: 2.1.0...2.2.0
Rename `XP.XData` to `XpXData`
This makes this library conform to the official types released
from Enonic.
Full Changelog: 2.0.1...2.1.0