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

Task/354 es6 module #918

Merged
merged 21 commits into from
Sep 19, 2023
Merged

Task/354 es6 module #918

merged 21 commits into from
Sep 19, 2023

Conversation

DougMidgley
Copy link
Contributor

@DougMidgley DougMidgley commented May 20, 2023

PR details

What changes did you make? (Give an overview)

migration to ES Modules and updated dependencies to support later versions

Is there anything you'd like reviewers to focus on?

General validation

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated
  • Wiki updated (if applicable)
    • wiki: min nodejs version
    • wiki: es6 / import vs. require

@DougMidgley
Copy link
Contributor Author

@JoernBerkefeld Due to how axios handles esm, sdk needs an update to expose a common client to override. working on that now

@JoernBerkefeld JoernBerkefeld added this to the 6.0.0 milestone May 21, 2023
@JoernBerkefeld JoernBerkefeld linked an issue May 21, 2023 that may be closed by this pull request
@JoernBerkefeld JoernBerkefeld added the BREAKING CHANGE requires increasing the major version of mcdev label May 21, 2023
@JoernBerkefeld
Copy link
Contributor

JoernBerkefeld commented May 21, 2023

@DougMidgley your latest merge commit of develop branch seems to break things?

Douglas Midgley added 3 commits June 3, 2023 15:04
# Conflicts:
#	package-lock.json
#	package.json
#	test/resourceFactory.js
#	test/type.dataExtension.test.js
#	test/type.user.test.js
@DougMidgley
Copy link
Contributor Author

@JoernBerkefeld im noticing a lot of tests are incorrectly written and many eslint warnings coming up - please confirm what is going on there as im not sure why it wasnt flagged earlier

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

Coverage Report

Commit:618fec9
Base: develop@6eb4373

Type Base This PR
Total Statements Coverage  55.46%  63.4%  (+7.94%)
Total Branches Coverage  44.54%  67.09%  (+22.55%)
Total Functions Coverage  64.27%  72.27%  (+8%)
Total Lines Coverage  55.39%  63.4%  (+8.01%)
Details (changed files):
File Statements Branches Functions Lines
lib/Builder.js  71.82%  50%  83.33%  71.82%
lib/Deployer.js  81.44%  68.75%  100%  81.44%
lib/MetadataTypeDefinitions.js  100%  100%  100%  100%
lib/MetadataTypeInfo.js  100%  100%  100%  100%
lib/Retriever.js  80.75%  68.29%  100%  80.75%
lib/cli.js  0%  0%  0%  0%
lib/index.js  67.09%  50%  66.66%  67.09%
lib/retrieveChangelog.js  0%  0%  0%  0%
lib/metadataTypes/Asset.js  24.03%  31.57%  9.67%  24.03%
lib/metadataTypes/AttributeGroup.js  88.03%  70%  100%  88.03%
lib/metadataTypes/AttributeSet.js  83.69%  72.54%  100%  83.69%
lib/metadataTypes/Automation.js  79.93%  62.73%  94.44%  79.93%
lib/metadataTypes/Campaign.js  61.03%  100%  33.33%  61.03%
lib/metadataTypes/ContentArea.js  47.61%  100%  0%  47.61%
lib/metadataTypes/DataExtension.js  79.27%  66.45%  94.11%  79.27%
lib/metadataTypes/DataExtensionField.js  80.89%  65.9%  90%  80.89%
lib/metadataTypes/DataExtensionTemplate.js  80.48%  66.66%  100%  80.48%
lib/metadataTypes/DataExtract.js  90.96%  76.92%  100%  90.96%
lib/metadataTypes/DataExtractType.js  95%  100%  50%  95%
lib/metadataTypes/Discovery.js  55.55%  100%  0%  55.55%
lib/metadataTypes/Email.js  63.44%  66.66%  25%  63.44%
lib/metadataTypes/EmailSend.js  32.55%  66.66%  14.28%  32.55%
lib/metadataTypes/Event.js  49.31%  100%  10%  49.31%
lib/metadataTypes/FileLocation.js  95%  100%  50%  95%
lib/metadataTypes/FileTransfer.js  88.88%  71.42%  100%  88.88%
lib/metadataTypes/Filter.js  93.93%  100%  0%  93.93%
lib/metadataTypes/Folder.js  57%  65.62%  80%  57%
lib/metadataTypes/ImportFile.js  81.93%  62.5%  100%  81.93%
lib/metadataTypes/Journey.js  53.39%  47.88%  100%  53.39%
lib/metadataTypes/List.js  90.52%  64.28%  66.66%  90.52%
lib/metadataTypes/MetadataType.js  77.59%  73.1%  72.05%  77.59%
lib/metadataTypes/MobileCode.js  84.44%  100%  50%  84.44%
lib/metadataTypes/MobileKeyword.js  89.18%  78.57%  90.9%  89.18%
lib/metadataTypes/MobileMessage.js  88.19%  72.09%  100%  88.19%
lib/metadataTypes/Query.js  92.87%  79.54%  100%  92.87%
lib/metadataTypes/Role.js  39.57%  55.55%  16.66%  39.57%
lib/metadataTypes/Script.js  95.79%  89.28%  100%  95.79%
lib/metadataTypes/SendClassification.js  68.29%  100%  0%  68.29%
lib/metadataTypes/TransactionalEmail.js  86.66%  70.58%  100%  86.66%
lib/metadataTypes/TransactionalMessage.js  93.38%  86.66%  83.33%  93.38%
lib/metadataTypes/TransactionalPush.js  84.61%  57.14%  100%  84.61%
lib/metadataTypes/TransactionalSMS.js  87.31%  76.19%  81.81%  87.31%
lib/metadataTypes/TriggeredSend.js  39.85%  44.44%  60%  39.85%
lib/metadataTypes/User.js  85.95%  71.34%  95.65%  85.95%
lib/metadataTypes/Verification.js  90.43%  76.19%  88.88%  90.43%
lib/util/auth.js  61.81%  76.47%  66.66%  61.81%
lib/util/businessUnit.js  21.49%  100%  0%  21.49%
lib/util/cache.js  85.92%  66.66%  88.88%  85.92%
lib/util/cli.js  37.5%  76.92%  25%  37.5%
lib/util/config.js  51.3%  36.84%  100%  51.3%
lib/util/devops.js  11.84%  100%  25%  11.84%
lib/util/file.js  73.59%  53.33%  81.25%  73.59%
lib/util/init.config.js  16.97%  100%  0%  16.97%
lib/util/init.git.js  19.77%  100%  0%  19.77%
lib/util/init.js  15.71%  100%  0%  15.71%
lib/util/init.npm.js  22.01%  100%  0%  22.01%
lib/util/util.js  79.37%  75.39%  84.84%  79.37%

