Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(generate, init): create new release #39

Merged
merged 44 commits into from
Nov 11, 2019
Merged

feat(generate, init): create new release #39

merged 44 commits into from
Nov 11, 2019

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Nov 11, 2019

This PR merges all the work from the milestone for v1.1.0. Since this has several new changes and is not backwards compatible, it should be released as a new MAJOR release. This should happen automatically because we mention the words "BREAKING CHANGE".

Changes

  • see commits and milestone

BREAKING CHANGE: The commands between v1.0.0 and this version are no longer compatible. We changed a few flags and used args instead. Please see the docs for the latest changes.

Screenshots

N/A

Checklist

  • your PR is pointed at next (unless it's a new release)
  • tested locally
  • installed new dependencies
  • updated the docs
  • added a test

JavaScript Joe and others added 23 commits October 30, 2019 13:40
* feat: update README and add CONTRIBUTING

* fix: update generate command args

* feat: update docs with new generate command info
* docs: update README.md

* docs: create .all-contributorsrc
* feat: add semantic-release/git

* feat: add npm plugin as well
* Update issue templates

Add a simple issue report template

* Create pull_request_template.md

add PR template
* docs: update README.md

* docs: update .all-contributorsrc
It makes more sense to call this bug because it's a bug report issue template
add feature request template
Remove stuff specific to Gatsby
* feat: add init command

* feat: add node types

* feat: add write to package.json in init

* refactor: write to package.json

* feat: add install eb-scripts line

* refactor: change name of vars

* chore: update oclif.manifest and README

* Update src/commands/init.ts

Co-Authored-By: Chris Ball <[email protected]>

* fix: modify order of updatedScripts
* docs: update README.md

* docs: update .all-contributorsrc
* first commit

* moar progress

* passing tests

* reorg deps

* cast as any properly

* updating per review

* move jest config into package.json

* feat: update circleci config
* docs: update README.md

* docs: update .all-contributorsrc
* feat: add prettier and husky

* chore: add eslint and deps

* chore: add eslint plugins prettier and eb
* fix: add back in semantic release plugins

* fix: add jest config and install fs-extra

* feat: add makeTempDir and removeTempDir utils

* wip: add initial generate test

* feat: add util fn to check if dir exists

* refactor: change names temp dir fns

* refactor: add index to simplify exports

* wip: add test with oclif

* feat: add checkFileExists util

* chore: update deps

* chore: add checkFileExists to index

* wip: almost there

* wip: generate test

* feat: add test for no flags

* wip: add oclif test

* feat: write snapshot test for generate error

* chore: clean up deps

* wip: add test to check custom templates

* feat: add test to check using custom templates

* refactor: use copyFile instead of writeFile

* feat: update snapshot and get test passing default

* refactor: create tests/helpers and move template

* chore: update order of types in package.json

* refactor: remove proxy fse fns

* refactor: clean up getTemplateLocation
* docs: update README.md

* docs: update .all-contributorsrc
* feat: add commit analyzer and rel not generator semantic release

* fix: only release if semantic-release passes

* refactor: use npm ci in circleci

* refactor: use yarn in circleci config

* fix: typo in release section

* fix: switch back to npm in config

* fix: change back to npm install
* fix: add back in semantic release plugins

* fix: add jest config and install fs-extra

* feat: add makeTempDir and removeTempDir utils

* feat: add util fn to check if dir exists

* refactor: change names temp dir fns

* wip: add test with oclif

* feat: add checkFileExists util

* wip: almost there

* wip: generate test

* feat: add test for no flags

* wip: add oclif test

* feat: write snapshot test for generate error

* chore: clean up deps

* wip: add test to check custom templates

* feat: add test to check using custom templates

* refactor: use copyFile instead of writeFile

* refactor: create tests/helpers and move template

* chore: update order of types in package.json

* refactor: remove proxy fse fns

* feat: add initial init test

* wip: get tests setup for init

* feat: finish yarn lock

* feat: add test for init without flag

* feat: add validProjectTypes to init, and test

* fix: run tests sequentially with --runInBand

* refactor: clean up unused tests init

* fix: update README formatting

* fix: update getTemplateLocation test

* refactor: fix getTemplateLocation test

* refactor: move afterEach and afterAll into describe block

* fix: switch to yarn

* fix: update test description

* docs: add comment about dup import of fn

* fix: update test description in init.test

* refactor: use flag or args for init, remove -p

* chore: update README

* wip: update init and test to make project required

* fix: tell jest to ignore lib

* fix: update init tests and snap

* feat: add path flag to generate and update temps

* fix: update generate to throw on no args

* fix: remove extra space in templates

* fix: update test description

* fix: update log statement in generate

* fix: remove other extra space

* fix: update old test

* fix: update helper template for test

* feat: add test for location flag

* fix: unskip tests

* refactor: remove side effect in last test

* feat: add -p to script in init

* refactor: unskip and use all tests

* fix: update test after rebase

* fix: update snapshot after rebase not updating it

* feat: add react-typescript-component templates

* refactor: improve typings in generate command

* refactor: remove old template flag from generate

* wip: add test for react-typescript-component

* feat: add react-typescript-component as new temp type

* fix: typos in react-ts-component template

* fix: remove old copyFile fn

* feat: add react-typescript to init projects

* feat: update snapshots and add test

* refactor: require to readFile to prevent caching

* fix: remove console.logs

* docs: update with new command info

* fix: update item in checklist for PR

* fix: update circle ci config

* fix: switch back to yarn
* fix: add back in semantic release plugins

* fix: add jest config and install fs-extra

* feat: add makeTempDir and removeTempDir utils

* feat: add util fn to check if dir exists

* refactor: change names temp dir fns

* wip: add test with oclif

* feat: add checkFileExists util

* wip: almost there

* wip: generate test

* feat: add test for no flags

* wip: add oclif test

* feat: write snapshot test for generate error

* chore: clean up deps

* wip: add test to check custom templates

* feat: add test to check using custom templates

* refactor: use copyFile instead of writeFile

* refactor: create tests/helpers and move template

* chore: update order of types in package.json

* refactor: remove proxy fse fns

* fix: run tests sequentially with --runInBand

* fix: update getTemplateLocation test

* refactor: fix getTemplateLocation test

* chore: update README

* fix: update init tests and snap

* fix: update generate to throw on no args

* fix: update test description

* fix: update old test

* refactor: remove side effect in last test

* feat: add -p to script in init

* refactor: unskip and use all tests

* fix: update test after rebase

* fix: update snapshot after rebase not updating it

* fix: errors after rebase

* fix: update snapshot
* feat: add component template

* refactor: change name to react-native-typescript

* refactor: change name to typescript component

* feat: add react-typescript-component to generate

* feat: add test for react-native-typescript-component

* feat: add react-native-typescript to init

* feat: add react-native-typescript screen template

* feat: add react-native-typescript-screen to generate

* wip: generate screen test

* wip: add note about screen template test

* feat: add e2e template

* feat: add e2e to init command

* feat: add e2e to generate

* fix: update quotes to double in e2e template

* feat: add e2e to react-native-ts and add tset

* feat: add e2e template test

* fix: update snapshot after changes

* feat: add util-typescript-template

* feat: add util-typescript to generate and init

* fix: add test and default path for utils temp

* fix: update generate test

* fix: update generate snapshot after new util template

* fix: update docs

* fix: clean up from comments

* fix: comment out skipped test

* fix: change component name in test
@jsjoeio jsjoeio requested a review from a team November 11, 2019 18:24
@jsjoeio jsjoeio self-assigned this Nov 11, 2019
Copy link
Member

@cball cball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great @jsjoeio!


## Checklist

- [ ] your PR is pointed at `next` (unless it's a new release)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this necessary? if this is our default branch I don't see anyone changing it. For new releases, I don't think we need to require a PR... it should probably just merge next -> master.

Copy link
Contributor Author

@jsjoeio jsjoeio Nov 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue yes. master is the default. New work goes into next. This way, if anyone goes to the project, they see master which is the code equivalent to our latest package release. Here's the comment where I proposed that: #18 (comment)

I don't think we need to require a PR... it should probably just merge next -> master

Hmm...I disagree here - I think the PR allows for an extra set of eyes. But if you don't, then we can skip that.

Copy link
Member

@cball cball Nov 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way, if anyone goes to the project, they see master

I'd argue that it's very often the case that in traditional OSS flow, master is the "yet to be released" work and it's fairly common to not have master be ahead of the released version.

image

image

image

Hmm...I disagree here - I think the PR allows for an extra set of eyes. But if you don't, then we can skip that.

The reason I don't think this is required is we review every PR that goes in. The merge / release step should be automated via tooling, so there should not be additional code that is added manually.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see what you're saying. Okay well by default semnatic-release creates a new release when we merge into master. I set it up the way it is now, to avoid releasing every time we merge to master.

So the new question is, how do you want to set it up so we PR into master and create a new trigger to generate a release?

jsjoeio and others added 10 commits November 11, 2019 12:07
* feat: update README and add CONTRIBUTING

* fix: update generate command args

* feat: update docs with new generate command info
* Update issue templates

Add a simple issue report template

* Create pull_request_template.md

add PR template
* feat: add init command

* feat: add node types

* feat: add write to package.json in init

* refactor: write to package.json

* feat: add install eb-scripts line

* refactor: change name of vars

* chore: update oclif.manifest and README

* Update src/commands/init.ts

Co-Authored-By: Chris Ball <[email protected]>

* fix: modify order of updatedScripts
* fix: add back in semantic release plugins

* fix: add jest config and install fs-extra

* feat: add makeTempDir and removeTempDir utils

* feat: add util fn to check if dir exists

* refactor: change names temp dir fns

* wip: add test with oclif

* feat: add checkFileExists util

* wip: almost there

* wip: generate test

* feat: add test for no flags

* wip: add oclif test

* feat: write snapshot test for generate error

* chore: clean up deps

* wip: add test to check custom templates

* feat: add test to check using custom templates

* refactor: use copyFile instead of writeFile

* refactor: create tests/helpers and move template

* chore: update order of types in package.json

* refactor: remove proxy fse fns

* feat: add initial init test

* wip: get tests setup for init

* feat: finish yarn lock

* feat: add test for init without flag

* feat: add validProjectTypes to init, and test

* fix: run tests sequentially with --runInBand

* refactor: clean up unused tests init

* fix: update README formatting

* fix: update getTemplateLocation test

* refactor: fix getTemplateLocation test

* refactor: move afterEach and afterAll into describe block

* fix: switch to yarn

* fix: update test description

* docs: add comment about dup import of fn

* fix: update test description in init.test

* refactor: use flag or args for init, remove -p

* chore: update README

* wip: update init and test to make project required

* fix: tell jest to ignore lib

* fix: update init tests and snap

* feat: add path flag to generate and update temps

* fix: update generate to throw on no args

* fix: remove extra space in templates

* fix: update test description

* fix: update log statement in generate

* fix: remove other extra space

* fix: update old test

* fix: update helper template for test

* feat: add test for location flag

* fix: unskip tests

* refactor: remove side effect in last test

* feat: add -p to script in init

* refactor: unskip and use all tests

* fix: update test after rebase

* fix: update snapshot after rebase not updating it

* feat: add react-typescript-component templates

* refactor: improve typings in generate command

* refactor: remove old template flag from generate

* wip: add test for react-typescript-component

* feat: add react-typescript-component as new temp type

* fix: typos in react-ts-component template

* fix: remove old copyFile fn

* feat: add react-typescript to init projects

* feat: update snapshots and add test

* refactor: require to readFile to prevent caching

* fix: remove console.logs

* docs: update with new command info

* fix: update item in checklist for PR

* fix: update circle ci config

* fix: switch back to yarn
* fix: add back in semantic release plugins

* fix: add jest config and install fs-extra

* feat: add makeTempDir and removeTempDir utils

* feat: add util fn to check if dir exists

* refactor: change names temp dir fns

* wip: add test with oclif

* feat: add checkFileExists util

* wip: almost there

* wip: generate test

* feat: add test for no flags

* wip: add oclif test

* feat: write snapshot test for generate error

* chore: clean up deps

* wip: add test to check custom templates

* feat: add test to check using custom templates

* refactor: use copyFile instead of writeFile

* refactor: create tests/helpers and move template

* chore: update order of types in package.json

* refactor: remove proxy fse fns

* fix: run tests sequentially with --runInBand

* fix: update getTemplateLocation test

* refactor: fix getTemplateLocation test

* chore: update README

* fix: update init tests and snap

* fix: update generate to throw on no args

* fix: update test description

* fix: update old test

* refactor: remove side effect in last test

* feat: add -p to script in init

* refactor: unskip and use all tests

* fix: update test after rebase

* fix: update snapshot after rebase not updating it

* fix: errors after rebase

* fix: update snapshot
* feat: add component template

* refactor: change name to react-native-typescript

* refactor: change name to typescript component

* feat: add react-typescript-component to generate

* feat: add test for react-native-typescript-component

* feat: add react-native-typescript to init

* feat: add react-native-typescript screen template

* feat: add react-native-typescript-screen to generate

* wip: generate screen test

* wip: add note about screen template test

* feat: add e2e template

* feat: add e2e to init command

* feat: add e2e to generate

* fix: update quotes to double in e2e template

* feat: add e2e to react-native-ts and add tset

* feat: add e2e template test

* fix: update snapshot after changes

* feat: add util-typescript-template

* feat: add util-typescript to generate and init

* fix: add test and default path for utils temp

* fix: update generate test

* fix: update generate snapshot after new util template

* fix: update docs

* fix: clean up from comments

* fix: comment out skipped test

* fix: change component name in test
@jsjoeio jsjoeio requested a review from cball November 11, 2019 19:29
Copy link
Member

@cball cball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more thoughts

choices: ["FC", "Class"],
default: "FC"
}
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this to try and enforce functional components

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ryan said yes. I don't have enough RN exp to say no.
image

to: <%= root %>/<%= path %>/<%= h.inflection.transform(name, ['undasherize', 'classify']) %>/<%= h.inflection.transform(name, ['undasherize', 'classify']) %>.tsx
---
<% const comp = h.inflection.transform(name, ['undasherize', 'classify']) -%>
<% if(componentType === 'Class') { -%>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep class components?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will discuss as a group later.

@jsjoeio jsjoeio merged commit c4d4f54 into master Nov 11, 2019
jsjoeio pushed a commit that referenced this pull request Nov 11, 2019
# [2.0.0](v1.0.0...v2.0.0) (2019-11-11)

### Features

* **generate, init:** create new release ([#39](#39)) ([c4d4f54](c4d4f54)), closes [#6](#6) [#13](#13) [#14](#14) [#15](#15) [#16](#16) [#11](#11) [#22](#22) [#8](#8) [#23](#23) [#26](#26) [#24](#24) [#35](#35) [#30](#30) [#36](#36) [#33](#33) [#37](#37) [#6](#6) [#15](#15) [#11](#11) [#36](#36) [#33](#33) [#37](#37)

### BREAKING CHANGES

* **generate, init:** modify how generate command works
@jsjoeio jsjoeio deleted the next branch November 11, 2019 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants