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: Bump example project to Angular 8 #311

Merged
merged 1 commit into from Sep 28, 2019
Merged

Conversation

wtho
Copy link
Collaborator

@wtho wtho commented Sep 18, 2019

I did most adjustments to be in sync with the default Angular CLI Boilerplate. I know many Angular projects will still differ from this, but I feel like it is the default starting point in the community. Open to discussion regarding this.

Changes in example project:

  • Removed the whole e2e section in angular.json, as it looks quite different in current generated projects, but updating also the e2e folder seemed out of scope.
    Question: Should we remove the e2e source folder as well? Or keep everything also in angular.json in sync to the boilerplate of angular 8?
  • I am not sure about the dependencies. Angular projects now lock the versions inside package.json using ~x.x.x.
    Question: Should we keep all versions locked in the example project as well?
  • Removed core-js from peerDependencies, it is not a dependency of Angular projects anymore, and made it a dependency of jest-preset-angular, as we need it for testing. See Angular no longer directly depends on core-js - should not be a peerDependency #266 for further discussion.
  • Replaced HttpModule with HttpClientModule (HttpModule was dropped completely)
  • tsconfig.json baseUrl is now the root folder, as it is in the Angular CLI boilerplate project
  • tsconfig.spec.json needs emitDecoratorMetadata: true (or access to program/type checker through ts-jest), see After upgrade Angular to v8: Can't resolve all parameters for Component: (?). #288
  • Adjustment to make ng build --aot not fail: [\`styles\`]: ... had to become styles: ... again and declared all components to app.module
  • Updated polyfills.ts to current one
  • Updated all ts config files
  • Updated ts lint config file

Note that most tested files and tests remained untouched. Mostly the Angular Project files were changed.
Is this breaking due to moving core-js to dependencies?

Renaming the example project to e. g. test-app would be another task I would like to start with after this PR.

I would like to keep #288 open, as the cleaner approach might be a transformer (one day).

Solves #266.

@wtho
Copy link
Collaborator Author

wtho commented Sep 18, 2019

Just realized a changelog entry is still missing. Will add it soon!

@wtho wtho added the dependencies Pull requests that update a dependency file label Sep 18, 2019
@ahnpnl
Copy link
Collaborator

ahnpnl commented Sep 18, 2019

  • I agree e2e should be removed. It is irrelevant for the example app.
  • I think the versions of dependencies for test app can just be kept in package.json as they are now.
  • I think now we include core-js in dependencies is a breaking in the meaning of preset scope. In the meaning of usage scope, it's not really a breaking since it doesn't break anything on users' side unless users uninstalled core-js (I don't think there are any polyfill libraries better than it)

@wtho
Copy link
Collaborator Author

wtho commented Sep 19, 2019

There are polyfill libraries that are way more lightweight than core-js for the decorator metadata, but as it was a dependency of Angular for such a long time, we should still stick to it. Especially when the preset will be used with an older Angular version the users would have core-js installed already.

@wtho
Copy link
Collaborator Author

wtho commented Sep 19, 2019

Last Force Push

  • Added Changelog information
  • Removed the e2e folder and e2e configuration file
  • Updated basic information of the example app README.md to inform users what the example app is

CHANGELOG.md Outdated Show resolved Hide resolved
example/tslint.json Outdated Show resolved Hide resolved
Copy link
Owner

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

👍

Also `core-js` is no longer a peer dependency of `jest-preset-angular`.
It instead is now a direct dependency.
@wtho
Copy link
Collaborator Author

wtho commented Sep 27, 2019

Last Force Push:

  • removed tslint dependency and configuration in the example app (was ignored and never run)
  • rephrased changelog as recommended

@wtho wtho merged commit 24045bc into thymikee:master Sep 28, 2019
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 25, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally.

The jest config of users will have to be adjusted, see the CHANGELOG.md
for migration information.
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 25, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally.

The jest config of users will have to be adjusted, see the CHANGELOG.md
for migration information.
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 25, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally.

The jest config of users will have to be adjusted, see the CHANGELOG.md
for migration information.
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 25, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally.

The jest config of users will have to be adjusted, see the CHANGELOG.md
for migration information.
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 25, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally.

The jest config of users will have to be adjusted, see the CHANGELOG.md
for migration information.

Closes thymikee#308
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 25, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally.

The jest config of users will have to be adjusted, see the CHANGELOG.md
for migration information.

Closes thymikee#308
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 25, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally.

The jest config of users will have to be adjusted, see the CHANGELOG.md
for migration information.

Closes thymikee#308
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Oct 27, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally. Furthermore
`ts-jest` is not a dependency of the preset anymore.

The jest config and package.json of users will have to be adjusted, see
the CHANGELOG.md for migration information.

Closes thymikee#308
wtho added a commit to wtho/jest-preset-angular that referenced this pull request Dec 2, 2019
BREAKING CHANGE: add an alternative preset for babel and restructures
the whole repository to treat babel and ts-jest equally. Furthermore
`ts-jest` is not a dependency of the preset anymore.

The jest config and package.json of users will have to be adjusted, see
the CHANGELOG.md for migration information.

Closes thymikee#308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Enhancement ✨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants