-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from getmash/chore/winter-2022-build-update
Upgrade all packages to ESM only. Dropping tech debt and simplifying our tooling.
- Loading branch information
Showing
48 changed files
with
1,415 additions
and
781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"mode": "exit", | ||
"tag": "alpha", | ||
"initialVersions": { | ||
"@getmash/client-sdk": "1.1.3", | ||
"@getmash/jsonrpc-engine": "1.0.2", | ||
"@getmash/post-message": "1.1.0" | ||
}, | ||
"changesets": [ | ||
"strong-eagles-shop" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@getmash/client-sdk": major | ||
"@getmash/jsonrpc-engine": major | ||
"@getmash/post-message": major | ||
--- | ||
|
||
Upgrade all packages to ESM only. Dropping tech debt and simplifying our tooling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ coverage | |
*.tsbuildinfo | ||
|
||
# jest | ||
.cache/jest | ||
**/.cache/jest | ||
|
||
#parcel | ||
.parcel-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const path = require("path"); | ||
|
||
const tsconfig = path.join(__dirname, "tsconfig.test.json"); | ||
const setupPostMessage = path.join(__dirname, "setupPostMessage.js"); | ||
|
||
function generate(config) { | ||
return Object.assign( | ||
{ | ||
cache: true, | ||
cacheDirectory: ".cache/jest", | ||
/* | ||
* Automatically clear mock calls and instances before every test. | ||
* Equivalent to calling jest.clearAllMocks() before each test. | ||
* This does not remove any mock implementation that may have been provided. | ||
*/ | ||
clearMocks: true, | ||
collectCoverage: true, | ||
collectCoverageFrom: ["src/**/*.{ts,tsx}"], | ||
coverageDirectory: "coverage/", | ||
extensionsToTreatAsEsm: [".ts", ".tsx", ".mts"], | ||
moduleNameMapper: { | ||
// jest resolver needs help finding the ts files from js extensions in imports | ||
"^(\\.{1,2}/.*)\\.js$": "$1", | ||
// there is a bug in jest and it can't handle the exports in this library | ||
"^uuid$": require.resolve("uuid"), | ||
}, | ||
transform: { | ||
"^.+\\.tsx?$": [ | ||
"ts-jest", | ||
{ useESM: true, tsconfig, diagnostics: false }, | ||
], | ||
}, | ||
setupFiles: [setupPostMessage], | ||
}, | ||
config, | ||
); | ||
} | ||
|
||
module.exports = generate; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# default help menu lists tasks | ||
@help: | ||
just --list --justfile {{justfile()}} --list-heading $'mash-js\n' | ||
|
||
# test all packages | ||
@test: | ||
yarn references:check | ||
yarn workspaces foreach --topological --parallel run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../../conf/jest/jest.base.js')({ testEnvironment: "jsdom" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.