Skip to content

Commit

Permalink
fix: repositoryUrl is ignored (#614)
Browse files Browse the repository at this point in the history
* fix: repositoryUrl is ignored

* jsii project as well
  • Loading branch information
mrgrain authored Sep 20, 2024
1 parent 695acd9 commit 32e3c98
Show file tree
Hide file tree
Showing 21 changed files with 3,327 additions and 2,333 deletions.
1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { UpgradeDependenciesSchedule } from 'projen/lib/javascript';
import { generateCdkCommonOptions, generateCdkConstructLibraryOptions } from './projenrc/cdk-constructlibrary-options';
import { generateCdkCommonOptions } from './projenrc/cdk-common-options';
import { generateCdkConstructLibraryOptions } from './projenrc/cdk-construct-library-options';
import { generateCdkJsiiOptions } from './projenrc/cdk-jsii-options';
import { generateYarnMonorepoOptions } from './projenrc/yarn-monorepo-options';
import { CdklabsJsiiProject } from './src';

Expand Down Expand Up @@ -34,6 +36,7 @@ project.addPeerDeps('constructs@^10.0.0');
generateCdkCommonOptions(project);
generateYarnMonorepoOptions(project);
generateCdkConstructLibraryOptions(project);
generateCdkJsiiOptions(project);

// that is this package!
project.deps.removeDependency(project.name);
Expand Down
4,264 changes: 2,100 additions & 2,164 deletions API.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,7 @@ import { PrimitiveType, Property } from '@jsii/spec';
import { typescript } from 'projen';
import { JsiiInterface } from './jsii-extend-interface';

export function generateCdkConstructLibraryOptions(project: typescript.TypeScriptProject) {
new JsiiInterface(project, {
name: 'CdkConstructLibraryOptions',
fqn: 'cdklabs-projen-project-types.CdkConstructLibraryOptions',
filePath: 'src/cdk-construct-library-options.ts',
extends: 'projen.awscdk.AwsCdkConstructLibraryOptions',
properties: [
...commonOptions,
{
name: 'minNodeVersion',
optional: true,
type: { primitive: PrimitiveType.String },
docs: {
summary: 'Minimum Node.js version to require via package.json `engines` (inclusive).',
remarks: [
'',
'Only set this if your package will not work properly on specific (older?)',
'Node versions.',
'',
].join('\n'),
default: '- no "engines" specified',
},
},
{
name: 'workflowNodeVersion',
optional: true,
type: { primitive: PrimitiveType.String },
docs: {
summary: 'The node version to use in GitHub workflows.',
default: '\'lts/*\'',
},
},
{
name: 'rosettaOptions',
optional: true,
type: { fqn: 'cdklabs-projen-project-types.RosettaOptions' },
docs: {
summary: 'Options for rosetta:extract task',
},
},
],
});
}

const commonOptions: Property[] = [
export const COMMON_OPTIONS: Property[] = [
{
name: 'private',
optional: true,
Expand Down Expand Up @@ -120,6 +76,6 @@ export function generateCdkCommonOptions(project: typescript.TypeScriptProject)
new JsiiInterface(project, {
name: 'CdkCommonOptions',
filePath: 'src/cdk-common-options.ts',
properties: commonOptions,
properties: COMMON_OPTIONS,
});
}
}
62 changes: 62 additions & 0 deletions projenrc/cdk-construct-library-options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { PrimitiveType } from '@jsii/spec';
import { typescript } from 'projen';
import { COMMON_OPTIONS } from './cdk-common-options';
import { JsiiInterface } from './jsii-extend-interface';

export function generateCdkConstructLibraryOptions(project: typescript.TypeScriptProject) {
new JsiiInterface(project, {
name: 'CdkConstructLibraryOptions',
fqn: 'cdklabs-projen-project-types.CdkConstructLibraryOptions',
filePath: 'src/cdk-construct-library-options.ts',
extends: 'projen.awscdk.AwsCdkConstructLibraryOptions',
updateProps: {
repositoryUrl: {
optional: true,
docs: {
default: '- generated from org tenancy and package name',
deprecated: 'use `repository`',
},
},
repository: {
docs: {
default: '- generated from org tenancy and package name',
},
},
},
properties: [
...COMMON_OPTIONS,
{
name: 'minNodeVersion',
optional: true,
type: { primitive: PrimitiveType.String },
docs: {
summary: 'Minimum Node.js version to require via package.json `engines` (inclusive).',
remarks: [
'',
'Only set this if your package will not work properly on specific (older?)',
'Node versions.',
'',
].join('\n'),
default: '- no "engines" specified',
},
},
{
name: 'workflowNodeVersion',
optional: true,
type: { primitive: PrimitiveType.String },
docs: {
summary: 'The node version to use in GitHub workflows.',
default: '\'lts/*\'',
},
},
{
name: 'rosettaOptions',
optional: true,
type: { fqn: 'cdklabs-projen-project-types.RosettaOptions' },
docs: {
summary: 'Options for rosetta:extract task',
},
},
],
});
}
28 changes: 28 additions & 0 deletions projenrc/cdk-jsii-options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { typescript } from 'projen';
import { COMMON_OPTIONS } from './cdk-common-options';
import { JsiiInterface } from './jsii-extend-interface';

export function generateCdkJsiiOptions(project: typescript.TypeScriptProject) {
new JsiiInterface(project, {
name: 'CdkJsiiProjectOptions',
filePath: 'src/cdk-jsii-options.ts',
extends: 'projen.cdk.JsiiProjectOptions',
updateProps: {
repositoryUrl: {
optional: true,
docs: {
default: '- generated from org tenancy and package name',
deprecated: 'use `repository`',
},
},
repository: {
docs: {
default: '- generated from org tenancy and package name',
},
},
},
properties: [
...COMMON_OPTIONS,
],
});
}
9 changes: 4 additions & 5 deletions src/cdk-construct-library-options.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 32e3c98

Please sign in to comment.