Skip to content

Commit

Permalink
Update decaffeinate-parser example to latest to fix build (#691)
Browse files Browse the repository at this point in the history
This pulls in a fix for a dependency resolution failure related to coffee-script-redux. The project has switched to jest in the
meantime, so this updates the patch to use the jest integration.
  • Loading branch information
alangpierce authored Apr 3, 2022
1 parent c350695 commit e084f7a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
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

0 comments on commit e084f7a

Please # to comment.