Skip to content

Commit

Permalink
chore: upgrade all deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Jan 18, 2018
1 parent 024066c commit 90e98d8
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 51 deletions.
1 change: 0 additions & 1 deletion .npmrc
@@ -1,2 +1 @@
registry=http://registry.npmjs.org/
save-exact=true
4 changes: 4 additions & 0 deletions .prettierignore
@@ -0,0 +1,4 @@
node_modules/
coverage/
dist/
package.json
4 changes: 1 addition & 3 deletions .travis.yml
Expand Up @@ -8,8 +8,6 @@ notifications:
node_js: '8'
install: npm install
script: npm run validate
after_success:
- npx codecov
- npx -p semantic-release@7 -c "semantic-release pre && npm publish && semantic-release post"
after_success: kcd-scripts travis-after-success
branches:
only: master
20 changes: 14 additions & 6 deletions package.json
Expand Up @@ -8,12 +8,14 @@
"build": "kcd-scripts build",
"lint": "kcd-scripts lint",
"test": "kcd-scripts test",
"test:update": "npm test -- --updateSnapshot --coverage",
"test:update": "npm test -- --updateSnapshot",
"validate": "kcd-scripts validate",
"setup": "npm install && npm run validate -s",
"precommit": "kcd-scripts precommit"
},
"files": ["dist"],
"files": [
"dist"
],
"keywords": [
"babel-plugin",
"macros",
Expand All @@ -24,22 +26,28 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "MIT",
"dependencies": {
"cosmiconfig": "3.1.0"
"cosmiconfig": "^4.0.0"
},
"devDependencies": {
"ast-pretty-print": "^2.0.1",
"babel-core": "7.0.0-beta.3",
"babel-plugin-tester": "^5.0.0",
"babylon": "7.0.0-beta.34",
"cpy": "^6.0.0",
"kcd-scripts": "^0.30.4"
"kcd-scripts": "^0.32.1"
},
"eslintConfig": {
"extends": "./node_modules/kcd-scripts/eslint.js"
},
"eslintIgnore": ["node_modules", "coverage", "dist"],
"eslintIgnore": [
"node_modules",
"coverage",
"dist"
],
"babel": {
"presets": ["./other/babel-config.js"]
"presets": [
"./other/babel-config.js"
]
},
"repository": {
"type": "git",
Expand Down
82 changes: 41 additions & 41 deletions src/__tests__/__snapshots__/index.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Supports named imports 1`] = `
exports[`macros Supports named imports: Supports named imports 1`] = `
import {css as CSS, styled as STYLED} from './fixtures/emotion.macro'
const red = CSS\`
Expand All @@ -19,7 +19,7 @@ const Div = STYLED.div\`undefined\`;
`;

exports[`Works as a JSXElement 1`] = `
exports[`macros Works as a JSXElement: Works as a JSXElement 1`] = `
import MyEval from './fixtures/eval.macro'
const x = <MyEval>34 + 45</MyEval>
Expand All @@ -30,29 +30,29 @@ const x = 79;
`;

exports[`appends the npm URL for errors thrown by node modules 1`] = `
exports[`macros appends the npm URL for errors thrown by node modules with a slash: appends the npm URL for errors thrown by node modules with a slash 1`] = `
import errorThrower from 'babel-plugin-macros-test-error-thrower.macro'
import errorThrower from 'babel-plugin-macros-test-error-thrower/macro'
errorThrower('hi')
↓ ↓ ↓ ↓ ↓ ↓
Error: babel-plugin-macros-test-error-thrower.macro: not helpful Learn more: https://www.npmjs.com/package/babel-plugin-macros-test-error-thrower.macro
Error: babel-plugin-macros-test-error-thrower/macro: not helpful Learn more: https://www.npmjs.com/package/babel-plugin-macros-test-error-thrower
`;

exports[`appends the npm URL for errors thrown by node modules with a slash 1`] = `
exports[`macros appends the npm URL for errors thrown by node modules: appends the npm URL for errors thrown by node modules 1`] = `
import errorThrower from 'babel-plugin-macros-test-error-thrower/macro'
import errorThrower from 'babel-plugin-macros-test-error-thrower.macro'
errorThrower('hi')
↓ ↓ ↓ ↓ ↓ ↓
Error: babel-plugin-macros-test-error-thrower/macro: not helpful Learn more: https://www.npmjs.com/package/babel-plugin-macros-test-error-thrower
Error: babel-plugin-macros-test-error-thrower.macro: not helpful Learn more: https://www.npmjs.com/package/babel-plugin-macros-test-error-thrower.macro
`;

exports[`does nothing but remove macros if it is unused 1`] = `
exports[`macros does nothing but remove macros if it is unused: does nothing but remove macros if it is unused 1`] = `
import foo from './some-macros-that-doesnt-even-need-to-exist.macro'
export default 'something else'
Expand All @@ -63,7 +63,7 @@ export default 'something else';
`;

exports[`forwards MacroErrors thrown by the macro 1`] = `
exports[`macros forwards MacroErrors thrown by the macro: forwards MacroErrors thrown by the macro 1`] = `
import errorThrower from './fixtures/macro-error-thrower.macro'
errorThrower('hey')
Expand All @@ -74,7 +74,7 @@ MacroError: very helpful
`;

exports[`macros can set their configName and get their config 1`] = `
exports[`macros macros can set their configName and get their config: macros can set their configName and get their config 1`] = `
import configured from './configurable.macro'
Expand All @@ -86,13 +86,7 @@ configured\`stuff\`;
`;

exports[`macros when there is an error reading the config, a helpful message is logged 1`] = `
Array [
There was an error trying to load the config "configurableMacro" for the macro imported from "./configurable.macro. Please see the error thrown for more information.,
]
`;

exports[`prepends the relative path for errors thrown by the macro 1`] = `
exports[`macros prepends the relative path for errors thrown by the macro: prepends the relative path for errors thrown by the macro 1`] = `
import errorThrower from './fixtures/error-thrower.macro'
errorThrower('hey')
Expand All @@ -103,7 +97,7 @@ Error: ./fixtures/error-thrower.macro: very unhelpful
`;

exports[`supports macros from node_modules 1`] = `
exports[`macros supports macros from node_modules: supports macros from node_modules 1`] = `
import fakeMacro from 'babel-plugin-macros-test-fake/macro'
fakeMacro('hi')
Expand All @@ -114,7 +108,7 @@ fakeMacro('hi');
`;

exports[`throws an error if the macro is not properly wrapped 1`] = `
exports[`macros throws an error if the macro is not properly wrapped: throws an error if the macro is not properly wrapped 1`] = `
import unwrapped from './fixtures/non-wrapped.macro'
unwrapped('hey')
Expand All @@ -125,7 +119,13 @@ Error: The macro imported from "./fixtures/non-wrapped.macro" must be wrapped in
`;

exports[`when there is an error reading the config, a helpful message is logged 1`] = `
exports[`macros when there is an error reading the config, a helpful message is logged 1`] = `
Array [
There was an error trying to load the config "configurableMacro" for the macro imported from "./configurable.macro. Please see the error thrown for more information.,
]
`;

exports[`macros when there is an error reading the config, a helpful message is logged: when there is an error reading the config, a helpful message is logged 1`] = `
import configured from './configurable.macro'
Expand All @@ -137,7 +137,7 @@ Error: this is a cosmiconfig error
`;

exports[`when there is no config to load, then no config is passed 1`] = `
exports[`macros when there is no config to load, then no config is passed: when there is no config to load, then no config is passed 1`] = `
import configured from './configurable.macro'
Expand All @@ -149,7 +149,7 @@ configured\`stuff\`;
`;

exports[`works with function calls 1`] = `
exports[`macros works with function calls: works with function calls 1`] = `
import myEval from './fixtures/eval.macro'
const x = myEval('34 + 45')
Expand All @@ -160,7 +160,7 @@ const x = 79;
`;

exports[`works with import 1`] = `
exports[`macros works with import: works with import 1`] = `
import myEval from './fixtures/eval.macro'
const x = myEval\`34 + 45\`
Expand All @@ -171,18 +171,26 @@ const x = 79;
`;

exports[`works with require 1`] = `
exports[`macros works with require destructuring and aliasing: works with require destructuring and aliasing 1`] = `
const evaler = require('./fixtures/eval.macro')
const x = evaler\`34 + 45\`
const {css: CSS, styled: STYLED} = require('./fixtures/emotion.macro')
const red = CSS\`
background-color: red;
\`
const Div = STYLED.div\`
composes: \${red}
color: blue;
\`
↓ ↓ ↓ ↓ ↓ ↓
const x = 79;
const red = "background-color: red;";
const Div = STYLED.div\`undefined\`;
`;

exports[`works with require destructuring 1`] = `
exports[`macros works with require destructuring: works with require destructuring 1`] = `
const {css, styled} = require('./fixtures/emotion.macro')
const red = css\`
Expand All @@ -201,21 +209,13 @@ const Div = styled.div\`undefined\`;
`;

exports[`works with require destructuring and aliasing 1`] = `
const {css: CSS, styled: STYLED} = require('./fixtures/emotion.macro')
const red = CSS\`
background-color: red;
\`
exports[`macros works with require: works with require 1`] = `
const Div = STYLED.div\`
composes: \${red}
color: blue;
\`
const evaler = require('./fixtures/eval.macro')
const x = evaler\`34 + 45\`
↓ ↓ ↓ ↓ ↓ ↓
const red = "background-color: red;";
const Div = STYLED.div\`undefined\`;
const x = 79;
`;

0 comments on commit 90e98d8

Please sign in to comment.