Skip to content

Commit

Permalink
Merge pull request #150 from liferay/wincent/scope/js-toolkit-core
Browse files Browse the repository at this point in the history
chore(js-toolkit): move liferay-js-toolkit-core (v3.x) to @liferay/js-toolkit-core
  • Loading branch information
wincent authored Oct 14, 2020
2 parents 542e42c + 9ebcea8 commit a59badd
Show file tree
Hide file tree
Showing 140 changed files with 153 additions and 64 deletions.
2 changes: 1 addition & 1 deletion projects/js-toolkit/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Copy the relevant section from the changelog to the corresponding entry on the [

After the release, you can confirm that the packages are correctly listed in the NPM registry:

- https://www.npmjs.com/package/liferay-js-toolkit-core
- https://www.npmjs.com/package/@liferay/js-toolkit-core
- https://www.npmjs.com/package/liferay-npm-bundler

## Releasing pre-release versions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"author": "Liferay Frontend Infrastructure Team <pt-frontend-infrastructure@liferay.com>",
"dependencies": {
"@liferay/js-toolkit-core": "3.0.0-alpha.2",
"dot-prop": "^5.0.1",
"fs-extra": "^8.1.0",
"liferay-js-toolkit-core": "3.0.0-alpha.2",
"read-json-sync": "^2.0.1",
"yargs": "^14.0.0",
"yeoman-generator": "^3.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {Project, ProjectType, format} from 'liferay-js-toolkit-core';
import {Project, ProjectType, format} from '@liferay/js-toolkit-core';
import path from 'path';
import {argv} from 'yargs';
import Generator from 'yeoman-generator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {PkgJson} from '@liferay/js-toolkit-core';
import prop from 'dot-prop';
import {PkgJson} from 'liferay-js-toolkit-core';
import path from 'path';

import {DEFAULT_CONFIGURATION} from '../facet-configuration/constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"rootDir": "./src"
},
"include": ["src/**/*", "src/**/*.json"],
"references": [{"path": "../liferay-js-toolkit-core"}]
"references": [{"path": "../js-toolkit-core"}]
}
3 changes: 3 additions & 0 deletions projects/js-toolkit/packages/js-toolkit-core/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Make `yarn version` produce the right commit message and tag for this package.
version-tag-prefix "js-toolkit-core/v"
version-git-message "chore: prepare @liferay/js-toolkit-core v%s release"
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"description": "Utility library for Liferay NPM Build Tools.",
"license": "LGPL-3.0",
"main": "lib/index.js",
"name": "liferay-js-toolkit-core",
"name": "@liferay/js-toolkit-core",
"repository": {
"directory": "projects/js-toolkit/packages/liferay-js-toolkit-core",
"directory": "projects/js-toolkit/packages/js-toolkit-core",
"type": "git",
"url": "https://github.com/liferay/liferay-frontend-projects.git"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ describe('project.versionsInfo', () => {
expect(versions).toEqual(
new Map([
[
'liferay-js-toolkit-core',
'@liferay/js-toolkit-core',
{
version: require('../../../package.json').version,
path: path.join('..', '..', '..', '..', '..', '..'),
Expand Down
3 changes: 0 additions & 3 deletions projects/js-toolkit/packages/liferay-js-toolkit-core/.yarnrc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
},
"dependencies": {
"@babel/core": "^7.0.0",
"@liferay/js-toolkit-core": "3.0.0-alpha.2",
"babel-template": "^6.26.0",
"cpr": "^3.0.1",
"cross-spawn": "^7.0.0",
"dot-prop": "^5.0.1",
"ejs": "^2.6.1",
"fs-extra": "^8.1.0",
"globby": "^11.0.1",
"liferay-js-toolkit-core": "3.0.0-alpha.2",
"properties": "^1.2.1",
"read-json-sync": "^2.0.1",
"request": "^2.88.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {Project} from '@liferay/js-toolkit-core';
import prop from 'dot-prop';
import {Project} from 'liferay-js-toolkit-core';
import readJsonSync from 'read-json-sync';

export const project = new Project('.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {format} from 'liferay-js-toolkit-core';
import {format} from '@liferay/js-toolkit-core';

import build from './scripts/build';
import copyAssets from './scripts/copy-assets';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {runNodeModulesBin} from 'liferay-js-toolkit-core';
import {runNodeModulesBin} from '@liferay/js-toolkit-core';

export default function (): void {
runNodeModulesBin('liferay-npm-bundler');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {format} from '@liferay/js-toolkit-core';
import cpr from 'cpr';
import fs from 'fs-extra';
import {format} from 'liferay-js-toolkit-core';

import {project} from '../config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {format} from '@liferay/js-toolkit-core';
import cpr from 'cpr';
import fs from 'fs-extra';
import {format} from 'liferay-js-toolkit-core';

import {project} from '../config';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {Project} from 'liferay-js-toolkit-core';
import {Project} from '@liferay/js-toolkit-core';
import path from 'path';
import readJsonSync from 'read-json-sync';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {ConfigurationJsonField} from 'liferay-js-toolkit-core';
import {ConfigurationJsonField} from '@liferay/js-toolkit-core';

import {
addMetatypeAttr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ConfigurationJsonField,
ConfigurationJsonPortletInstance,
Project,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';

interface Field {
dataType: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import fs from 'fs-extra';
import globby, {GlobbyOptions} from 'globby';
import JSZip from 'jszip';
import {
ConfigurationJson,
ConfigurationJsonPortletInstance,
ConfigurationJsonSystem,
FilePath,
format,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import globby, {GlobbyOptions} from 'globby';
import JSZip from 'jszip';
import path from 'path';

import {project} from '../../config';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {ConfigurationJsonField} from 'liferay-js-toolkit-core';
import {ConfigurationJsonField} from '@liferay/js-toolkit-core';
import {Element, ElementCompact, js2xml, xml2js} from 'xml-js';

type XmlObject = Element | ElementCompact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {format} from '@liferay/js-toolkit-core';
import fs from 'fs';
import {format} from 'liferay-js-toolkit-core';
import path from 'path';

import {getLiferayDir, project} from '../config';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {format} from '@liferay/js-toolkit-core';
import fs from 'fs';
import {format} from 'liferay-js-toolkit-core';
import properties from 'properties';
import request from 'request';
import uuidv4 from 'uuid/v4';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"rootDir": "./src"
},
"include": ["src/**/*"],
"references": [{"path": "../liferay-js-toolkit-core"}]
"references": [{"path": "../js-toolkit-core"}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"liferay-npm-bundler": "bin/liferay-npm-bundler.js"
},
"dependencies": {
"@liferay/js-toolkit-core": "3.0.0-alpha.2",
"acorn": "^6.2.1",
"cross-spawn": "^7.0.0",
"ejs": "^2.6.1",
Expand All @@ -12,7 +13,6 @@
"fs-extra": "^8.1.0",
"globby": "^11.0.1",
"jszip": "^3.1.5",
"liferay-js-toolkit-core": "3.0.0-alpha.2",
"pretty-time": "^1.1.0",
"read-json-sync": "^2.0.1",
"source-map": "^0.7.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
JsSourceTransform,
parseAsAstExpressionStatement,
replaceJsSource,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';

/**
* Changes `'app-root'` to `'#'+_LIFERAY_PARAMS_.portletElementId` so that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import fs from 'fs-extra';
import {
addNamespace,
addPkgJsonDependencies,
deletePkgJsonDependencies,
transformJsSourceFile,
transformJsonFile,
wrapModule,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import path from 'path';

import {bundlerWebpackDir, project} from '../../globals';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {JsSourceTransform, replaceJsSource} from 'liferay-js-toolkit-core';
import {parseAsExpressionStatement} from 'liferay-js-toolkit-core/lib/transform/js/parse';
import {JsSourceTransform, replaceJsSource} from '@liferay/js-toolkit-core';
import {parseAsExpressionStatement} from '@liferay/js-toolkit-core/lib/transform/js/parse';

const {expression: webpackManifestExpression} = parseAsExpressionStatement(
'__WEBPACK_MANIFEST__'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import fs from 'fs-extra';
import {
FilePath,
PkgDesc,
Expand All @@ -12,7 +11,8 @@ import {
isLocalModule,
joinModuleName,
splitModuleName,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import path from 'path';

import {bundlerWebpackDir, manifest, project} from '../../globals';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
JsSourceTransform,
parseAsAstExpressionStatement,
replaceJsSource,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';

export default function tweakAttachmentToDOM(): JsSourceTransform {
return ((source) => _tweakAttachmentToDOM(source)) as JsSourceTransform;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import fs from 'fs-extra';
import {
JsSourceTransform,
PkgJson,
Expand All @@ -13,7 +12,8 @@ import {
transformJsonFile,
transformTextFile,
wrapModule,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import path from 'path';

import {bundlerGeneratedDir, project} from '../globals';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import fs from 'fs-extra';
import {
FilePath,
transformJsSourceFile,
wrapModule,
} from 'liferay-js-toolkit-core';
} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';

import {bundlerWebpackDir, project} from '../../globals';
import * as log from '../../util/log';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {FilePath, ProjectType, isLocalModule} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import {FilePath, ProjectType, isLocalModule} from 'liferay-js-toolkit-core';
import webpack from 'webpack';

import {bundlerGeneratedDir, bundlerWebpackDir, project} from '../globals';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {ProjectType} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import {ProjectType} from 'liferay-js-toolkit-core';
import webpack from 'webpack';

import adaptBundlerProject from '../adapt/bundler-project';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {Manifest, Project} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import {Manifest, Project} from 'liferay-js-toolkit-core';

export const manifest = new Manifest();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {PkgDesc, ProjectType} from '@liferay/js-toolkit-core';
import fs from 'fs-extra';
import {PkgDesc, ProjectType} from 'liferay-js-toolkit-core';
import pretty from 'pretty-time';

import adaptAngularCli from './adapt/angular-cli';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {PkgDesc} from 'liferay-js-toolkit-core';
import {PkgDesc} from '@liferay/js-toolkit-core';

import {Report} from '../index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

import {LogLevel} from 'liferay-js-toolkit-core';
import {LogLevel} from '@liferay/js-toolkit-core';
import pretty from 'pretty-time';

import {Report} from '.';
Expand Down
Loading

0 comments on commit a59badd

Please sign in to comment.