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: add DependencyMetric and NpmScope #53

Merged

Conversation

francinelucca
Copy link
Contributor

@francinelucca francinelucca commented Aug 24, 2023

Closes #51
Closes #37

Changelog

New

  • DependencyMetric class and Unit tests
  • NpmScope class and Unit tests
  • new getPackageDependencies util and Unit tests. uses exec to get dependencies and devDependencies from package.json depending on the type param
  • Added Unit tests for Scope

Changed

  • Refactored Scope class' capture method to log to logger instead (this is temporary as this method is not fully implemented yet)

Testing / reviewing

  • Tests should pass a sniff test and there should be no failures.
  • add await new NpmScope(new Logger('./log.log')).run() to the bottom of the npm-scope.ts file, build the project and then node dist/main/scopes/npm/npm-scope.js and you should see the logs for each of the current dependencies and devDependencies in the project logged to the new log file

TODO

  • Write tests for new functions
  • Rewrite test for NPMScope
  • Confirm getInstallingPackages function and NpmScope run with Joe

@francinelucca francinelucca requested a review from a team as a code owner August 24, 2023 23:37
@francinelucca francinelucca requested review from jdharvey-ibm and removed request for a team August 24, 2023 23:37
src/main/core/scope.ts Outdated Show resolved Hide resolved
src/main/scopes/npm/metrics/dependency-metric.ts Outdated Show resolved Hide resolved
src/test/scopes/npm/get-package-dependencies.test.ts Outdated Show resolved Hide resolved
… into 51-npm-scope-generate-capturable-metrics-from-dependencies
…ies' of github.com:carbon-design-system/telemetrics-js into 51-npm-scope-generate-capturable-metrics-from-dependencies
@jdharvey-ibm jdharvey-ibm merged commit fb0dd74 into main Sep 12, 2023
3 checks passed
@jdharvey-ibm jdharvey-ibm deleted the 51-npm-scope-generate-capturable-metrics-from-dependencies branch September 12, 2023 19:06
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.

NPM scope - Generate capturable metrics from dependencies NPM scope
2 participants