chore: change package org from 0xproject to 0x
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@0xproject/monorepo-scripts",
|
||||
"name": "@0x/monorepo-scripts",
|
||||
"version": "1.0.11",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
|
@@ -7,7 +7,7 @@ import { constants } from './constants';
|
||||
import { utils } from './utils/utils';
|
||||
|
||||
// For some reason, `depcheck` hangs on some packages. Add them here.
|
||||
const IGNORE_PACKAGES = ['@0xproject/sol-compiler'];
|
||||
const IGNORE_PACKAGES = ['@0x/sol-compiler'];
|
||||
|
||||
(async () => {
|
||||
utils.log('*** NOTE: Not all deps listed here are actually not required. ***');
|
||||
|
@@ -18,7 +18,7 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils
|
||||
import { publishReleaseNotesAsync } from './utils/github_release_utils';
|
||||
import { utils } from './utils/utils';
|
||||
|
||||
const NPM_NAMESPACE = '@0xproject/';
|
||||
const NPM_NAMESPACE = '@0x/';
|
||||
const TODAYS_TIMESTAMP = moment().unix();
|
||||
|
||||
async function confirmAsync(message: string): Promise<void> {
|
||||
@@ -96,7 +96,7 @@ function getPackagesWithDocs(allUpdatedPackages: Package[]): Package[] {
|
||||
const packagesWithDocPages = packagesWithDocPagesStringIfExist.split(' ');
|
||||
const updatedPackagesWithDocPages: Package[] = [];
|
||||
_.each(allUpdatedPackages, pkg => {
|
||||
const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', '');
|
||||
const nameWithoutPrefix = pkg.packageJson.name.replace('@0x/', '');
|
||||
if (_.includes(packagesWithDocPages, nameWithoutPrefix)) {
|
||||
updatedPackagesWithDocPages.push(pkg);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ async function generateAndUploadDocJsonsAsync(
|
||||
shouldUploadDocs: boolean,
|
||||
): Promise<void> {
|
||||
for (const pkg of packagesWithDocs) {
|
||||
const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', '');
|
||||
const nameWithoutPrefix = pkg.packageJson.name.replace('@0x/', '');
|
||||
const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging, shouldUploadDocs);
|
||||
await docGenerateAndUploadUtils.generateAndUploadDocsAsync();
|
||||
}
|
||||
@@ -130,7 +130,7 @@ async function confirmDocPagesRenderAsync(packagesWithDocs: Package[]): Promise<
|
||||
|
||||
_.each(packagesWithDocs, pkg => {
|
||||
const name = pkg.packageJson.name;
|
||||
const nameWithoutPrefix = _.startsWith(name, NPM_NAMESPACE) ? name.split('@0xproject/')[1] : name;
|
||||
const nameWithoutPrefix = _.startsWith(name, NPM_NAMESPACE) ? name.split('@0x/')[1] : name;
|
||||
const link = `${constants.stagingWebsite}/docs/${nameWithoutPrefix}`;
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
opn(link);
|
||||
|
@@ -15,7 +15,7 @@ const args = yargs
|
||||
'Space-separated list of packages to generated release notes for. If not supplied, it does all `Lerna updated` packages.',
|
||||
type: 'string',
|
||||
})
|
||||
.example('$0 --isDryRun true --packages "0x.js @0xproject/web3-wrapper"', 'Full usage example').argv;
|
||||
.example('$0 --isDryRun true --packages "0x.js @0x/web3-wrapper"', 'Full usage example').argv;
|
||||
|
||||
(async () => {
|
||||
const isDryRun = args.isDryRun;
|
||||
|
@@ -12,7 +12,7 @@ import { Package } from './types';
|
||||
import { utils } from './utils/utils';
|
||||
|
||||
// Packages might not be runnable if they are command-line tools or only run in browsers.
|
||||
const UNRUNNABLE_PACKAGES = ['@0xproject/abi-gen', '@0xproject/react-shared', '@0xproject/react-docs'];
|
||||
const UNRUNNABLE_PACKAGES = ['@0x/abi-gen', '@0x/react-shared', '@0x/react-docs'];
|
||||
|
||||
const mkdirpAsync = promisify(mkdirp);
|
||||
const rimrafAsync = promisify(rimraf);
|
||||
@@ -116,7 +116,7 @@ async function testInstallPackageAsync(
|
||||
await writeFileAsync(indexFilePath, `import * as Package from '${packageName}';\nconsole.log(Package);\n`);
|
||||
const tsConfig = {
|
||||
compilerOptions: {
|
||||
typeRoots: ['node_modules/@0xproject/typescript-typings/types', 'node_modules/@types'],
|
||||
typeRoots: ['node_modules/@0x/typescript-typings/types', 'node_modules/@types'],
|
||||
module: 'commonjs',
|
||||
target: 'es5',
|
||||
lib: ['es2017', 'dom'],
|
||||
|
@@ -402,7 +402,7 @@ export class DocGenerateAndUploadUtils {
|
||||
sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath;
|
||||
return sanitizedExportPath;
|
||||
}
|
||||
const monorepoPrefix = '@0xproject/';
|
||||
const monorepoPrefix = '@0x/';
|
||||
if (_.startsWith(exportPath, monorepoPrefix)) {
|
||||
const sanitizedExportPath = exportPath.split(monorepoPrefix)[1];
|
||||
sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath;
|
||||
@@ -478,7 +478,7 @@ export class DocGenerateAndUploadUtils {
|
||||
});
|
||||
});
|
||||
|
||||
// @0xproject/types & ethereum-types are examples of packages where their index.ts exports types
|
||||
// @0x/types & ethereum-types are examples of packages where their index.ts exports types
|
||||
// directly, meaning no internal paths will exist to follow. Other packages also have direct exports
|
||||
// in their index.ts, so we always add it to the source files passed to TypeDoc
|
||||
if (typeDocSourceIncludes.size === 0) {
|
||||
|
@@ -93,7 +93,7 @@ function adjustAssetPaths(assets: string[]): string[] {
|
||||
}
|
||||
|
||||
function getReleaseNotesForPackage(packageName: string, version: string): string {
|
||||
const packageNameWithoutNamespace = packageName.replace('@0xproject/', '');
|
||||
const packageNameWithoutNamespace = packageName.replace('@0x/', '');
|
||||
const changelogJSONPath = path.join(
|
||||
constants.monorepoRootPath,
|
||||
'packages',
|
||||
|
Reference in New Issue
Block a user