From e084f7a53f456fa74699ace068eaac726d12516f Mon Sep 17 00:00:00 2001 From: Alan Pierce Date: Sun, 3 Apr 2022 14:16:14 -0700 Subject: [PATCH] Update decaffeinate-parser example to latest to fix build (#691) 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. --- .../example-configs/decaffeinate-parser.patch | 52 +++++++++++++------ .../decaffeinate-parser.revision | 2 +- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/example-runner/example-configs/decaffeinate-parser.patch b/example-runner/example-configs/decaffeinate-parser.patch index f4a55903..0fc64b62 100644 --- a/example-runner/example-configs/decaffeinate-parser.patch +++ b/example-runner/example-configs/decaffeinate-parser.patch @@ -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 diff --git a/example-runner/example-configs/decaffeinate-parser.revision b/example-runner/example-configs/decaffeinate-parser.revision index f2fce8ba..4e61d48c 100644 --- a/example-runner/example-configs/decaffeinate-parser.revision +++ b/example-runner/example-configs/decaffeinate-parser.revision @@ -1 +1 @@ -4c595d0d2a53a5b7ec89fc2c1d94c878b7b2ffce +580589e411e0b5829c3b504fcfe15345dc3153fb