mzuccaroli / angular-google-tag-manager

A service library for integrate google tag manager in your angular project
https://itnext.io/how-to-add-google-tag-manager-to-an-angular-application-fc68624386e2
MIT License
136 stars 78 forks source link

Large dependency upgrade #109

Closed bursauxa closed 2 years ago

bursauxa commented 2 years ago
mzuccaroli commented 2 years ago

thank you @bursauxa will test & merge ASAP

kanidjar commented 2 years ago

hi @mzuccaroli, any chance to get this merged soon?

mzuccaroli commented 2 years ago

sorry for the delay, it's a tough period, i'll try to release it within this week

mzuccaroli commented 2 years ago

@bursauxa
im' testing your PR, there are some problems with the "ng build --configuration prod" script, have you tested it with a clean installation? (the old "ng build --prod" is still working )

there is also a minor issuo with projects/angular-google-tag-manager/package.json that is not aligned with the external packcage.json but I fixed that

mzuccaroli commented 2 years ago

I pushed the fixed PR on develop @bursauxa can you double-check it for me?

bursauxa commented 2 years ago

Hello @mzuccaroli What you are saying about the prod script is surprising, because it comes from Angular cli itself. If you run a build, you should get a warning that --prod is deprecated, and the change I made is the one suggested by the cli. I changed it on many of our projects without issue, and the deprecation warning disappeared.

However I guess you could have an issue with it not working if you have a global install of angular-cli that is on an older version. Would that be your case?

edit: for reference, the docs also mention that --prod is deprecated: https://angular.io/cli/build

mzuccaroli commented 2 years ago

found the problem, I was calling the script via npm runand not via npx with the syntax --configuration=production works both ways

bursauxa commented 2 years ago

That problem makes sense if you are in the situation I mentioned above (an outdated global install of angular-cli), as npx will ignore the global install and thus use the version specified in package.json ;)

The other changes you fixed in the package.json files are completely fine, so I guess we can merge now 👏

mzuccaroli commented 2 years ago

I'ts strange because the output of npm run ng version and npx ng version are the same (Angular CLI: 13.1.2) , however --configuration=production works fine and I'm proceeding with the release

mzuccaroli commented 2 years ago

@shyallegro @kanidjar V 1.5.0 is released, thank @bursauxa for your contribution and your support

bursauxa commented 2 years ago

You are welcome, thank you for having this library in the first place @mzuccaroli !

kanidjar commented 2 years ago

thank you @mzuccaroli