Skip to content
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

Update decaffeinate-parser example to latest to fix build #691

Merged
merged 1 commit into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 37 additions & 15 deletions example-runner/example-configs/decaffeinate-parser.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
diff --git a/jest.config.js b/jest.config.js
index 87e2017..97f9819 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -55,11 +55,11 @@ module.exports = {
// globalTeardown: null,

// A set of global variables that need to be available in all test environments
- globals: {
- 'ts-jest': {
- tsConfig: 'tsconfig.json',
- },
- },
+ // globals: {
+ // 'ts-jest': {
+ // tsConfig: 'tsconfig.json',
+ // },
+ // },

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
@@ -156,7 +156,7 @@ module.exports = {

// A map from regular expressions to paths to transformers
transform: {
- '^.+\\.(ts|tsx)$': 'ts-jest',
+ '^.+\\.(ts|tsx)$': '@sucrase/jest-plugin',
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
diff --git a/package.json b/package.json
index e2e9927..548a42f 100644
index 4094fa0..dc5e31c 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,6 @@
@@ -23,7 +23,6 @@
"build": "./script/build",
"lint": "eslint src test && tslint --config tslint.json --project tsconfig.json --type-check",
"lint-fix": "eslint src test --fix && tslint --config tslint.json --project tsconfig.json --type-check --fix",
- "pretest": "npm run lint",
"test": "mocha"
"lint": "eslint '{src,test}/**/*.ts'",
"lint:fix": "yarn lint --fix",
- "pretest": "yarn lint",
"test": "jest",
"test:ci": "jest --ci"
},
"keywords": [
diff --git a/test/mocha.opts b/test/mocha.opts
index 1aee96b..d084985 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1,2 +1,2 @@
---compilers ts:ts-node/register,js:babel-register
+--compilers ts:sucrase/register/ts-legacy-module-interop
--recursive
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4c595d0d2a53a5b7ec89fc2c1d94c878b7b2ffce
580589e411e0b5829c3b504fcfe15345dc3153fb