@webiny/build-tools 0.0.0-unstable.6da6f521e4 → 0.0.0-unstable.7be00a75a9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/build-tools",
3
- "version": "0.0.0-unstable.6da6f521e4",
3
+ "version": "0.0.0-unstable.7be00a75a9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -73,8 +73,7 @@
73
73
  }
74
74
  },
75
75
  "publishConfig": {
76
- "access": "public",
77
- "directory": "."
76
+ "access": "public"
78
77
  },
79
78
  "gitHead": "b8aec8a1be3f25c3b428b357fe1e352c7cbff9ae"
80
79
  }
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * This tool will re-link monorepo packages to one of the following directories (by priority):
3
- * - {package}/package.json -> publishConfig.directory
4
- * - lerna.json -> command.publish.contents
3
+ * - {package}/package.json -> webiny.publishFrom
5
4
  * - package root directory
6
5
  */
7
6
 
@@ -11,7 +10,6 @@ import path from "path";
11
10
  import get from "lodash/get.js";
12
11
  import fs from "fs-extra";
13
12
  import * as rimraf from "rimraf";
14
- import { loadJsonFileSync } from "load-json-file";
15
13
 
16
14
  async function symlink(src, dest) {
17
15
  if (process.platform !== "win32") {
@@ -71,9 +69,6 @@ export const linkWorkspaces = async ({ whitelist, blacklist } = defaults) => {
71
69
  return whitelist.some(w => pkg.startsWith(w));
72
70
  });
73
71
 
74
- const lernaJson = path.resolve("lerna.json");
75
- const lerna = fs.existsSync(lernaJson) ? loadJsonFileSync(lernaJson) : null;
76
-
77
72
  for (let i = 0; i < packages.length; i++) {
78
73
  const packageJson = path.resolve(packages[i], "package.json");
79
74
  if (!fs.existsSync(packageJson)) {
@@ -83,11 +78,7 @@ export const linkWorkspaces = async ({ whitelist, blacklist } = defaults) => {
83
78
  const pkgJson = await PackageJson.fromFile(packageJson);
84
79
  const pkg = pkgJson.getJson();
85
80
 
86
- let targetDirectory = get(pkg, "publishConfig.directory");
87
- if (!targetDirectory && lerna) {
88
- targetDirectory = get(lerna, "command.publish.contents");
89
- }
90
-
81
+ const targetDirectory = get(pkg, "webiny.publishFrom");
91
82
  const link = path.resolve("node_modules", pkg.name);
92
83
  const target = path.resolve(packages[i], targetDirectory || ".");
93
84