Skip to content
Merged
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
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ jobs:
- name: Install Dependencies
run: yarn

- name: Get Artifact Publish Token
id: publish-token
uses: atlassian-labs/artifact-publish-token@v1.0.1
with:
output-modes: npm

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# this expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:watch": "jest --watch",
"changeset": "changeset",
"apply-changesets": "changeset version",
"release": "yarn build && changeset publish",
"release": "yarn build && changeset publish --use-npmrc=./.npmrc-public",
"postinstall": "preconstruct dev",
"lint": "yarn eslint \"./**/*.js\"",
"lint:fix": "prettier --write packages/**/*.js",
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('@atlaskit/extract-react-types');

module.exports = babel => {
let t = babel.types;
Expand Down
7 changes: 5 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": "@atlaskit/babel-plugin-extract-react-types",
"version": "0.2.0",
"main": "index.js",
"license": "MIT",
Expand All @@ -17,13 +17,16 @@
],
"author": "Mitchell Hamilton",
"dependencies": {
"extract-react-types": "^0.30.0"
"@atlaskit/extract-react-types": "^0.30.0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/plugin-syntax-flow": "^7.2.0",
"@babel/plugin-syntax-jsx": "^7.2.0",
"@babel/plugin-syntax-typescript": "^7.2.0",
"jest-in-case": "^1.0.2"
},
"publishConfig": {
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
}
}
2 changes: 1 addition & 1 deletion packages/extract-react-types-loader/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
const path = require('path');
const { extractReactTypes } = require('extract-react-types');
const { extractReactTypes } = require('@atlaskit/extract-react-types');

module.exports = function extractReactTypesLoader(content /* : string */) {
const filename = this.resource;
Expand Down
7 changes: 5 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": "@atlaskit/extract-react-types-loader",
"version": "1.0.0",
"main": "index.js",
"repository": "atlassian/extract-react-types",
Expand All @@ -14,6 +14,9 @@
"documentation"
],
"dependencies": {
"extract-react-types": "^0.30.0"
"@atlaskit/extract-react-types": "^0.30.0"
},
"publishConfig": {
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
}
}
4 changes: 2 additions & 2 deletions packages/extract-react-types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@
-import extractReactTypes from 'extract-react-types';
+import { extractReactTypes } from 'extract-react-types';
// or in cjs
-const extractReactTypes = require('extract-react-types');
+const { extractReactTypes } = require('extract-react-types');
-const extractReactTypes = require('@atlaskit/extract-react-types');
+const { extractReactTypes } = require('@atlaskit/extract-react-types');
```

### Patch Changes
Expand Down
7 changes: 5 additions & 2 deletions packages/extract-react-types/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "extract-react-types",
"name": "@atlaskit/extract-react-types",
"version": "0.30.4",
"main": "dist/extract-react-types.cjs.js",
"main": "dist/atlaskit-extract-react-types.cjs.js",
"repository": "atlassian/extract-react-types",
"description": "Parse prop-types from react components using typescript or flow",
"author": "James Kyle <me@thejameskyle.com>",
Expand Down Expand Up @@ -43,5 +43,8 @@
"flow-bin": "^0.98.0",
"jest": "^27.0.0",
"prettier": "^1.13.7"
},
"publishConfig": {
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
}
}
11 changes: 7 additions & 4 deletions packages/kind2string/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "kind2string",
"name": "@atlaskit/kind2string",
"version": "0.8.1",
"main": "dist/kind2string.cjs.js",
"module": "dist/kind2string.esm.js",
"main": "dist/atlaskit-kind2string.cjs.js",
"module": "dist/atlaskit-kind2string.esm.js",
"license": "MIT",
"author": "Atlassian",
"repository": "atlassian/extract-react-types",
Expand All @@ -12,9 +12,12 @@
],
"devDependencies": {
"babel-jest": "^27.0.0",
"extract-react-types": "^0.30.0"
"@atlaskit/extract-react-types": "^0.30.0"
},
"dependencies": {
"@babel/runtime": "^7.4.4"
},
"publishConfig": {
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
}
}
2 changes: 1 addition & 1 deletion packages/kind2string/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* eslint-disable no-console */

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

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 '@atlaskit/extract-react-types';
import convert, { converters } from './src';

const assembleERTAST = (propTypes, defaultProps, type = 'flow') => {
Expand Down Expand Up @@ -333,7 +333,7 @@
expect(converted).toBe('react.Component');
});

it.skip('Resolves down to a string representation for namespaced external imports', () => {

Check warning on line 336 in packages/kind2string/test.js

View workflow job for this annotation

GitHub Actions / build (21.1.0)

Tests should not be skipped
let file = `
import { Component } from 'react';
import * as foo from 'bar';
Expand Down
13 changes: 8 additions & 5 deletions packages/pretty-proptypes/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "pretty-proptypes",
"name": "@atlaskit/pretty-proptypes",
"version": "1.7.1",
"description": "prettily render prop types from react components",
"repository": "atlassian/extract-react-types",
"main": "dist/pretty-proptypes.cjs.js",
"module": "dist/pretty-proptypes.esm.js",
"main": "dist/atlaskit-pretty-proptypes.cjs.js",
"module": "dist/atlaskit-pretty-proptypes.esm.js",
"keywords": [
"extract-react-types",
"react",
Expand All @@ -16,20 +16,23 @@
"dependencies": {
"@babel/runtime": "^7.4.4",
"@emotion/core": "^10.0.14",
"kind2string": "^0.8.1",
"@atlaskit/kind2string": "^0.8.1",
"react-markings": "^1.2.0"
},
"files": [
"dist"
],
"devDependencies": {
"extract-react-types": "^0.30.0",
"@atlaskit/extract-react-types": "^0.30.0",
"jsdom": "^26.1.0",
"react": "^16.3.1",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.3.1"
},
"peerDependencies": {
"react": ">=16"
},
"publishConfig": {
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
}
}
2 changes: 1 addition & 1 deletion packages/pretty-proptypes/src/LayoutRenderer/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { render, screen } from '@testing-library/react';
import React from 'react';
import { extractReactTypes } from 'extract-react-types';
import { extractReactTypes } from '@atlaskit/extract-react-types';
import LayoutRenderer from './index';

const assembleComponent = (propTypes, defaultProps, type = 'typescript') => {
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 '@atlaskit/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 '@atlaskit/extract-react-types'
*/

export const SIMPLE_TYPES = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React from 'react';
import { render } from '@testing-library/react';
import { extractReactTypes } from 'extract-react-types';
import { extractReactTypes } from '@atlaskit/extract-react-types';
import components from '../components';
import prettyConvert 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 '@atlaskit/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/Props/Props.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import React from 'react';
import { render, screen } from '@testing-library/react';
import { extractReactTypes } from 'extract-react-types';
import { extractReactTypes } from '@atlaskit/extract-react-types';

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 '@atlaskit/kind2string';
import type { Kind } from './types';

const getPropTypes = (propTypesObj: Kind) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-proptypes/src/renderPropType.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
/* eslint-disable no-param-reassign */
import React, { type ComponentType } from 'react';
import convert, { getKind, reduceToObj } from 'kind2string';
import convert, { getKind, reduceToObj } from '@atlaskit/kind2string';
import allComponents from './components';

const IGNORE_COMMENTS_STARTING_WITH = ['eslint-disable', '@ts-'];
Expand Down