Skip to content

🔖 7.0 #860

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 28 commits into from
Jan 18, 2023
Merged

🔖 7.0 #860

merged 28 commits into from
Jan 18, 2023

Conversation

jrolfs
Copy link
Collaborator

@jrolfs jrolfs commented Jan 18, 2023

📝 Note: this was originally the beta branch, but it's in conflict and I wanted to rebase instead of merge. Rebasing a release branch breaks semantic-release's release metadata that's stored in Git notes, so I've opted to cut a new branch to rebase the final 7.0 release.

Dependencies

  • Upgrade Jest to 29 Upgrade Jest to 28 Upgrade Jest to 27.4
  • Move ts-jest from dependencies to peerDependencies (optional) requiring ≥ 29.0
  • Upgrade all dependencies to their latest version, excluding Sindre Sorhous dependencies that are now ESM only

API

  • Forward ts-jest utils from ts-jest, remove mocked Remove api/test since we're switching to SWC by default for Jest

Configuration Changes

  • Set ts-jest transform unconditionally nevermind, we're switching to SWC
  • Use @swc/jest as default Jest transform 🏎 (ts-jest will still take precedence if it is installed in the host project)
  • Disallow default exports in strict configuration

Todo

  • Set skipLibCheck... ts-jest and jest aren't playing nicely (can we get rid of this? yes)

jrolfs and others added 28 commits January 18, 2023 15:13
See: https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md#deprecations
See: jestjs/jest#12089

BREAKING CHANGE: `api/test` no longer exports `mocked()`, it's available
at `jest.mocked()` now
BREAKING CHANGE: default exports are no longer allowed when using
**@hover/javascript/eslint/strict**
BREAKING CHANGE: upgrades Jest a major version (27 to 28)
BREAKING CHANGE: using new major version of Semantic Release in `ci-after-success`
BREAKING CHANGE: upgrades Jest a major version (28 to 29)
BREAKING CHANGE: Node 12 is no longer supported
BREAKING CHANGE: **@swc/jest** is now the default Jest transform and
**ts-jest** is no longer installed by default. To preserve the old transform
behavior, install **ts-jest** as a \`devDependency\` in you project. ∙ BREAKING
CHANGE: the \`@hover/javascript/api/test\` API has been removed as **ts-jest**
is no longer installed by default. If you're still using **ts-jest**, import
its helpers directly from **ts-jest** instead of the \`/api/test\` entrypoint.
Jest no longer bundles it as of 28.x... which makes sense as installing
JSDOM when we're using the default `testEnvironment` (`node`) is
pretty silly. For now I'm opting to continue bundling it for the sake
of simplicity, but we should probably consider modularizing
@hover/javascript in the future.
BREAKING CHANGE: `ls.dirs()` from `api/commit` now takes an options
object as the second parameter instead of a `prefix`. If you're using
a prefix you'll need to make the following change:

```ts
// Before
ls.dirs('./packages', 'my-prefix');

// After
ls.dirs('./packages', { prefix: 'my-prefix' });
```

BREAKING CHANGE: `ls.dirs()` now excludes `node_modules` directories
by default. If for some reason you want to include \`node_modules\`,
you'll need to explicitly set \`exclude\` to \`null\`:

```ts
// Before
ls.dirs('./packages');

// After
ls.dirs('./packages', { exclude: null });
```
…f extending

For consistency, up until now, the shared TypeScript configuration has lived in
`src/config` with all of the other shared configurations that this package
provides. For all of the other configurations we're able to simple re-export
the configuration at the project root to provide it to consumers at
`require('@hover/javascript/[config]')`. Because the TypeScript configuration
is JSON, however, we were using `extends` instead of re-exporting. This has been
causing all kinds of trouble within this package since we were extending from the
`dist` directory. This finally moves the canonical TypeScript configuration
to the root, so that we don't need to `extends` from `dist/` while preserving
`src/config/tsconfig.json` via `extends` just in case. The actual configuration
for this project itself still lives at `src/tsconfig.json`, but this prevents
issues when anything (like the `ts-node` that gets loaded in `commitlint`
from trying to read a non-existent `dist/tsconfig.json` if it does read
the `tsconfig.json` at the root of the project.
BREAKING CHANGE: potential breaking change as some upgrades were major
@jrolfs jrolfs merged commit b440e7e into main Jan 18, 2023
@jrolfs jrolfs deleted the 7 branch January 18, 2023 23:32
This was referenced Jan 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant