Skip to content
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: mdx-js/mdx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.15.7
Choose a base ref
...
head repository: mdx-js/mdx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.16.0
Choose a head ref
  • 8 commits
  • 20 files changed
  • 5 contributors

Commits on Nov 3, 2018

  1. 1
    Copy the full SHA
    440c445 View commit details
  2. Update .editorconfig (#299)

    * Specific markdown handling is superfluous since commonmark
    * lf line feeds are great
    wooorm authored and silvenon committed Nov 3, 2018
    1
    Copy the full SHA
    d9bd9b5 View commit details
  3. Update Node in Travis (#301)

    * Use latest LTS Carbon (8) version
    * Use latests node (currently 11)
    wooorm authored and silvenon committed Nov 3, 2018
    1
    Copy the full SHA
    9157da4 View commit details
  4. Don't pass metaString prop to <pre> DOM element (#294)

    * Don't add `metaString` prop
    
    Fixes vercel/next-plugins#307
    
    * Remove `metaString` prop from test assert
    
    * Replace metaString prop by metastring
    
    * Fix metastring prop test
    
    Closes #284
    hugmanrique authored and silvenon committed Nov 3, 2018
    1
    Copy the full SHA
    ca5ba71 View commit details

Commits on Nov 4, 2018

  1. Add community docs (#302)

    * Add community docs
    
    * Add `contributing.md`, detailing the different ways to help out
    * Add an issue template, to defer chats to spectrum
    * Add a pull request template, to detail how to create a good pr
    
    * Update .github/issue_template.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update .github/issue_template.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update contributing.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update contributing.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update contributing.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update contributing.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update contributing.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update contributing.md
    
    Co-Authored-By: wooorm <tituswormer@gmail.com>
    
    * Update issue_template.md
    
    * Update contributing.md
    wooorm authored and silvenon committed Nov 4, 2018
    1
    Copy the full SHA
    c813728 View commit details

Commits on Nov 5, 2018

  1. 1
    Copy the full SHA
    21e7691 View commit details
  2. Copy the full SHA
    4a8412d View commit details
  3. v0.16.0

    johno committed Nov 5, 2018
    1
    Copy the full SHA
    2c1c867 View commit details
4 changes: 1 addition & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -6,7 +6,5 @@ indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
23 changes: 23 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### Subject of the issue

Describe your issue here. Remember, this is _not_ a place to ask questions. For that, go to [spectrum](https://spectrum.chat/mdx)

### Your environment

* Name and version of operating system
* Names and version of required packages
* Version of node, npm, yarn, or names and versions of browser

### Steps to reproduce

Tell us how to reproduce this issue. Please provide a working and simplified example.

🎉 BONUS POINTS for creating a [minimal reproduction](https://stackoverflow.com/help/mcve) and uploading it to GitHub. This will get you the fastest support. 🎉

### Expected behaviour

What should happen?

### Actual behaviour

What happens instead?
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
Read the [contributing guidelines](https://github.com/mdx-js/mdx/blob/master/contributing.md).
We are excited about pull requests, but please try to limit the scope, provide a general description of the changes, and remember, it's up to you to convince us to land it. If this fixes an open issue, link to it in the following way: `Closes #123`. New features and bug fixes should come with tests.
-->
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- 8
- 10
- lts/carbon
- node
git:
depth: 5
before_script:
86 changes: 86 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributing

Hi! 👋
We’re excited that you’re interested in contributing!
Take a moment to read the following guidelines.
And thanks for contributing to **mdx**! 👏👌✨

If you’re raising an issue, please understand that people involved with this project often do so for fun,
next to their day job; you are not entitled to free customer service.

## Table of Contents

* [Questions](#questions)
* [Contributions](#contributions)
* [Improve documentation](#improve-documentation)
* [Improve issues](#improve-issues)
* [Give feedback on issues and pull requests](#give-feedback-on-issues-and-pull-requests)
* [Write code](#write-code)
* [Submitting an issue](#submitting-an-issue)
* [Submitting a pull request](#submitting-a-pull-request)
* [Resources](#resources)

## Questions

Please chat and ask questions on [spectrum][chat]!
Jump in there and lurk, talk to us, and help others.

## Contributions

There’s several ways to contribute, not just by writing code.

### Improve documentation

As a user of this project you’re perfect for helping us improve our docs.
Typo corrections, error fixes, better explanations, new examples, etcetera.
Anything!

### Improve issues

Some issues lack information, aren’t reproducible, or are just incorrect.
Help make them easier to resolve.

### Give feedback on issues and pull requests

We’re always looking for more opinions on discussions in the issue tracker.

### Write code

Code contributions are very welcome. It’s often good to first create an issue
to report a bug or suggest a new feature before creating a pull request to
prevent you from doing unnecessary work.

## Submitting an issue

* The issue tracker is for issues. Use chat for support
* Search the issue tracker (including closed issues) before opening a new
issue
* Ensure you’re using the latest version of our packages
* Use a clear and descriptive title
* Include as much information as possible: steps to reproduce the issue,
error message, version, operating system, etcetera
* The more time you put into an issue, the better we will be able to help you
* The best issue report is a [failing test][unit-test] proving it

## Submitting a pull request

* Non-trivial changes are often best discussed in an issue first, to prevent
you from doing unnecessary work
* For ambitious tasks, you should try to get your work in front of the
community for feedback as soon as possible
* New features should be accompanied with tests and documentation
* Don’t include unrelated changes
* Test before submitting code by running `yarn test`
* Write a convincing description of why we should land your pull request:
it’s your job to convince us

## Resources

* [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
* [Making your first contribution](https://medium.com/@vadimdemedes/making-your-first-contribution-de6576ddb190)
* [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
* [GitHub Help](https://help.github.com)

[unit-test]: https://twitter.com/sindresorhus/status/579306280495357953

[chat]: https://spectrum.chat/mdx
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"lerna": "3.4.0",
"version": "0.16.0",
"packages": [
"packages/*"
],
"version": "0.15.7",
"npmClient": "yarn",
"useWorkspaces": true
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@
"docs:build": "x0 build docs",
"docs:deploy": "npm run docs:build && now dist --public && now alias",
"test": "lerna run test",
"format": "prettier --no-semi --single-quote --write '{examples,packages}/**/*.js'"
"format": "prettier --no-semi --single-quote --write '{examples,packages}/**/*.js'",
"publish": "lerna publish"
},
"repository": "mdx-js/mdx",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/create-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "create-mdx",
"description": "Initialize an MDX project",
"version": "0.15.6",
"version": "0.16.0",
"license": "MIT",
"author": "John Otander",
"bin": {
6 changes: 3 additions & 3 deletions packages/loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mdx-js/loader",
"version": "0.15.7",
"version": "0.16.0",
"license": "MIT",
"repository": "mdx-js/mdx",
"description": "Loader for MDX",
@@ -19,8 +19,8 @@
"loader"
],
"dependencies": {
"@mdx-js/mdx": "^0.15.7",
"@mdx-js/tag": "^0.15.6",
"@mdx-js/mdx": "^0.16.0",
"@mdx-js/tag": "^0.16.0",
"loader-utils": "^1.1.0"
},
"devDependencies": {
8 changes: 4 additions & 4 deletions packages/mdx/mdx-ast-to-mdx-hast.js
Original file line number Diff line number Diff line change
@@ -29,12 +29,12 @@ module.exports = function mdxAstToMdxHast() {
if (lang) {
props.className = ['language-' + lang]
}

props.metaString = node.lang && node.lang.replace(langRegex, '').trim()
props.metastring = node.lang && node.lang.replace(langRegex, '').trim()

const meta =
props.metaString &&
props.metaString.split(' ').reduce((acc, cur) => {
props.metastring &&
props.metastring.split(' ').reduce((acc, cur) => {
if (cur.split('=').length > 1) {
const t = cur.split('=')
acc[t[0]] = t[1]
3 changes: 2 additions & 1 deletion packages/mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mdx-js/mdx",
"version": "0.15.7",
"version": "0.16.0",
"license": "MIT",
"repository": "mdx-js/mdx",
"description": "Parse MDX and transpile to JSX",
@@ -29,6 +29,7 @@
"remark-squeeze-paragraphs": "^3.0.1",
"to-style": "^1.3.3",
"unified": "^6.1.6",
"unist-builder": "^1.0.1",
"unist-util-visit": "^1.3.0"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion packages/mdx/test/index.test.js
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ COPY start.sh /home/start.sh
)

expect(result).toContain(
`props={{"className":"language-dockerfile","metaString":"exec registry=something.com","exec":true,"registry":"something.com"}}`
`props={{"className":"language-dockerfile","metastring":"exec registry=something.com","exec":true,"registry":"something.com"}}`
)
})

2 changes: 1 addition & 1 deletion packages/mdxast/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mdx-js/mdxast",
"version": "0.15.6",
"version": "0.16.0",
"license": "MIT",
"repository": "mdx-js/mdx",
"description": "Transforms MDAST to MDXAST",
4 changes: 2 additions & 2 deletions packages/parcel-plugin-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@mdx-js/parcel-plugin-mdx",
"version": "0.15.7",
"version": "0.16.0",
"main": "src/index.js",
"author": "Matthew Hamlin <hamlim@outlook.com> (https://matthamlin.me/)",
"license": "MIT",
"repository": "mdx-js/mdx",
"dependencies": {
"@mdx-js/mdx": "^0.15.7",
"@mdx-js/mdx": "^0.16.0",
"parcel-bundler": "^1.4.1"
},
"peerDependencies": {
2 changes: 1 addition & 1 deletion packages/remark-images/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "remark-images",
"version": "0.15.6",
"version": "0.16.0",
"license": "MIT",
"repository": "mdx-js/mdx",
"description": "Improved syntax for images in markdown",
6 changes: 3 additions & 3 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mdx-js/runtime",
"description": "Parse and render MDX in a runtime environment",
"version": "0.15.7",
"version": "0.16.0",
"license": "MIT",
"author": "John Otander",
"main": "dist",
@@ -26,8 +26,8 @@
"remark-slug": "^5.1.0"
},
"dependencies": {
"@mdx-js/mdx": "^0.15.7",
"@mdx-js/tag": "^0.15.6",
"@mdx-js/mdx": "^0.16.0",
"@mdx-js/tag": "^0.16.0",
"buble": "^0.19.3"
},
"jest": {
8 changes: 1 addition & 7 deletions packages/tag/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mdx-js/tag",
"license": "MIT",
"version": "0.15.6",
"version": "0.16.0",
"repository": "mdx-js/mdx",
"description": "A fully-featured Markdown/MDX React component for ambitious projects",
"main": "dist/index.js",
@@ -20,17 +20,11 @@
"remark",
"mdx"
],
"dependencies": {
"create-react-context": "^0.2.2",
"hoist-non-react-statics": "^2.5.5",
"prop-types": "^15.6.1"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"jest": "^23.1.0",
"react": "^16.3.2",
"react-dom": "^16.3.2"
9 changes: 1 addition & 8 deletions packages/tag/src/mdx-provider.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react'
import createReactContext from 'create-react-context'
import PropTypes from 'prop-types'

const { Provider, Consumer } = createReactContext({})
const { Provider, Consumer } = React.createContext({})

export const withMDXComponents = Component => ({ components, ...props }) => (
<Consumer>
@@ -16,9 +14,4 @@ const MDXProvider = ({ components, children }) => (
<Provider value={components}>{children}</Provider>
)

MDXProvider.propTypes = {
components: PropTypes.object.isRequired,
children: PropTypes.element.isRequired
}

export default MDXProvider
3 changes: 0 additions & 3 deletions packages/tag/src/mdx-tag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { Component } from 'react'
import hoistStatics from 'hoist-non-react-statics'

import { withMDXComponents } from './mdx-provider'

@@ -27,8 +26,6 @@ class MDXTag extends Component {
name

if (Layout) {
hoistStatics(this, Layout)

return (
<Layout components={components} {...layoutProps}>
<Component {...childProps}>{children}</Component>
Loading