Skip to content

Update tests for dependencies #285

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

Merged
merged 3 commits into from
Apr 1, 2020

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Apr 1, 2020

This PR is to deal with version updates failing tests.
The tests were passing, Karma was starting to see errors,
both on Typescript compile and on the size of the bundle.

First: Remove mocha import to shrink bundle

Originally, import 'mocha’ was added to satisfy Typescript.
But this made webpack include all of mocha in the bundle.
Karma was starting to run out of memory when processing all the test files.

Second: update karma config

The config was in a tenuous state functioning.
Changing the config to the root Typescript config file
that references each module,
and enabling projectReferences make the configuration explicit.
Also adding a log for errors
such as when AWS credentials are not available
makes this error much more obvious.

Third: update dependency versions

This is an explicit update to versions.
Additionally all sub modules package-lock.json files are removed.

When lerna link was run, in #242
all modules were linked together at the root.
This means that the root package-lock.json file is responsible
for all sub modules state.
Lerna does not maintain the state on these modules package-lock.json anymore.
So this information is redundant.

Finally, update local_verdaccio_publish
to not reset package-lock.json files as they do not exist.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

seebees added 3 commits April 1, 2020 11:44
Originaly, `import 'mocha’` was added to satisfy Typescript.
But this made `webpack` include all of `mocha` in the bundle.
Karma was starting to run out of memory when processing all the test files.
The config was in a tenuous state functioning.
Changing the config to the root Typescript config file
that references each module,
and enabling projectReferences make the configuration explicit.
Also adding a log for errors
such as when AWS credentials are not available
makes this error much more obvious.
This is an explicit update to versions.
Additionally all sub modules package-lock.json files are removed.

When `lerna link` was run, in aws#242
all modules were linked together at the root.
This means that the root package-lock.json file is responsible
for all sub modules state.
Lerna does not maintain the state on these modules package-lock.json anymore.
So this information is redundant.

Finally, update `local_verdaccio_publish`
to not reset package-lock.json files as they do not exist.
@seebees seebees requested a review from a team April 1, 2020 19:50
Copy link

@scottarc scottarc left a comment

Choose a reason for hiding this comment

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

I found two very minor nitpicky inconsistencies (deleted code vs commented-out code). Everything else looks good.

@@ -16,7 +16,7 @@
/* eslint-env mocha */

import { expect } from 'chai'
import 'mocha'
// import 'mocha'
Copy link

Choose a reason for hiding this comment

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

In most other files, this import was deleted. In this file, it was commented out.

@@ -18,7 +18,7 @@
import * as chai from 'chai'
import chaiAsPromised from 'chai-as-promised'
import sinon from 'sinon'
import 'mocha'
// import 'mocha'
Copy link

Choose a reason for hiding this comment

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

This was also commented out instead of deleted.

@seebees seebees merged commit 998344c into aws:master Apr 1, 2020
@seebees seebees deleted the update-tests-for-dependencies branch April 1, 2020 20:15
seebees added a commit to seebees/aws-sdk-js-crypto-helpers-1 that referenced this pull request Apr 6, 2020
This is an explicit update to versions.
Additionally all sub modules package-lock.json files are removed.

When lerna link was run, in aws#27
all modules were linked together at the root.
This means that the root package-lock.json file is responsible
for all sub modules state.
Lerna does not maintain the state on these modules package-lock.json anymore.
So this information is redundant.

This is similar to
aws/aws-encryption-sdk-javascript#285

# Conflicts:
#	package-lock.json
#	packages/crc32/package-lock.json
#	packages/ie11-detection/package-lock.json
#	packages/random-source-browser/package-lock.json
#	packages/random-source-node/package-lock.json
#	packages/random-source-universal/package-lock.json
#	packages/sha256-browser/package-lock.json
#	packages/sha256-js/package-lock.json
#	packages/sha256-universal/package-lock.json
#	packages/supports-web-crypto/package-lock.json
seebees added a commit to seebees/aws-sdk-js-crypto-helpers-1 that referenced this pull request Apr 6, 2020
This is an explicit update to versions.
Additionally all sub modules package-lock.json files are removed.

When lerna link was run, in aws#27
all modules were linked together at the root.
This means that the root package-lock.json file is responsible
for all sub modules state.
Lerna does not maintain the state on these modules package-lock.json anymore.
So this information is redundant.

This is similar to
aws/aws-encryption-sdk-javascript#285
seebees added a commit to aws/aws-sdk-js-crypto-helpers that referenced this pull request Apr 6, 2020
This is an explicit update to versions.
Additionally all sub modules package-lock.json files are removed.

When lerna link was run, in #27
all modules were linked together at the root.
This means that the root package-lock.json file is responsible
for all sub modules state.
Lerna does not maintain the state on these modules package-lock.json anymore.
So this information is redundant.

This is similar to
aws/aws-encryption-sdk-javascript#285
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.

2 participants