Clean up unused deps and add TS to the build. (https://github.com/woocommerce/woocommerce-admin/pull/6441)
This commit is contained in:
parent
4d4d4ec49d
commit
630f31ae9d
|
@ -15,4 +15,20 @@ module.exports = {
|
|||
'jest/valid-title': 'warn',
|
||||
'@wordpress/no-global-active-element': 'warn',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: [ '*.ts', '*.tsx' ],
|
||||
parser: '@typescript-eslint/parser',
|
||||
extends: [
|
||||
'plugin:@woocommerce/eslint-plugin/recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
'no-use-before-define': 'off',
|
||||
'@typescript-eslint/no-use-before-define': [ 'error' ],
|
||||
'jsdoc/require-param': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
# Changelog Script
|
||||
|
||||
This folder contains the logic for a changelog script that can be used for generating changelog entries from either pull requests added to a Github milestone, or pull requests that are part of a Zenhub release.
|
||||
|
||||
## Usage:
|
||||
|
||||
By default, changelog entries will use the title of pull requests. However, you can also customize the changelog entry by adding to the description of the pull custom text in the following format.
|
||||
|
||||
```md
|
||||
### Changelog
|
||||
|
||||
> Fix bug in Safari and other Webkit browsers.
|
||||
```
|
||||
|
||||
You can implement the script in your `package.json` in the simplest form by adding the following to the `"scripts"` property (assuming it is installed in `./bin`):
|
||||
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"changelog": "node ./bin/changelog",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following configuration options can be set for the changelog script. **Note:** you can use all of these options but environment variables overwrite `package.json` config and command line arguments overwrite environment variables.
|
||||
|
||||
`package.json` configuration should be added on a top level `changelog` property.
|
||||
|
||||
The 'variable' in the following table can be used in `package.json` or as a cli arg.
|
||||
|
||||
| variable | description |
|
||||
| ---- | ---- |
|
||||
| labelPrefix | Any labels prefixed with this string will be used to derive the "type" of change (defaults to `type:`). |
|
||||
| skipLabel | Any pull having this label will be skipped for the changelog (defaults to `no-changelog`). |
|
||||
| defaultPrefix | When there is no label with the `labelPrefix` on a pull, this is the default type that will be used for the changelog entry (defaults to `dev`). |
|
||||
| changelogSrcType | Either "MILESTONE" (default) or "ZENHUB_RELEASE". This determines what will serve as the source for the changelog entries.
|
||||
| devNoteLabel | If a pull has this label then `[DN]` will be appended to the end of the changelog. It's a good way to indicate what entries have (or will have) dev notes.
|
||||
| repo | This is the namespace for the github repository used as the source for pulls used in the changelog entries. Example: `'woocommerce/woocommerce-gutenberg-products-block'`
|
||||
| ghApiToken | You can pass your github api token to the script. NOTE: Strongly recommend you use environment variable for this. |
|
||||
| zhApiKey | You can pass your zenhub api key to the script using this config. NOTE: Strongly recommend you use environment variable for this. |
|
||||
|
||||
The two environment variables you can use are:
|
||||
|
||||
| Environment Variable | Description |
|
||||
| -------------------- | ---------- |
|
||||
| GH_API_TOKEN | Github API token for authorizing on the github API. |
|
||||
| ZH_API_TOKEN | Zenhub api token used for authorizing against the zenhub API. |
|
||||
|
||||
### Examples:
|
||||
|
||||
**package.json**:
|
||||
|
||||
```json
|
||||
{
|
||||
"changelog": {
|
||||
"labelPrefix": "type:",
|
||||
"skipLabel": "skip-changelog",
|
||||
"defaultPrefix": "dev",
|
||||
"repo": "woocommerce/woocommerce-gutenberg-products-block"
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
**Environment Variable**
|
||||
```bash
|
||||
GH_API_TOKEN="1343ASDFQWER13241REASD" node ./bin/changelog
|
||||
```
|
||||
|
||||
**Command Line**
|
||||
```bash
|
||||
node ./bin/changelog --labelPrefix="type:" --skipLabel="skip-changelog" --defaultPrefix="dev" --repo="woocommerce/woocommerce-gutenberg-products-block" --ghApiToken="1343ASDFQWER13241REASD"
|
||||
```
|
|
@ -1,89 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const requestPromise = require( 'request-promise' );
|
||||
const { graphql } = require( '@octokit/graphql' );
|
||||
const { pkg, REPO } = require( '../config' );
|
||||
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
const headers = {
|
||||
authorization: `token ${ pkg.changelog.ghApiToken }`,
|
||||
'user-agent': 'changelog-tool',
|
||||
};
|
||||
|
||||
const authedGraphql = graphql.defaults( { headers } );
|
||||
|
||||
const getPullRequestType = ( labels ) => {
|
||||
const typeLabel = labels.find( ( label ) =>
|
||||
label.name.includes( pkg.changelog.labelPrefix )
|
||||
);
|
||||
if ( ! typeLabel ) {
|
||||
return pkg.changelog.defaultPrefix;
|
||||
}
|
||||
return typeLabel.name.replace( `${ pkg.changelog.labelPrefix } `, '' );
|
||||
};
|
||||
|
||||
const isCollaborator = async ( username ) => {
|
||||
return requestPromise( {
|
||||
url: `https://api.github.com/orgs/${
|
||||
REPO.split( '/' )[ 0 ]
|
||||
}/members/${ username }`,
|
||||
headers,
|
||||
resolveWithFullResponse: true,
|
||||
} )
|
||||
.then( ( response ) => {
|
||||
return response.statusCode === 204;
|
||||
} )
|
||||
.catch( ( err ) => {
|
||||
if ( err.statusCode !== 404 ) {
|
||||
console.log( '🤯' );
|
||||
console.log( err.message );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
const getLabels = ( labels ) => {
|
||||
return labels
|
||||
.filter( ( label ) => ! /\[.*\]/.test( label.name ) )
|
||||
.map( ( label ) => label.name )
|
||||
.join( ', ' );
|
||||
};
|
||||
|
||||
const getEntry = async ( pullRequest ) => {
|
||||
if (
|
||||
pullRequest.labels.nodes.some(
|
||||
( label ) => label.name === pkg.changelog.skipLabel
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
const collaborator = await isCollaborator( pullRequest.author.login );
|
||||
const type = getPullRequestType( pullRequest.labels.nodes );
|
||||
const authorTag = collaborator ? '' : `👏 @${ pullRequest.author.login }`;
|
||||
const labels = getLabels( pullRequest.labels.nodes );
|
||||
const labelTags = labels ? `(${ labels })` : '';
|
||||
let title;
|
||||
if ( /### Changelog Note:/.test( pullRequest.body ) ) {
|
||||
const bodyParts = pullRequest.body.split( '### Changelog Note:' );
|
||||
const note = bodyParts[ bodyParts.length - 1 ];
|
||||
title = note
|
||||
// Remove comment prompt
|
||||
.replace( /<!---(.*)--->/gm, '' )
|
||||
// Remove new lines and whitespace
|
||||
.trim();
|
||||
if ( ! title.length ) {
|
||||
title = `${ type }: ${ pullRequest.title }`;
|
||||
} else {
|
||||
title = `${ type }: ${ title }`;
|
||||
}
|
||||
} else {
|
||||
title = `${ type }: ${ pullRequest.title }`;
|
||||
}
|
||||
return `- ${ title } [#${ pullRequest.number }](${ pullRequest.url }) ${ labelTags } ${ authorTag }`;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
authedGraphql,
|
||||
getEntry,
|
||||
};
|
|
@ -1,4 +0,0 @@
|
|||
const { authedGraphql } = require( './get-entry' );
|
||||
const { make } = require( './make' );
|
||||
|
||||
module.exports = { authedGraphql, make };
|
|
@ -1,34 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const chalk = require( 'chalk' );
|
||||
const { getEntry } = require( './get-entry' );
|
||||
|
||||
/* eslint no-console: 0*/
|
||||
|
||||
const make = async ( pullRequestFetcher, version ) => {
|
||||
const pullRequests = await pullRequestFetcher( version );
|
||||
let entries = await Promise.all(
|
||||
pullRequests.map( async ( pr ) => await getEntry( pr ) )
|
||||
);
|
||||
if ( ! entries || ! entries.length ) {
|
||||
console.log(
|
||||
chalk.yellow( "This version doesn't have any associated PR." )
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
entries = entries.filter( Boolean );
|
||||
|
||||
if ( ! entries || ! entries.length ) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'None of the PRs of this version are eligible for the changelog.'
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
entries.sort();
|
||||
console.log( entries.join( '\n' ) );
|
||||
};
|
||||
|
||||
module.exports = { make };
|
|
@ -1,46 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const pkg = require( '../../package.json' );
|
||||
const Config = require( 'merge-config' );
|
||||
|
||||
const config = new Config();
|
||||
|
||||
const changelogSrcTypes = {
|
||||
MILESTONE: 'MILESTONE',
|
||||
ZENHUB: 'ZENHUB_RELEASE',
|
||||
};
|
||||
|
||||
const DEFAULTS = {
|
||||
labelPrefix: 'type:',
|
||||
skipLabel: 'no-changelog',
|
||||
defaultPrefix: 'dev',
|
||||
changelogSrcType: changelogSrcTypes.MILESTONE,
|
||||
devNoteLabel: 'dev-note',
|
||||
repo: '',
|
||||
ghApiToken: '',
|
||||
zhApiToken: '',
|
||||
};
|
||||
|
||||
pkg.changelog = pkg.changelog || DEFAULTS;
|
||||
|
||||
config.merge( { ...DEFAULTS, ...pkg.changelog } );
|
||||
config.env( [ 'GH_API_TOKEN', 'ZH_API_TOKEN' ] );
|
||||
config.argv( Object.keys( DEFAULTS ) );
|
||||
|
||||
const REPO = config.get( 'repo' );
|
||||
|
||||
if ( ! REPO ) {
|
||||
throw new Error(
|
||||
"The 'repo' configuration value is not set. This script requires the\n" +
|
||||
'repository namespace used as the source for the changelog entries.'
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
pkg: {
|
||||
...pkg,
|
||||
changelog: config.get(),
|
||||
},
|
||||
REPO,
|
||||
changelogSrcTypes,
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
'use-strict';
|
||||
|
||||
const { makeChangeLog } = require( './make-change-log' );
|
||||
|
||||
module.exports = {
|
||||
makeChangeLog,
|
||||
};
|
|
@ -1,70 +0,0 @@
|
|||
'use strict';
|
||||
const chalk = require( 'chalk' );
|
||||
const promptly = require( 'promptly' );
|
||||
const { REPO, pkg } = require( '../config' );
|
||||
const { make } = require( '../common' );
|
||||
const { fetchAllPullRequests } = require( './requests' );
|
||||
|
||||
/* eslint no-console: 0 */
|
||||
let ready = false;
|
||||
|
||||
const makeChangeLog = async () => {
|
||||
if ( ! pkg.changelog.ghApiToken ) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'This program requires an api token. You can create one here: '
|
||||
) + 'https://github.com/settings/tokens'
|
||||
);
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'Token scope will require read permissions on public_repo, admin:org, and user.'
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'Export the token as variable called GH_API_TOKEN from your bash profile.'
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
|
||||
ready = await promptly.confirm( 'Are you ready to continue? ' );
|
||||
} else {
|
||||
console.log( chalk.green( 'Detected GH_API_TOKEN is set.' ) );
|
||||
ready = true;
|
||||
}
|
||||
|
||||
if ( ready ) {
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'In order to generate the changelog, you will have to provide a version number to retrieve the PRs from.'
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow( 'Write it as it appears in the milestones page: ' ) +
|
||||
`https://github.com/${ REPO }/milestones`
|
||||
);
|
||||
console.log( '' );
|
||||
const version = await promptly.prompt( 'Version number: ' );
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.green(
|
||||
'Here is the generated changelog. Be sure to remove entries ' +
|
||||
`not intended for a ${ pkg.title } release.`
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
make( fetchAllPullRequests, version );
|
||||
} else {
|
||||
console.log( '' );
|
||||
console.log( chalk.yellow( 'Ok, see you soon.' ) );
|
||||
console.log( '' );
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
makeChangeLog,
|
||||
};
|
|
@ -1,93 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const { REPO } = require( '../config' );
|
||||
const { authedGraphql } = require( '../common' );
|
||||
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
const getMilestoneNumber = async ( version ) => {
|
||||
const [ owner, repo ] = REPO.split( '/' );
|
||||
const query = `
|
||||
{
|
||||
repository(owner: "${ owner }", name: "${ repo }") {
|
||||
milestones(last: 50) {
|
||||
nodes {
|
||||
title
|
||||
number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
const data = await authedGraphql( query );
|
||||
const matchingNode = data.repository.milestones.nodes.find(
|
||||
( node ) => node.title === version
|
||||
);
|
||||
if ( ! matchingNode ) {
|
||||
throw new Error(
|
||||
`Unable to find a milestone matching the given version ${ version }`
|
||||
);
|
||||
}
|
||||
return matchingNode.number;
|
||||
};
|
||||
|
||||
const getQuery = ( milestoneNumber, before ) => {
|
||||
const [ owner, repo ] = REPO.split( '/' );
|
||||
const paging = before ? `, before: "${ before }"` : '';
|
||||
return `
|
||||
{
|
||||
repository(owner: "${ owner }", name: "${ repo }") {
|
||||
milestone(number: ${ milestoneNumber }) {
|
||||
pullRequests(last: 100, states: [MERGED]${ paging }) {
|
||||
totalCount
|
||||
pageInfo {
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
}
|
||||
nodes {
|
||||
number
|
||||
title
|
||||
url
|
||||
author {
|
||||
login
|
||||
}
|
||||
body
|
||||
labels(last: 10) {
|
||||
nodes {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
};
|
||||
|
||||
const fetchAllPullRequests = async ( version ) =>
|
||||
await ( async () => {
|
||||
const milestoneNumber = await getMilestoneNumber( version );
|
||||
const fetchResults = async ( before ) => {
|
||||
const query = getQuery( milestoneNumber, before );
|
||||
const results = await authedGraphql( query );
|
||||
if (
|
||||
results.repository.milestone.pullRequests.pageInfo
|
||||
.hasPreviousPage === false
|
||||
) {
|
||||
return results.repository.milestone.pullRequests.nodes;
|
||||
}
|
||||
|
||||
const nextResults = await fetchResults(
|
||||
results.repository.milestone.pullRequests.pageInfo.startCursor
|
||||
);
|
||||
return results.repository.milestone.pullRequests.nodes.concat(
|
||||
nextResults
|
||||
);
|
||||
};
|
||||
return await fetchResults();
|
||||
} )();
|
||||
|
||||
module.exports = {
|
||||
fetchAllPullRequests,
|
||||
};
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
/* eslint no-console: 0 */
|
||||
const chalk = require( 'chalk' );
|
||||
|
||||
try {
|
||||
const { makeChangeLog: githubMake } = require( './github' );
|
||||
const { makeChangeLog: zenhubMake } = require( './zenhub' );
|
||||
const { pkg, changelogSrcTypes } = require( './config' );
|
||||
|
||||
const makeChangeLog =
|
||||
pkg.changelog.changelogSrcType === changelogSrcTypes.ZENHUB
|
||||
? zenhubMake
|
||||
: githubMake;
|
||||
|
||||
makeChangeLog();
|
||||
} catch ( error ) {
|
||||
console.log( chalk.red( error.message ) );
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
'use-strict';
|
||||
|
||||
const { makeChangeLog } = require( './make-change-log' );
|
||||
|
||||
module.exports = {
|
||||
makeChangeLog,
|
||||
};
|
|
@ -1,88 +0,0 @@
|
|||
'use strict';
|
||||
const chalk = require( 'chalk' );
|
||||
const promptly = require( 'promptly' );
|
||||
const { pkg } = require( '../config' );
|
||||
const { make } = require( '../common' );
|
||||
const { fetchAllPullRequests } = require( './requests' );
|
||||
|
||||
/* eslint no-console: 0 */
|
||||
let ready = false;
|
||||
|
||||
const makeChangeLog = async () => {
|
||||
if ( ! pkg.changelog.zhApiToken || ! pkg.changelog.ghApiToken ) {
|
||||
const zenhubSet = pkg.changelog.zhApiToken
|
||||
? chalk.green( 'set' )
|
||||
: chalk.red( 'not set' );
|
||||
const githubSet = pkg.changelog.ghApiToken
|
||||
? chalk.green( 'set' )
|
||||
: chalk.red( 'not set' );
|
||||
console.log( `${ chalk.yellow( 'Zenhub Token:' ) } ${ zenhubSet }` );
|
||||
console.log( `${ chalk.yellow( 'Github Token:' ) } ${ githubSet }` );
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'This program requires an api token from Github and Zenhub.'
|
||||
)
|
||||
);
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'You can create and get a Github token here: https://github.com/settings/tokens'
|
||||
)
|
||||
);
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'You can create and get a Zenhub token here: https://app.zenhub.com/dashboard/tokens'
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'Token scope for Github will require read permissions on public_repo, admin:org, and user.'
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'Export the github token as variable called GH_API_TOKEN and the Zenhub token as a variable called ZH_API_TOKEN from your bash profile.'
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
|
||||
ready = await promptly.confirm( 'Are you ready to continue? ' );
|
||||
} else {
|
||||
console.log(
|
||||
chalk.green(
|
||||
'Detected that ZH_API_TOKEN and GH_API_TOKEN values are set.'
|
||||
)
|
||||
);
|
||||
ready = true;
|
||||
}
|
||||
|
||||
if ( ready ) {
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'In order to generate the changelog, you will have to provide the Zenhub release ID to retrieve the PRs from. You can get that from `release` param value in the url of the release report page.'
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
const releaseId = await promptly.prompt( 'Release Id: ' );
|
||||
console.log( '' );
|
||||
console.log(
|
||||
chalk.green(
|
||||
'Here is the generated changelog. Be sure to remove entries ' +
|
||||
`not intended for a ${ pkg.title } release. All entries with the ${ pkg.changelog.skipLabel } label have been skipped`
|
||||
)
|
||||
);
|
||||
console.log( '' );
|
||||
make( fetchAllPullRequests, releaseId );
|
||||
} else {
|
||||
console.log( '' );
|
||||
console.log( chalk.yellow( 'Ok, see you soon.' ) );
|
||||
console.log( '' );
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
makeChangeLog,
|
||||
};
|
|
@ -1,100 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
const ZenHub = require( 'zenhub-api' );
|
||||
const { REPO, pkg } = require( '../config' );
|
||||
const { authedGraphql } = require( '../common' );
|
||||
const { pull } = require( 'lodash' );
|
||||
|
||||
const api = new ZenHub( pkg.changelog.zhApiToken );
|
||||
|
||||
const getQuery = ( before ) => {
|
||||
const [ owner, repo ] = REPO.split( '/' );
|
||||
const paging = before ? `, before: "${ before }"` : '';
|
||||
const query = `
|
||||
{
|
||||
repository(owner: "${ owner }", name: "${ repo }") {
|
||||
pullRequests(last: 100, states: [MERGED]${ paging }) {
|
||||
totalCount
|
||||
pageInfo {
|
||||
startCursor
|
||||
}
|
||||
nodes {
|
||||
number
|
||||
title
|
||||
url
|
||||
author {
|
||||
login
|
||||
}
|
||||
body
|
||||
labels(last: 10) {
|
||||
nodes {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
return query;
|
||||
};
|
||||
|
||||
const fetchAllIssuesForRelease = async ( releaseId ) => {
|
||||
const releaseIssues = await api.getReleaseReportIssues( {
|
||||
release_id: releaseId,
|
||||
} );
|
||||
return releaseIssues.map( ( releaseIssue ) => releaseIssue.issue_number );
|
||||
};
|
||||
|
||||
const extractPullRequestsMatchingReleaseIssue = (
|
||||
releaseIds,
|
||||
pullRequests
|
||||
) => {
|
||||
return pullRequests.filter( ( pullRequest ) => {
|
||||
const hasPullRequest = releaseIds.includes( pullRequest.number );
|
||||
if ( hasPullRequest ) {
|
||||
pull( releaseIds, pullRequest.number );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} );
|
||||
};
|
||||
|
||||
const fetchAllPullRequests = async ( releaseId ) => {
|
||||
// first get all release issue ids
|
||||
const releaseIds = await fetchAllIssuesForRelease( releaseId );
|
||||
let maxPages = Math.ceil( releaseIds.length / 100 ) + 2;
|
||||
const fetchResults = async ( before ) => {
|
||||
const query = getQuery( before );
|
||||
const results = await authedGraphql( query );
|
||||
const pullRequests = extractPullRequestsMatchingReleaseIssue(
|
||||
releaseIds,
|
||||
results.repository.pullRequests.nodes
|
||||
);
|
||||
if ( maxPages === 0 ) {
|
||||
return pullRequests;
|
||||
}
|
||||
maxPages--;
|
||||
const nextResults = await fetchResults(
|
||||
results.repository.pullRequests.pageInfo.startCursor
|
||||
);
|
||||
return pullRequests.concat(
|
||||
extractPullRequestsMatchingReleaseIssue( releaseIds, nextResults )
|
||||
);
|
||||
};
|
||||
let results = [];
|
||||
try {
|
||||
results = await fetchResults();
|
||||
} catch ( e ) {
|
||||
console.log( e.request );
|
||||
console.log( e.message );
|
||||
console.log( e.data );
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
fetchAllPullRequests,
|
||||
};
|
|
@ -1299,24 +1299,6 @@
|
|||
"regenerator-runtime": "^0.13.4"
|
||||
}
|
||||
},
|
||||
"@babel/runtime-corejs2": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.12.5.tgz",
|
||||
"integrity": "sha512-kt5YpZ7F5A05LOgQuaMXXmcxakK/qttf5C/E1BJPA3Kf5PanbjPzDoXN+PIslUnjUxpuKblCsXyP0QfMiqyKqA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-js": "^2.6.5",
|
||||
"regenerator-runtime": "^0.13.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
|
||||
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/runtime-corejs3": {
|
||||
"version": "7.12.13",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.13.tgz",
|
||||
|
@ -5099,17 +5081,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"@octokit/graphql": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.0.tgz",
|
||||
"integrity": "sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@octokit/request": "^5.3.0",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"@octokit/openapi-types": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-4.0.4.tgz",
|
||||
|
@ -6327,6 +6298,152 @@
|
|||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"fork-ts-checker-webpack-plugin": {
|
||||
"version": "4.1.6",
|
||||
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz",
|
||||
"integrity": "sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.5.5",
|
||||
"chalk": "^2.4.1",
|
||||
"micromatch": "^3.1.10",
|
||||
"minimatch": "^3.0.4",
|
||||
"semver": "^5.6.0",
|
||||
"tapable": "^1.0.0",
|
||||
"worker-rpc": "^0.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"braces": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
|
||||
"integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-flatten": "^1.1.0",
|
||||
"array-unique": "^0.3.2",
|
||||
"extend-shallow": "^2.0.1",
|
||||
"fill-range": "^4.0.0",
|
||||
"isobject": "^3.0.1",
|
||||
"repeat-element": "^1.1.2",
|
||||
"snapdragon": "^0.8.1",
|
||||
"snapdragon-node": "^2.0.1",
|
||||
"split-string": "^3.0.2",
|
||||
"to-regex": "^3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"extend-shallow": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-extendable": "^0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||
"integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"extend-shallow": "^2.0.1",
|
||||
"is-number": "^3.0.0",
|
||||
"repeat-string": "^1.6.1",
|
||||
"to-regex-range": "^2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"extend-shallow": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-extendable": "^0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"is-number": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
|
||||
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"kind-of": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
||||
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-buffer": "^1.1.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
|
||||
"integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-diff": "^4.0.0",
|
||||
"array-unique": "^0.3.2",
|
||||
"braces": "^2.3.1",
|
||||
"define-property": "^2.0.2",
|
||||
"extend-shallow": "^3.0.2",
|
||||
"extglob": "^2.0.4",
|
||||
"fragment-cache": "^0.2.1",
|
||||
"kind-of": "^6.0.2",
|
||||
"nanomatch": "^1.2.9",
|
||||
"object.pick": "^1.3.0",
|
||||
"regex-not": "^1.0.0",
|
||||
"snapdragon": "^0.8.1",
|
||||
"to-regex": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
|
||||
"integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-number": "^3.0.0",
|
||||
"repeat-string": "^1.6.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
||||
|
@ -8380,6 +8497,236 @@
|
|||
"resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",
|
||||
"integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA=="
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "4.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.2.tgz",
|
||||
"integrity": "sha512-uiQQeu9tWl3f1+oK0yoAv9lt/KXO24iafxgQTkIYO/kitruILGx3uH+QtIAHqxFV+yIsdnJH+alel9KuE3J15Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/experimental-utils": "4.15.2",
|
||||
"@typescript-eslint/scope-manager": "4.15.2",
|
||||
"debug": "^4.1.1",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"lodash": "^4.17.15",
|
||||
"regexpp": "^3.0.0",
|
||||
"semver": "^7.3.2",
|
||||
"tsutils": "^3.17.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz",
|
||||
"integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "4.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.2.tgz",
|
||||
"integrity": "sha512-Fxoshw8+R5X3/Vmqwsjc8nRO/7iTysRtDqx6rlfLZ7HbT8TZhPeQqbPjTyk2RheH3L8afumecTQnUc9EeXxohQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/scope-manager": "4.15.2",
|
||||
"@typescript-eslint/types": "4.15.2",
|
||||
"@typescript-eslint/typescript-estree": "4.15.2",
|
||||
"eslint-scope": "^5.0.0",
|
||||
"eslint-utils": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "4.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.2.tgz",
|
||||
"integrity": "sha512-Zm0tf/MSKuX6aeJmuXexgdVyxT9/oJJhaCkijv0DvJVT3ui4zY6XYd6iwIo/8GEZGy43cd7w1rFMiCLHbRzAPQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.15.2",
|
||||
"@typescript-eslint/visitor-keys": "4.15.2"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "4.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.2.tgz",
|
||||
"integrity": "sha512-r7lW7HFkAarfUylJ2tKndyO9njwSyoy6cpfDKWPX6/ctZA+QyaYscAHXVAfJqtnY6aaTwDYrOhp+ginlbc7HfQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "4.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.2.tgz",
|
||||
"integrity": "sha512-cGR8C2g5SPtHTQvAymEODeqx90pJHadWsgTtx6GbnTWKqsg7yp6Eaya9nFzUd4KrKhxdYTTFBiYeTPQaz/l8bw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.15.2",
|
||||
"@typescript-eslint/visitor-keys": "4.15.2",
|
||||
"debug": "^4.1.1",
|
||||
"globby": "^11.0.1",
|
||||
"is-glob": "^4.0.1",
|
||||
"semver": "^7.3.2",
|
||||
"tsutils": "^3.17.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "4.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.2.tgz",
|
||||
"integrity": "sha512-TME1VgSb7wTwgENN5KVj4Nqg25hP8DisXxNBojM4Nn31rYaNDIocNm5cmjOFfh42n7NVERxWrDFoETO/76ePyg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "4.15.2",
|
||||
"eslint-visitor-keys": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"array-union": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
|
||||
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
|
||||
"dev": true
|
||||
},
|
||||
"braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"dir-glob": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
|
||||
"integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-type": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"eslint-utils": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
|
||||
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eslint-visitor-keys": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
|
||||
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-visitor-keys": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz",
|
||||
"integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==",
|
||||
"dev": true
|
||||
},
|
||||
"fast-glob": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
|
||||
"integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@nodelib/fs.stat": "^2.0.2",
|
||||
"@nodelib/fs.walk": "^1.2.3",
|
||||
"glob-parent": "^5.1.0",
|
||||
"merge2": "^1.3.0",
|
||||
"micromatch": "^4.0.2",
|
||||
"picomatch": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"globby": {
|
||||
"version": "11.0.2",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz",
|
||||
"integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-union": "^2.1.0",
|
||||
"dir-glob": "^3.0.1",
|
||||
"fast-glob": "^3.1.1",
|
||||
"ignore": "^5.1.4",
|
||||
"merge2": "^1.3.0",
|
||||
"slash": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"ignore": {
|
||||
"version": "5.1.8",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
|
||||
"integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
|
||||
"dev": true
|
||||
},
|
||||
"is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"dev": true
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
|
||||
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"braces": "^3.0.1",
|
||||
"picomatch": "^2.0.5"
|
||||
}
|
||||
},
|
||||
"path-type": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
|
||||
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
|
||||
"dev": true
|
||||
},
|
||||
"regexpp": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
|
||||
"integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
|
||||
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"slash": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "4.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.0.tgz",
|
||||
|
@ -8775,7 +9122,6 @@
|
|||
"version": "file:packages/components",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/csv-export": "1.3.0",
|
||||
"@woocommerce/currency": "3.0.0",
|
||||
"@woocommerce/data": "1.1.1",
|
||||
|
@ -9074,7 +9420,6 @@
|
|||
"version": "file:packages/csv-export",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"browser-filesaver": "1.1.1",
|
||||
"moment": "2.29.1"
|
||||
}
|
||||
|
@ -9083,7 +9428,6 @@
|
|||
"version": "file:packages/currency",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/number": "2.1.0",
|
||||
"@wordpress/deprecated": "^2.9.0",
|
||||
"@wordpress/html-entities": "2.10.0"
|
||||
|
@ -9123,7 +9467,6 @@
|
|||
"version": "file:packages/customer-effort-score",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@wordpress/components": "^11.1.1",
|
||||
"@wordpress/compose": "^3.22.0",
|
||||
"@wordpress/data": "^4.25.0",
|
||||
|
@ -9201,7 +9544,6 @@
|
|||
"version": "file:packages/data",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/date": "2.1.0",
|
||||
"@woocommerce/navigation": "5.2.0",
|
||||
"rememo": "^3.0.0"
|
||||
|
@ -9211,7 +9553,6 @@
|
|||
"version": "file:packages/date",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@wordpress/date": "3.13.0",
|
||||
"@wordpress/i18n": "3.17.0",
|
||||
"lodash": "4.17.15",
|
||||
|
@ -10224,7 +10565,6 @@
|
|||
"version": "file:packages/navigation",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/experimental": "file:packages/experimental",
|
||||
"history": "4.10.1",
|
||||
"lodash": "4.17.15",
|
||||
|
@ -10253,7 +10593,6 @@
|
|||
"version": "file:packages/number",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"locutus": "2.0.14"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -10272,7 +10611,6 @@
|
|||
"version": "file:packages/tracks",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"debug": "4.3.1"
|
||||
}
|
||||
},
|
||||
|
@ -21424,29 +21762,65 @@
|
|||
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
|
||||
},
|
||||
"fork-ts-checker-webpack-plugin": {
|
||||
"version": "4.1.6",
|
||||
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz",
|
||||
"integrity": "sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw==",
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.1.0.tgz",
|
||||
"integrity": "sha512-xLNufWQ1dfQUdZe48TGQlER/0OkcMnUB6lfbN9Tt13wsYyo+2DwcCbnOaPBo1PoFow/WL8pJPktGIdbJaHxAnw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.5.5",
|
||||
"chalk": "^2.4.1",
|
||||
"micromatch": "^3.1.10",
|
||||
"@babel/code-frame": "^7.8.3",
|
||||
"@types/json-schema": "^7.0.5",
|
||||
"chalk": "^4.1.0",
|
||||
"chokidar": "^3.4.2",
|
||||
"cosmiconfig": "^6.0.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"fs-extra": "^9.0.0",
|
||||
"memfs": "^3.1.2",
|
||||
"minimatch": "^3.0.4",
|
||||
"semver": "^5.6.0",
|
||||
"tapable": "^1.0.0",
|
||||
"worker-rpc": "^0.1.0"
|
||||
"schema-utils": "2.7.0",
|
||||
"semver": "^7.3.2",
|
||||
"tapable": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"fs-extra": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
||||
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
"at-least-node": "^1.0.0",
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
|
||||
"integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.4",
|
||||
"ajv": "^6.12.2",
|
||||
"ajv-keywords": "^3.4.1"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
|
||||
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21551,6 +21925,12 @@
|
|||
"minipass": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"fs-monkey": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.1.tgz",
|
||||
"integrity": "sha512-fcSa+wyTqZa46iWweI7/ZiUfegOZl0SG8+dltIwFXo7+zYU9J9kpS3NB6pZcSlJdhvIwp81Adx2XhZorncxiaA==",
|
||||
"dev": true
|
||||
},
|
||||
"fs-readdir-recursive": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz",
|
||||
|
@ -28570,6 +28950,15 @@
|
|||
"p-is-promise": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"memfs": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/memfs/-/memfs-3.2.0.tgz",
|
||||
"integrity": "sha512-f/xxz2TpdKv6uDn6GtHee8ivFyxwxmPuXatBb1FBwxYNuVpbM3k/Y1Z+vC0mH/dIXXrukYfe3qe5J32Dfjg93A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs-monkey": "1.0.1"
|
||||
}
|
||||
},
|
||||
"memize": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/memize/-/memize-1.1.0.tgz",
|
||||
|
@ -34864,18 +35253,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"request-promise": {
|
||||
"version": "4.2.6",
|
||||
"resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz",
|
||||
"integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird": "^3.5.0",
|
||||
"request-promise-core": "1.1.4",
|
||||
"stealthy-require": "^1.1.1",
|
||||
"tough-cookie": "^2.3.3"
|
||||
}
|
||||
},
|
||||
"request-promise-core": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz",
|
||||
|
@ -37991,10 +38368,9 @@
|
|||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.1.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz",
|
||||
"integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==",
|
||||
"dev": true
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.2.tgz",
|
||||
"integrity": "sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ=="
|
||||
},
|
||||
"ua-parser-js": {
|
||||
"version": "0.7.24",
|
||||
|
@ -39905,28 +40281,6 @@
|
|||
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"zenhub-api": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/zenhub-api/-/zenhub-api-0.2.0.tgz",
|
||||
"integrity": "sha1-vVYB33T9XB3qjS9pva2m8Qz24ok=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^2.6.3",
|
||||
"request": "^2.81.0",
|
||||
"request-promise-native": "^1.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"zwitch": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz",
|
||||
|
|
|
@ -45,12 +45,13 @@
|
|||
"lint": "npm run lint:js && npm run lint:css",
|
||||
"lint:css": "stylelint '**/*.scss'",
|
||||
"lint:css-fix": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'",
|
||||
"lint:js": "wp-scripts lint-js ./packages ./client",
|
||||
"lint:js:packages": "wp-scripts lint-js ./packages",
|
||||
"lint:js:client": "wp-scripts lint-js ./client",
|
||||
"lint:js-fix": "npm run lint:js -- --fix",
|
||||
"lint:js": "wp-scripts lint-js ./packages ./client --ext=js,ts,tsx",
|
||||
"lint:js:packages": "wp-scripts lint-js ./packages --ext=js,ts,tsx",
|
||||
"lint:js:client": "wp-scripts lint-js ./client --ext=js,ts,tsx",
|
||||
"lint:js-fix": "npm run lint:js -- --fix --ext=js,ts,tsx",
|
||||
"lint:php": "./vendor/bin/phpcs --standard=phpcs.xml.dist $(git ls-files | grep .php$)",
|
||||
"lint:php-fix": "./vendor/bin/phpcbf --standard=phpcs.xml.dist $(git ls-files | grep .php$)",
|
||||
"ts:check": "tsc --build",
|
||||
"reformat-files": "wp-scripts format-js -- --ignore-path .eslintignore",
|
||||
"prepack": "npm install && npm run lint && npm run test && cross-env WC_ADMIN_PHASE=core npm run build",
|
||||
"publish-packages:check": "npm run build:packages && lerna updated",
|
||||
|
@ -123,7 +124,8 @@
|
|||
"react-router-dom": "5.2.0",
|
||||
"react-transition-group": "4.4.1",
|
||||
"react-visibility-sensor": "5.1.1",
|
||||
"redux": "4.0.5"
|
||||
"redux": "4.0.5",
|
||||
"typescript": "^4.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@automattic/color-studio": "2.4.0",
|
||||
|
@ -133,7 +135,6 @@
|
|||
"@babel/plugin-proposal-class-properties": "7.12.1",
|
||||
"@babel/plugin-transform-async-to-generator": "7.12.1",
|
||||
"@babel/plugin-transform-react-jsx": "7.12.12",
|
||||
"@octokit/graphql": "4.6.0",
|
||||
"@storybook/addon-a11y": "6.1.14",
|
||||
"@storybook/addon-actions": "6.1.14",
|
||||
"@storybook/addon-console": "1.2.3",
|
||||
|
@ -148,6 +149,7 @@
|
|||
"@testing-library/react": "11.2.5",
|
||||
"@testing-library/react-hooks": "3.7.0",
|
||||
"@testing-library/user-event": "12.7.3",
|
||||
"@typescript-eslint/eslint-plugin": "^4.15.2",
|
||||
"@woocommerce/components": "file:packages/components",
|
||||
"@woocommerce/csv-export": "file:packages/csv-export",
|
||||
"@woocommerce/currency": "file:packages/currency",
|
||||
|
@ -185,6 +187,7 @@
|
|||
"css-loader": "3.6.0",
|
||||
"docsify-cli": "4.4.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"fork-ts-checker-webpack-plugin": "^6.1.0",
|
||||
"fs-extra": "8.1.0",
|
||||
"grunt": "1.3.0",
|
||||
"grunt-checktextdomain": "1.0.1",
|
||||
|
@ -209,7 +212,6 @@
|
|||
"readline-sync": "1.4.10",
|
||||
"recast": "0.20.4",
|
||||
"replace": "1.2.0",
|
||||
"request-promise": "4.2.6",
|
||||
"rimraf": "3.0.2",
|
||||
"rtlcss": "2.5.0",
|
||||
"sass-loader": "8.0.2",
|
||||
|
@ -222,7 +224,6 @@
|
|||
"webpack-bundle-analyzer": "3.6.1",
|
||||
"webpack-cli": "3.3.11",
|
||||
"webpack-fix-style-only-entries": "0.6.0",
|
||||
"zenhub-api": "0.2.0",
|
||||
"webpack-rtl-plugin": "2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -47,9 +47,6 @@ To create a new package, add a new folder to `/packages`, containing…
|
|||
"main": "build/index.js",
|
||||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.1.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/csv-export": "1.3.0",
|
||||
"@woocommerce/currency": "3.0.0",
|
||||
"@woocommerce/data": "1.1.1",
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"browser-filesaver": "1.1.1",
|
||||
"moment": "2.29.1"
|
||||
},
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/number": "2.1.0",
|
||||
"@wordpress/deprecated": "^2.9.0",
|
||||
"@wordpress/html-entities": "2.10.0"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@wordpress/components": "^11.1.1",
|
||||
"@wordpress/compose": "^3.22.0",
|
||||
"@wordpress/data": "^4.25.0",
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/date": "2.1.0",
|
||||
"@woocommerce/navigation": "5.2.0",
|
||||
"rememo": "^3.0.0"
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@wordpress/date": "3.13.0",
|
||||
"@wordpress/i18n": "3.17.0",
|
||||
"lodash": "4.17.15",
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"@woocommerce/experimental": "file:../experimental",
|
||||
"history": "4.10.1",
|
||||
"lodash": "4.17.15",
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"locutus": "2.0.14"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"module": "build-module/index.js",
|
||||
"react-native": "src/index",
|
||||
"dependencies": {
|
||||
"@babel/runtime-corejs2": "7.12.5",
|
||||
"debug": "4.3.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"moduleResolution": "node",
|
||||
// Process & infer types from .js files.
|
||||
"allowJs": true,
|
||||
"jsx": "react",
|
||||
"jsx": "preserve",
|
||||
// Don't emit; allow Babel to transform files.
|
||||
"noEmit": true,
|
||||
// Enable strictest settings like strictNullChecks & noImplicitAny.
|
||||
|
|
|
@ -13,6 +13,7 @@ const MomentTimezoneDataPlugin = require( 'moment-timezone-data-webpack-plugin'
|
|||
const TerserPlugin = require( 'terser-webpack-plugin' );
|
||||
const UnminifyWebpackPlugin = require( './unminify' );
|
||||
const AsyncChunkSrcVersionParameterPlugin = require( './chunk-src-version-param' );
|
||||
const ForkTsCheckerWebpackPlugin = require( 'fork-ts-checker-webpack-plugin' );
|
||||
const WooCommerceDependencyExtractionWebpackPlugin = require( './packages/dependency-extraction-webpack-plugin/src/index' );
|
||||
|
||||
/**
|
||||
|
@ -86,7 +87,7 @@ const webpackConfig = {
|
|||
},
|
||||
},
|
||||
{
|
||||
test: /\.js?$/,
|
||||
test: /\.(t|j)sx?$/,
|
||||
exclude: /node_modules(\/|\\)(?!(debug))/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
|
@ -100,6 +101,7 @@ const webpackConfig = {
|
|||
useBuiltIns: 'usage',
|
||||
},
|
||||
],
|
||||
[ '@babel/preset-typescript' ],
|
||||
],
|
||||
},
|
||||
},
|
||||
|
@ -142,7 +144,7 @@ const webpackConfig = {
|
|||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: [ '.json', '.js', '.jsx' ],
|
||||
extensions: [ '.json', '.js', '.jsx', '.ts', '.tsx' ],
|
||||
alias: {
|
||||
'gutenberg-components': path.resolve(
|
||||
__dirname,
|
||||
|
@ -155,6 +157,7 @@ const webpackConfig = {
|
|||
},
|
||||
},
|
||||
plugins: [
|
||||
new ForkTsCheckerWebpackPlugin(),
|
||||
new FixStyleOnlyEntriesPlugin(),
|
||||
new CustomTemplatedPathPlugin( {
|
||||
modulename( outputPath, data ) {
|
||||
|
|
Loading…
Reference in New Issue