Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eladb/projen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.4
Choose a base ref
...
head repository: eladb/projen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.1.5
Choose a head ref
  • 2 commits
  • 12 files changed
  • 1 contributor

Commits on May 11, 2020

  1. fix: actually export all types

    Elad Ben-Israel committed May 11, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    Ulincsys John McGinness
    Copy the full SHA
    5bcdd75 View commit details
  2. chore(release): 0.1.5

    Elad Ben-Israel committed May 11, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    Ulincsys John McGinness
    Copy the full SHA
    347dad2 View commit details
Showing with 42 additions and 36 deletions.
  1. +7 −0 CHANGELOG.md
  2. +2 −2 lib/file.ts
  3. +3 −3 lib/github-workflow.ts
  4. +2 −2 lib/ignore-file.ts
  5. +11 −11 lib/index.ts
  6. +8 −8 lib/jsii-project.ts
  7. +3 −3 lib/json.ts
  8. +2 −2 lib/license.ts
  9. +1 −1 lib/node-project.ts
  10. +1 −1 package.json
  11. +1 −2 projen.js
  12. +1 −1 version.json
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.1.5](https://github.com/eladb/projen/compare/v0.1.4...v0.1.5) (2020-05-11)


### Bug Fixes

* actually export all types ([5bcdd75](https://github.com/eladb/projen/commit/5bcdd75712ea9477677c41a4e3cd06215ef50490))

### [0.1.4](https://github.com/eladb/projen/compare/v0.1.3...v0.1.4) (2020-05-11)


4 changes: 2 additions & 2 deletions lib/file.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import { Construct, ISynthesisSession } from 'constructs';
import * as fs from 'fs';
import * as path from 'path';

export abstract class File extends Construct {
export abstract class FileBase extends Construct {
public readonly path: string;

constructor(scope: Construct, filePath: string) {
@@ -11,7 +11,7 @@ export abstract class File extends Construct {
this.path = filePath;
}

protected abstract get data(): unknown;
protected abstract get data(): any;

public onSynthesize(session: ISynthesisSession): void {
const filePath = path.join(session.outdir, this.path);
6 changes: 3 additions & 3 deletions lib/github-workflow.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from 'constructs';
import { File } from './file';
import { FileBase } from './file';
import * as YAML from 'yaml';
import { GENERATION_DISCLAIMER } from './common';

@@ -10,7 +10,7 @@ export interface GithubWorkflowOptions {
readonly name?: string;
}

export class GithubWorkflow extends File {
export class GithubWorkflow extends FileBase {

private readonly name: string;
private events: { [event: string]: any } = { };
@@ -36,7 +36,7 @@ export class GithubWorkflow extends File {
};
}

public get data() {
public get data(): any {
const workflow = {
name: this.name,
on: this.events,
4 changes: 2 additions & 2 deletions lib/ignore-file.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { File } from './file';
import { FileBase } from './file';
import { Construct } from 'constructs';
import { GENERATION_DISCLAIMER } from './common';

export class IgnoreFile extends File {
export class IgnoreFile extends FileBase {
private readonly excludes = new Array<string>();
private readonly includes = new Array<string>();

22 changes: 11 additions & 11 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Hello class.
*/
export class Hello {
/**
* Hey there!
*/
public world() {
return 'Hello, world!';
}
}
export * from './file';
export * from './github-workflow';
export * from './ignore-file';
export * from './jsii-project';
export * from './json';
export * from './license';
export * from './node-project';
export * from './project';
export * from './semver';
export * from './bump';
export * from './eslint';
16 changes: 8 additions & 8 deletions lib/jsii-project.ts
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ export enum Stability {
}

export interface JsiiJavaTarget {
readonly package: string;
readonly javaPackage: string;
readonly mavenGroupId: string;
readonly mavenArtifactId: string;
}
@@ -51,15 +51,15 @@ export interface JsiiPythonTarget {
}

export interface JsiiDotNetTarget {
readonly namespace: string;
readonly dotNetNamespace: string;
readonly packageId: string;
}

export class JsiiProject extends NodeProject {
constructor(options: JsiiProjectOptions) {
super(options);

this.setFields({ types: 'lib/index.d.ts' });
this.addFields({ types: 'lib/index.d.ts' });

this.addScripts({
compile: 'jsii',
@@ -70,15 +70,15 @@ export class JsiiProject extends NodeProject {
build: 'yarn compile && yarn test && yarn run package',
});

this.setFields({ stability: options.stability ?? Stability.STABLE });
this.addFields({ stability: options.stability ?? Stability.STABLE });

if (options.stability === Stability.DEPRECATED) {
this.setFields({ deprecated: true });
this.addFields({ deprecated: true });
}

const targets: Record<string, any> = { };

this.setFields({
this.addFields({
jsii: {
outdir: 'dist',
targets,
@@ -91,7 +91,7 @@ export class JsiiProject extends NodeProject {

if (options.java) {
targets.java = {
package: options.java.package,
package: options.java.javaPackage,
maven: {
groupId: options.java.mavenGroupId,
artifactId: options.java.mavenArtifactId,
@@ -112,7 +112,7 @@ export class JsiiProject extends NodeProject {

if (options.dotnet) {
targets.dotnet = {
namespace: options.dotnet.namespace,
namespace: options.dotnet.dotNetNamespace,
packageId: options.dotnet.packageId,
};

6 changes: 3 additions & 3 deletions lib/json.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Construct } from 'constructs';
import { File } from './file';
import { FileBase } from './file';

export class JsonFile extends File {
export class JsonFile extends FileBase {
private readonly obj: object;

constructor(scope: Construct, filePath: string, obj: any) {
super(scope, filePath);
this.obj = obj;
}

protected get data() {
protected get data(): any {
return JSON.stringify(this.obj, undefined, 2);
}
}
4 changes: 2 additions & 2 deletions lib/license.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Construct } from 'constructs';
import { File } from './file';
import { FileBase } from './file';
import * as fs from 'fs';

export class License extends File {
export class License extends FileBase {
private readonly buffer: Buffer;

constructor(scope: Construct, spdx: string) {
2 changes: 1 addition & 1 deletion lib/node-project.ts
Original file line number Diff line number Diff line change
@@ -166,7 +166,7 @@ export class NodeProject extends Project {
}
}

public setFields(fields: { [name: string]: any }) {
public addFields(fields: { [name: string]: any }) {
for (const [ name, value ] of Object.entries(fields)) {
this.manifest[name] = value;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"//": "Generated by projen. To modify, edit \"projen.js\" and run \"projen\"",
"name": "projen",
"version": "0.1.4",
"version": "0.1.5",
"description": "A new generation of project generators",
"main": "lib/index.js",
"repository": {
3 changes: 1 addition & 2 deletions projen.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { JsiiProject } = require('./lib/jsii-project');
const { Semver } = require('./lib/semver');
const { JsiiProject, Semver } = require('./lib');

const project = new JsiiProject({
name: 'projen',
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.1.4"
"version": "0.1.5"
}