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

chore: Make sure copyright header comment includes license #8783

Merged
merged 3 commits into from
Aug 6, 2019

Conversation

pedrottimark
Copy link
Contributor

Summary

Fixes #8666

  • Make criterion string more complete in scripts/checkCopyrightHeaders.js
  • Update comment in 152 files, ironically including scripts/checkCopyrightHeaders.js

Replace obsolete license:

  • packages/jest-circus/runner.js
  • packages/jest-circus/src/__mocks__/testEventHandler.ts
  • packages/jest-circus/src/__mocks__/testUtils.ts
  • packages/jest-circus/src/__tests__/afterAll.test.ts
  • packages/jest-circus/src/__tests__/baseTest.test.ts
  • packages/jest-circus/src/__tests__/hooks.test.ts
  • packages/jest-core/src/SnapshotInteractiveMode.ts
  • packages/jest-runtime/src/__tests__/defaultResolver.js
  • packages/jest-runtime/src/__tests__/test_root/sourcemaps/out/throwing-mapped-fn.js
  • packages/jest-runtime/src/__tests__/test_root/sourcemaps/throwing-mapped-fn.js

Draft multi-line criterion failed because of line endings, but I did not update yet:

  • packages/expect/src/__tests__/__arbitraries__/sharedSettings.ts
  • packages/expect/src/__tests__/matchers-toContain.property.test.ts
  • packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts
  • packages/expect/src/__tests__/matchers-toEqual.property.test.ts
  • packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts

Draft multi-line criterion found error extra All rights reserved. line:

  • packages/jest-docblock/src/__tests__/index.test.ts
  • packages/jest-haste-map/src/lib/__tests__/fast_path.test.js
  • packages/jest-haste-map/src/lib/__tests__/getPlatformExtension.test.js
  • packages/jest-haste-map/src/lib/__tests__/normalizePathSep.test.js
  • packages/jest-repl/src/cli/repl.ts
  • website/siteConfig.js

Question: What do you think?

  • Test each line individually to be less specific for comment syntax?
  • Test lines together but allow variation in line endings?
  • Test lines together and require nl=LF line endings?

Test plan

Updated 9 snapshots because line numbers increase by 5:

  • 1 e2e/__tests__/beforeAllFiltered.ts
  • 1 e2e/__tests__/beforeEachQueue.ts
  • 1 e2e/__tests__/coverageRemapping.test.ts
  • 2 e2e/__tests__/detectOpenHandles.ts
  • 1 e2e/__tests__/failures.test.ts
  • 1 e2e/__tests__/processExit.test.ts
  • 1 e2e/__tests__/resolveNoFileExtensions.test.ts
  • 1 packages/jest-core/src/__tests__/watch.test.js

Residue: tests passes even though packages/jest-runtime/src/__tests__/test_root/sourcemaps/out/throwing-mapped-fn.js.map still has obsolete license comment

Copy link
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Thank you for cleaning this up.

@cpojer cpojer merged commit e740de2 into jestjs:master Aug 6, 2019
@pedrottimark pedrottimark deleted the obsolete-license branch August 6, 2019 13:55
jeysal added a commit to felipepastorelima/jest that referenced this pull request Aug 11, 2019
* upstream/master:
  expect: Display equal values for ReturnedWith similar to CalledWith (jestjs#8791)
  Clearer messages for Node assert errors (jestjs#8792)
  use babel-plugin-replace-ts-export-assignment package (jestjs#8805)
  jest-matcher-utils: Add color options to matcherHint (jestjs#8795)
  chore: Make sure copyright header comment includes license (jestjs#8783)
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

license of some modules
3 participants