Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change scopes #98

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/lemon-tips-sing/changes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"releases": [
{ "name": "@extract-types/babel-plugin-extract-react-types", "type": "patch" },
{ "name": "@extract-types/loader", "type": "patch" },
{ "name": "@extract-types/core", "type": "patch" },
{ "name": "@extract-types/kind2string", "type": "patch" },
{ "name": "@extract-types/pretty-proptypes", "type": "patch" }
],
"dependents": []
}
1 change: 1 addition & 0 deletions .changeset/lemon-tips-sing/changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added @extract-types scope to packages, with slight rename for sense
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"preconstruct": {
"packages": [
"packages/extract-react-types",
"packages/core",
"packages/kind2string",
"packages/pretty-proptypes"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-extract-react-types/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { findExportedComponents } = require('extract-react-types');
const { findExportedComponents } = require('@extract-types/core');

module.exports = babel => {
let t = babel.types;
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-extract-react-types/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "babel-plugin-extract-react-types",
"name": "@extract-types/babel-plugin-extract-react-types",
"version": "0.1.6",
"main": "index.js",
"license": "MIT",
Expand All @@ -17,7 +17,7 @@
],
"author": "Mitchell Hamilton",
"dependencies": {
"extract-react-types": "^0.22.0"
"@extract-types/core": "^0.22.0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "extract-react-types",
"name": "@extract-types/core",
"version": "0.22.1",
"main": "dist/extract-react-types.cjs.js",
"main": "dist/core.cjs.js",
"repository": "atlassian/extract-react-types",
"description": "Parse prop-types from react components using typescript or flow",
"author": "James Kyle <[email protected]>",
Expand Down Expand Up @@ -43,4 +43,4 @@
"jest": "^24.7.1",
"prettier": "^1.13.7"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/extract-react-types-loader/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow

const path = require('path');
const { extractReactTypes } = require('extract-react-types');
const { extractReactTypes } = require('@extract-types/core');

const devProps = {
component: {
Expand Down
4 changes: 2 additions & 2 deletions packages/extract-react-types-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "extract-react-types-loader",
"name": "@extract-types/loader",
"version": "0.3.9",
"main": "index.js",
"repository": "atlassian/extract-react-types",
Expand All @@ -14,6 +14,6 @@
"documentation"
],
"dependencies": {
"extract-react-types": "^0.22.0"
"@extract-types/core": "^0.22.0"
}
}
2 changes: 1 addition & 1 deletion packages/kind2string/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Default use-case:

```js
import generatedData from './extract-react-type-write-location';
import convert from 'kind2string';
import convert from '@extract-types/kind2string';

export default () => <div>convert(generatedData)</div>;
```
Expand Down
4 changes: 2 additions & 2 deletions packages/kind2string/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "kind2string",
"name": "@extract-types/kind2string",
"version": "0.6.3",
"main": "dist/kind2string.cjs.js",
"module": "dist/kind2string.esm.js",
Expand All @@ -12,7 +12,7 @@
],
"devDependencies": {
"babel-jest": "^24.7.1",
"extract-react-types": "^0.22.0"
"@extract-types/core": "^0.22.0"
},
"dependencies": {
"@babel/runtime": "^7.4.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/kind2string/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* eslint-disable no-undef */

/*::
import * as K from 'extract-react-types'
import * as K from '@extract-types/core'
*/

import { resolveToLast, resolveFromGeneric, reduceToObj } from './utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/kind2string/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import { extractReactTypes } from 'extract-react-types';
import { extractReactTypes } from '@extract-types/core';
import convert from './src';

const assembleERTAST = (propTypes, defaultProps, type = 'flow') => {
Expand Down
6 changes: 3 additions & 3 deletions packages/pretty-proptypes/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "pretty-proptypes",
"name": "@extract-types/pretty-proptypes",
"version": "1.0.1",
"description": "prettily render prop types from react components",
"repository": "atlassian/extract-react-types",
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"@babel/runtime": "^7.4.4",
"@emotion/core": "^10.0.14",
"kind2string": "^0.6.3",
"@extract-types/kind2string": "^0.6.3",
"react-markings": "^1.2.0"
},
"files": [
Expand All @@ -25,7 +25,7 @@
"devDependencies": {
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"extract-react-types": "^0.22.0",
"@extract-types/core": "^0.22.0",
"jsdom": "^11.7.0",
"react": "^16.3.1",
"react-addons-test-utils": "^15.6.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/pretty-proptypes/src/PrettyConvert/converters.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { type Node } from 'react';
import convert, { resolveFromGeneric } from 'kind2string';
import convert, { resolveFromGeneric } from '@extract-types/kind2string';
import type { Components } from '../components';
import AddBrackets from './AddBrackets';
import { colors } from '../components/constants';
/*::
import * as K from 'extract-react-types'
import * as K from '@extract-types/core'
*/

export const SIMPLE_TYPES = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { shallow, configure } from 'enzyme';
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import { extractReactTypes } from 'extract-react-types';
import { extractReactTypes } from '@extract-types/core';
import components from '../components';
import prettyConvert, { TypeMinWidth } from './converters';

Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-proptypes/src/PrettyConvert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { Component, type Node } from 'react';
import { resolveFromGeneric } from 'kind2string';
import { resolveFromGeneric } from '@extract-types/kind2string';
import { gridSize } from '../components/constants';
import allComponents, { type Components } from '../components';
import Toggle from './Toggle';
Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-proptypes/src/PropType/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
/* eslint-disable no-param-reassign */
import React from 'react';
import convert, { getKind, reduceToObj } from 'kind2string';
import convert, { getKind, reduceToObj } from '@extract-types/kind2string';
import Prop from '../Prop';
import allComponents from '../components';

Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-proptypes/src/Props/Props.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import React from 'react';
import { mount, configure } from 'enzyme';
import { extractReactTypes } from 'extract-react-types';
import { extractReactTypes } from '@extract-types/core';
import Adapter from 'enzyme-adapter-react-16';

import Props from './';
Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-proptypes/src/getPropTypes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import { reduceToObj, resolveFromGeneric } from 'kind2string';
import { reduceToObj, resolveFromGeneric } from '@extract-types/kind2string';
import type { Kind } from './types';

const getPropTypes = (propTypesObj: Kind) => {
Expand Down