Skip to content
This repository was archived by the owner on Jul 29, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JosephEigenraam/jest-mdx-loader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: aarongustafson/jest-mdx-loader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 15 commits
  • 3 files changed
  • 1 contributor

Commits on May 20, 2024

  1. require -> import

    aarongustafson committed May 20, 2024
    Copy the full SHA
    3923f5f View commit details
  2. updated packages

    aarongustafson committed May 20, 2024
    Copy the full SHA
    b3e94c4 View commit details
  3. reverting packages

    aarongustafson committed May 20, 2024
    Copy the full SHA
    2acdf39 View commit details
  4. Copy the full SHA
    49f5d09 View commit details
  5. re-upping packages

    aarongustafson committed May 20, 2024
    Copy the full SHA
    7ef0867 View commit details
  6. Copy the full SHA
    281c140 View commit details
  7. ESM

    aarongustafson committed May 20, 2024
    Copy the full SHA
    0bfc346 View commit details
  8. ESM

    aarongustafson committed May 20, 2024
    Copy the full SHA
    52d54ba View commit details
  9. forgot default

    aarongustafson committed May 20, 2024
    Copy the full SHA
    b6753af View commit details
  10. Copy the full SHA
    41750e4 View commit details
  11. ESM conversion

    aarongustafson committed May 20, 2024
    Copy the full SHA
    4739968 View commit details
  12. Copy the full SHA
    ffaee65 View commit details
  13. Copy the full SHA
    a23a3bf View commit details
  14. Trying something else

    aarongustafson committed May 20, 2024
    Copy the full SHA
    3d2f852 View commit details
  15. Module changes

    aarongustafson committed May 20, 2024
    Copy the full SHA
    8223ff1 View commit details
Showing with 38 additions and 34 deletions.
  1. +5 −5 index.js
  2. +28 −24 package.json
  3. +5 −5 src/createTransformer.js
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
import { createMDXTransformer } from "./src/createTransformer";

var createTransformer = require("./src/createTransformer");

module.exports = {
process: createTransformer()
export default {
createTransformer(preMdxParseCallback){
return new createMDXTransformer(preMdxParseCallback);
}
};
52 changes: 28 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
{
"name": "jest-mdx-loader",
"version": "0.1.1",
"description": "Jest transformer that wraps mdx-js/mx webpack loader",
"main": "index.js",
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/JosephConradBlack/jest-mdx-loader.git"
},
"keywords": [
"jest",
"mdx"
],
"peerDependencies": {
"@mdx-js/loader": "^0.15.0",
"@mdx-js/mdx": "^0.15.0",
"babel-core": "^6.26.3"
},
"author": "Joseph Black <josephconradblack@gmail.com> (https://josephconradblack.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/JosephConradBlack/jest-mdx-loader/issues"
},
"homepage": "https://github.com/JosephConradBlack/jest-mdx-loader#readme"
"name": "jest-mdx-loader",
"version": "0.1.1",
"description": "Jest transformer that wraps mdx-js/mx webpack loader",
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=18"
},
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/JosephConradBlack/jest-mdx-loader.git"
},
"keywords": [
"jest",
"mdx"
],
"peerDependencies": {
"@mdx-js/loader": "^3.0.1",
"@mdx-js/mdx": "^3.0.1",
"babel-core": "^6.26.3"
},
"author": "Joseph Black <josephconradblack@gmail.com> (https://josephconradblack.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/JosephConradBlack/jest-mdx-loader/issues"
},
"homepage": "https://github.com/JosephConradBlack/jest-mdx-loader#readme"
}
10 changes: 5 additions & 5 deletions src/createTransformer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var mdx = require("@mdx-js/mdx");
var babel = require("babel-core");
import mdx from "@mdx-js/mdx";
import babel from "babel-core";

createTransformer = function(preMdxParseCallback) {
return function(src, filename, config, options) {
function createMDXTransformer(preMdxParseCallback) {
function process(src, filename, config, options) {
let rawMDX = src;

if (preMdxParseCallback) {
@@ -31,4 +31,4 @@ createTransformer = function(preMdxParseCallback) {
};
};

module.exports = createTransformer;
export { createMDXTransformer };