lumberjack icon indicating copy to clipboard operation
lumberjack copied to clipboard

chore: update packages and replace builder

Open NachoVazquez opened this issue 4 years ago • 10 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: CONTRIBUTING.md#commit
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

The lumberjack repo was using Angular version 11 and the old ngpackgr builder @angular-devkit/build-ng-packagr:build.

Issue Number: N/A

What is the new behavior?

The Lumberjack repo is using the latest version of Angular (12.2.x) and the new ngpackgr builder @angular-devkit/build-angular:ng-packagr

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

This PR depends on https://github.com/ngworker/angular-versions-action/pull/35 and https://github.com/ngworker/angular-versions-action/pull/36

NachoVazquez avatar Aug 21 '21 19:08 NachoVazquez

error @angular-builders/[email protected]: The engine "node" is incompatible with this module. Expected version ">=12.14.1". Got "10.24.1"

Solution: Downgrade Jest to 26.x and the Jest builder to 11.x when testing older versions of Angular with Node.js 10.x.

LayZeeDK avatar Aug 21 '21 22:08 LayZeeDK

Looking at angular-cli-diff, we should also change compilerOptions.target from "es2015" to "es2017" in tsconfig.json.

LayZeeDK avatar Aug 21 '21 23:08 LayZeeDK

error @angular-builders/[email protected]: The engine "node" is incompatible with this module. Expected version ">=12.14.1". Got "10.24.1"

Solution: Downgrade Jest to 26.x and the Jest builder to 11.x when testing older versions of Angular with Node.js 10.x.

I had to explicitly upgrade because I was having other problems with version 26 after the upgrade.

However, do we need to run our test in Node 10?? Can not we just perform the build using the different versions of Node but everything else (dev-related) could be done with the latest Node??

NachoVazquez avatar Aug 22 '21 16:08 NachoVazquez

@NachoVazquez

However, do we need to run our test in Node 10?? Can not we just perform the build using the different versions of Node but everything else (dev-related) could be done with the latest Node??

We must be able to test using Node.js 10.x with certain versions of Angular. That's what some our consumers will be using since Angular supports this version.

LayZeeDK avatar Aug 29 '21 16:08 LayZeeDK

@all-contributors please add @patelvimal for code

NachoVazquez avatar Mar 12 '22 21:03 NachoVazquez

@NachoVazquez

I've put up a pull request to add @patelvimal! :tada:

allcontributors[bot] avatar Mar 12 '22 21:03 allcontributors[bot]

@NachoVazquez Angular 11 doesn't support Node.js 16.x, see https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3

LayZeeDK avatar Apr 17 '22 23:04 LayZeeDK

@NachoVazquez Angular 11 doesn't support Node.js 14.x, see https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3

LayZeeDK avatar Apr 18 '22 13:04 LayZeeDK