@JoernBerkefeld
Copy link
Contributor

JoernBerkefeld commented Jun 4, 2023

im getting a bit worried?
image

@JoernBerkefeld
Copy link
Contributor

@JoernBerkefeld im noticing a lot of tests are incorrectly written and many eslint warnings coming up - please confirm what is going on there as im not sure why it wasnt flagged earlier

I'm guessing you mean what you saw after doing this?
image

I've added pending tests across our test files to keep track of whats still missing among those types that we've already covered. Shouldn't be an error though because that would be blocking.

package.json Show resolved Hide resolved
lib/Deployer.js Outdated Show resolved Hide resolved
lib/util/devops.js Show resolved Hide resolved
lib/util/init.config.js Show resolved Hide resolved
lib/util/init.js Show resolved Hide resolved
lib/metadataTypes/MetadataType.js Outdated Show resolved Hide resolved
lib/metadataTypes/DataExtension.js Outdated Show resolved Hide resolved
lib/metadataTypes/DataExtension.js Outdated Show resolved Hide resolved
lib/metadataTypes/DataExtension.js Outdated Show resolved Hide resolved
lib/cli.js Show resolved Hide resolved
Douglas Midgley and others added 3 commits June 5, 2023 20:26
Co-authored-by: Jörn Berkefeld <JoernBerkefeld@users.noreply.github.com>
# Conflicts:
#	docs/dist/documentation.md
#	lib/metadataTypes/Automation.js
#	lib/util/util.js
@JoernBerkefeld JoernBerkefeld self-assigned this Sep 19, 2023
# Conflicts:
#	docs/dist/documentation.md
#	lib/MetadataTypeDefinitions.js
#	lib/MetadataTypeInfo.js
#	lib/metadataTypes/AttributeGroup.js
#	lib/metadataTypes/DataExtension.js
#	lib/metadataTypes/SetDefinition.js
#	lib/util/init.js
#	lib/util/util.js
#	package-lock.json
#	package.json
#	test/resourceFactory.js
#	test/utils.js
#
# Additional required fixes:
#      lib/metadataTypes/definitions/Verificaction.definition.js
#      lib/metadataTypes/AttributeSet.js
#      lib/metadataTypes/TrabsactionalEmail.js
#      lib/metadataTypes/Verification.js
#      test/type.attributeGroup.test.js
#      test/type.attributeSet.test.js
#      test/type.dataExtract.test.js
#      test/type.fileTransfer.test.js
#      test/type.importFile.test.js
#      test/type.script.test.js
#      test/type.triggeredSend.test.js
#      test/type.verification.test.js
@JoernBerkefeld JoernBerkefeld merged commit 51acadb into develop Sep 19, 2023
4 checks passed
@JoernBerkefeld JoernBerkefeld deleted the task/354-es6Module branch September 19, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE requires increasing the major version of mcdev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Move to ESM modules
2 participants