@alloy-js/java 0.6.0 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alloy-js/java",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -16,18 +16,18 @@
16
16
  "dependencies": {
17
17
  "change-case": "^5.4.4",
18
18
  "pathe": "^1.1.2",
19
- "@alloy-js/core": "~0.6.0"
19
+ "@alloy-js/core": "~0.8.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@babel/cli": "^7.24.7",
23
23
  "@babel/preset-typescript": "^7.24.7",
24
24
  "@microsoft/api-extractor": "^7.47.7",
25
- "@rollup/plugin-babel": "^6.0.4",
26
25
  "@rollup/plugin-typescript": "^11.1.6",
27
26
  "concurrently": "^8.2.2",
28
27
  "typescript": "^5.7.3",
29
28
  "vitest": "^3.0.4",
30
- "@alloy-js/babel-preset": "~0.2.0"
29
+ "@alloy-js/babel-preset": "~0.2.0",
30
+ "@alloy-js/rollup-plugin": "~0.1.0"
31
31
  },
32
32
  "type": "module",
33
33
  "scripts": {
@@ -18,7 +18,7 @@ export function ArgumentList(props: ArgumentListProps) {
18
18
  return (
19
19
  <group>
20
20
  (
21
- <Indent break="soft" trailingBreak>
21
+ <Indent softline trailingBreak>
22
22
  <For each={props.args ?? []} comma line>
23
23
  {(value) => value}
24
24
  </For>
@@ -14,7 +14,7 @@ export function NamedArgumentList(props: NamedArgumentListProps) {
14
14
  return (
15
15
  <group>
16
16
  (
17
- <Indent break="soft">
17
+ <Indent softline>
18
18
  <For each={Object.entries(props.args)} comma line>
19
19
  {([key, value]) => {
20
20
  return (
@@ -40,7 +40,7 @@ export function TypeArguments(props: TypeArgumentsProps) {
40
40
  <Match else>
41
41
  <group>
42
42
  {"<"}
43
- <Indent break="soft">
43
+ <Indent softline>
44
44
  <Switch>
45
45
  <Match when={isTypeArgumentDescriptor(props.args![0])}>
46
46
  <For each={props.args as TypeArgumentDescriptor[]} comma line>
@@ -16,7 +16,7 @@ export function TypeParameters(props: TypeParametersProps) {
16
16
  <Show when={props.generics && Object.keys(props.generics).length > 0}>
17
17
  <group>
18
18
  {"<"}
19
- <Indent break="soft" trailingBreak>
19
+ <Indent softline trailingBreak>
20
20
  <For each={Object.entries(props.generics!)} comma line>
21
21
  {([name, constraint]) => (
22
22
  <>
package/temp/api.json CHANGED
@@ -175,7 +175,7 @@
175
175
  {
176
176
  "kind": "Function",
177
177
  "canonicalReference": "@alloy-js/java!Annotation:function(1)",
178
- "docComment": "/**\n * Use an annotation in code, not declaring a new annotation. For instance, use this if you want to annotate a method with '\\@Override'.\n */\n",
178
+ "docComment": "/**\n * Use an annotation in code, not declaring a new annotation.\n * For instance, use this if you want to annotate a method with '\\@Override'.\n */\n",
179
179
  "excerptTokens": [
180
180
  {
181
181
  "kind": "Content",
@@ -309,7 +309,7 @@
309
309
  {
310
310
  "kind": "Function",
311
311
  "canonicalReference": "@alloy-js/java!ArgumentList:function(1)",
312
- "docComment": "/**\n * A list of arguments to be passed to a function, constructor, enum, and so forth. Includes parenthesis when arguments are passed, otherwise returns an empty string.\n */\n",
312
+ "docComment": "/**\n * A list of arguments to be passed to a function, constructor, enum, and so\n * forth. Includes parenthesis when arguments are passed, otherwise returns an\n * empty string.\n */\n",
313
313
  "excerptTokens": [
314
314
  {
315
315
  "kind": "Content",
@@ -598,7 +598,7 @@
598
598
  {
599
599
  "kind": "Function",
600
600
  "canonicalReference": "@alloy-js/java!Constructor:function(1)",
601
- "docComment": "/**\n * Declare a constructor, usually for a class or enum If no name is provided, will try take name from class or enum declaration\n */\n",
601
+ "docComment": "/**\n * Declare a constructor, usually for a class or enum\n * If no name is provided, will try take name from class or enum declaration\n */\n",
602
602
  "excerptTokens": [
603
603
  {
604
604
  "kind": "Content",
@@ -1294,7 +1294,7 @@
1294
1294
  {
1295
1295
  "kind": "Function",
1296
1296
  "canonicalReference": "@alloy-js/java!Declaration:function(1)",
1297
- "docComment": "/**\n * Declare a symbol in the program. Declaring classes, interfaces, enums, etc. Should also pass in access modifier so we can manage access\n */\n",
1297
+ "docComment": "/**\n * Declare a symbol in the program. Declaring classes, interfaces, enums, etc. Should also pass in\n * access modifier so we can manage access\n */\n",
1298
1298
  "excerptTokens": [
1299
1299
  {
1300
1300
  "kind": "Content",
@@ -1536,7 +1536,7 @@
1536
1536
  {
1537
1537
  "kind": "Function",
1538
1538
  "canonicalReference": "@alloy-js/java!EnumMemberList:function(1)",
1539
- "docComment": "/**\n * Create a list of enum members, joining with a comma and a hardline, and ending with a semicolon.\n */\n",
1539
+ "docComment": "/**\n * Create a list of enum members, joining with a comma and a hardline, and\n * ending with a semicolon.\n */\n",
1540
1540
  "excerptTokens": [
1541
1541
  {
1542
1542
  "kind": "Content",
@@ -2638,7 +2638,7 @@
2638
2638
  {
2639
2639
  "kind": "Interface",
2640
2640
  "canonicalReference": "@alloy-js/java!JavaOutputSymbol:interface",
2641
- "docComment": "/**\n * Represents an 'exported' symbol from a .java file. Class, enum, interface etc. Not considered exported if private\n */\n",
2641
+ "docComment": "/**\n * Represents an 'exported' symbol from a .java file. Class, enum, interface etc.\n * Not considered exported if private\n */\n",
2642
2642
  "excerptTokens": [
2643
2643
  {
2644
2644
  "kind": "Content",
@@ -2826,7 +2826,7 @@
2826
2826
  {
2827
2827
  "kind": "PropertySignature",
2828
2828
  "canonicalReference": "@alloy-js/java!JavaProjectScope#dependencies:member",
2829
- "docComment": "/**\n * The dependencies of this project Map qualified package name to dependency\n */\n",
2829
+ "docComment": "/**\n * The dependencies of this project\n * Map qualified package name to dependency\n */\n",
2830
2830
  "excerptTokens": [
2831
2831
  {
2832
2832
  "kind": "Content",
@@ -3492,18 +3492,10 @@
3492
3492
  "kind": "Content",
3493
3493
  "text": "): "
3494
3494
  },
3495
- {
3496
- "kind": "Content",
3497
- "text": "import(\"@alloy-js/core\")."
3498
- },
3499
3495
  {
3500
3496
  "kind": "Reference",
3501
- "text": "Child",
3502
- "canonicalReference": "@alloy-js/core!Child:type"
3503
- },
3504
- {
3505
- "kind": "Content",
3506
- "text": "[]"
3497
+ "text": "Children",
3498
+ "canonicalReference": "@alloy-js/core!Children:type"
3507
3499
  },
3508
3500
  {
3509
3501
  "kind": "Content",
@@ -3513,7 +3505,7 @@
3513
3505
  "fileUrlPath": "src/components/Method.tsx",
3514
3506
  "returnTypeTokenRange": {
3515
3507
  "startIndex": 3,
3516
- "endIndex": 6
3508
+ "endIndex": 4
3517
3509
  },
3518
3510
  "releaseTag": "Public",
3519
3511
  "overloadIndex": 1,
@@ -3729,7 +3721,7 @@
3729
3721
  {
3730
3722
  "kind": "Interface",
3731
3723
  "canonicalReference": "@alloy-js/java!ModifierProps:interface",
3732
- "docComment": "/**\n * Objects extend this interface to allow to take modifiers as boolean props. Then can declare components like so\n *\n * `<Class public final abstract />`\n *\n * Error will be thrown if try to specify multiple access modifiers\n */\n",
3724
+ "docComment": "/**\n * Objects extend this interface to allow to take modifiers as boolean props.\n * Then can declare components like so\n *\n * `<Class public final abstract />`\n *\n * Error will be thrown if try to specify multiple access modifiers\n */\n",
3733
3725
  "excerptTokens": [
3734
3726
  {
3735
3727
  "kind": "Content",
@@ -4307,7 +4299,7 @@
4307
4299
  {
4308
4300
  "kind": "Function",
4309
4301
  "canonicalReference": "@alloy-js/java!ObjectDeclaration:function(1)",
4310
- "docComment": "/**\n * Shorthand to instantiate a new object. Declares it with 'new' and passes arguments to the constructor of the object, if any\n */\n",
4302
+ "docComment": "/**\n * Shorthand to instantiate a new object.\n * Declares it with 'new' and passes arguments to the constructor of the object, if any\n */\n",
4311
4303
  "excerptTokens": [
4312
4304
  {
4313
4305
  "kind": "Content",
@@ -4928,18 +4920,10 @@
4928
4920
  "kind": "Content",
4929
4921
  "text": "): "
4930
4922
  },
4931
- {
4932
- "kind": "Content",
4933
- "text": "\"\" | import(\"@alloy-js/core\")."
4934
- },
4935
4923
  {
4936
4924
  "kind": "Reference",
4937
- "text": "Child",
4938
- "canonicalReference": "@alloy-js/core!Child:type"
4939
- },
4940
- {
4941
- "kind": "Content",
4942
- "text": "[]"
4925
+ "text": "Children",
4926
+ "canonicalReference": "@alloy-js/core!Children:type"
4943
4927
  },
4944
4928
  {
4945
4929
  "kind": "Content",
@@ -4949,7 +4933,7 @@
4949
4933
  "fileUrlPath": "src/components/MavenProject.tsx",
4950
4934
  "returnTypeTokenRange": {
4951
4935
  "startIndex": 3,
4952
- "endIndex": 6
4936
+ "endIndex": 4
4953
4937
  },
4954
4938
  "releaseTag": "Public",
4955
4939
  "overloadIndex": 1,
@@ -5097,7 +5081,7 @@
5097
5081
  {
5098
5082
  "kind": "Function",
5099
5083
  "canonicalReference": "@alloy-js/java!ProjectDirectory:function(1)",
5100
- "docComment": "/**\n * Represents a java project directory. Use if you want to generate a Java project with a build tool included (maven, gradle etc).\n */\n",
5084
+ "docComment": "/**\n * Represents a java project directory. Use if you want to generate a Java project\n * with a build tool included (maven, gradle etc).\n */\n",
5101
5085
  "excerptTokens": [
5102
5086
  {
5103
5087
  "kind": "Content",
@@ -5215,7 +5199,7 @@
5215
5199
  {
5216
5200
  "kind": "PropertySignature",
5217
5201
  "canonicalReference": "@alloy-js/java!ProjectDirectoryProps#mavenProjectConfig:member",
5218
- "docComment": "/**\n * Specify project configuration for either maven or gradle. If not specified, will create generic Java project\n */\n",
5202
+ "docComment": "/**\n * Specify project configuration for either maven or gradle.\n * If not specified, will create generic Java project\n */\n",
5219
5203
  "excerptTokens": [
5220
5204
  {
5221
5205
  "kind": "Content",
@@ -5737,7 +5721,7 @@
5737
5721
  {
5738
5722
  "kind": "Function",
5739
5723
  "canonicalReference": "@alloy-js/java!TypeArguments:function(1)",
5740
- "docComment": "/**\n * Type arguments for a generic type. Can be called with either an array of Children which are rendered as type arguments, or an array of {@link TypeArgumentDescriptor}s which allow for specifying use-site variance.\n */\n",
5724
+ "docComment": "/**\n * Type arguments for a generic type. Can be called with either an array of\n * Children which are rendered as type arguments, or an array of\n * {@link TypeArgumentDescriptor}s which allow for specifying use-site variance.\n */\n",
5741
5725
  "excerptTokens": [
5742
5726
  {
5743
5727
  "kind": "Content",
@@ -6159,18 +6143,10 @@
6159
6143
  "kind": "Content",
6160
6144
  "text": "): "
6161
6145
  },
6162
- {
6163
- "kind": "Content",
6164
- "text": "import(\"@alloy-js/core\")."
6165
- },
6166
6146
  {
6167
6147
  "kind": "Reference",
6168
- "text": "Child",
6169
- "canonicalReference": "@alloy-js/core!Child:type"
6170
- },
6171
- {
6172
- "kind": "Content",
6173
- "text": "[]"
6148
+ "text": "Children",
6149
+ "canonicalReference": "@alloy-js/core!Children:type"
6174
6150
  },
6175
6151
  {
6176
6152
  "kind": "Content",
@@ -6180,7 +6156,7 @@
6180
6156
  "fileUrlPath": "src/components/Variable.tsx",
6181
6157
  "returnTypeTokenRange": {
6182
6158
  "startIndex": 3,
6183
- "endIndex": 6
6159
+ "endIndex": 4
6184
6160
  },
6185
6161
  "releaseTag": "Public",
6186
6162
  "overloadIndex": 1,
package/vitest.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { babel } from "@rollup/plugin-babel";
1
+ import alloyPlugin from "@alloy-js/rollup-plugin";
2
2
  import { defineConfig } from "vitest/config";
3
3
 
4
4
  export default defineConfig({
@@ -6,13 +6,5 @@ export default defineConfig({
6
6
  jsx: "preserve",
7
7
  sourcemap: "both",
8
8
  },
9
- plugins: [
10
- babel({
11
- inputSourceMap: true as any,
12
- sourceMaps: "both",
13
- babelHelpers: "bundled",
14
- extensions: [".ts", ".tsx"],
15
- presets: ["@babel/preset-typescript", "@alloy-js/babel-preset"],
16
- }),
17
- ],
9
+ plugins: [alloyPlugin()],
18
10
  });