From f30671742d6f0ee8e4db9ce517f7944e2a63457e Mon Sep 17 00:00:00 2001 From: Lene Gadewoll Date: Mon, 23 Sep 2024 15:24:53 +0200 Subject: [PATCH] build: update dependencies build: ensure sass files are added to packed sub packages --- packages/eui-common/package.json | 7 ++++--- packages/eui-theme-base/package.json | 15 +++++++++------ packages/eui-theme-berlin/package.json | 11 +++++++---- packages/eui/package.json | 11 +++++++---- packages/website/package.json | 1 + yarn.lock | 8 ++++++++ 6 files changed, 36 insertions(+), 17 deletions(-) diff --git a/packages/eui-common/package.json b/packages/eui-common/package.json index 3304718b1c24..bc5dd429ba0a 100644 --- a/packages/eui-common/package.json +++ b/packages/eui-common/package.json @@ -7,8 +7,9 @@ "build:clean": "rimraf lib", "build": "yarn build:clean && yarn build:compile && yarn build:compile:cjs && yarn build:types", "build:compile": "tsc --project tsconfig.json", - "build:compile:cjs": "NODE_ENV=production babel src --out-dir=lib/cjs --verbose --extensions .js,.ts,.tsx --source-maps", + "build:compile:cjs": "NODE_ENV=production babel src --out-dir=lib/cjs --extensions .js,.ts,.tsx --source-maps", "build:types": "NODE_ENV=production tsc --project tsconfig.types.json", + "build-pack": "yarn build && npm pack", "lint": "yarn tsc --noEmit && yarn lint-es", "lint-es": "eslint --cache src/**/*.ts --max-warnings 0", "test": "jest" @@ -40,14 +41,14 @@ "rimraf": "^6.0.1", "typescript": "^5.6.2" }, - "main": "src/index.ts", + "main": "lib/cjs/index.js", "exports": { "./lib/*": "./lib/*", "./scripts/*": "./scripts/*", ".": { "require": "./lib/cjs/index.js", "import": "./lib/esm/index.js", - "default": "./lib/esm/index.js" + "default": "./lib/cjs/index.js" } }, "files": [ diff --git a/packages/eui-theme-base/package.json b/packages/eui-theme-base/package.json index d303cb506230..8df81c23b355 100644 --- a/packages/eui-theme-base/package.json +++ b/packages/eui-theme-base/package.json @@ -7,8 +7,9 @@ "build:clean": "rimraf lib/", "build": "yarn build:clean && yarn build:compile && yarn build:compile:cjs && yarn build:types", "build:compile": "tsc --project tsconfig.json", - "build:compile:cjs": "NODE_ENV=production babel src --out-dir=lib/cjs --verbose --extensions .js,.ts,.tsx --source-maps", + "build:compile:cjs": "NODE_ENV=production babel src --out-dir=lib/cjs --extensions .js,.ts,.tsx --source-maps", "build:types": "NODE_ENV=production tsc --project tsconfig.types.json", + "build-pack": "yarn build && npm pack", "lint": "yarn tsc --noEmit && yarn lint-es && yarn lint-sass", "lint-es": "eslint --cache src/**/*.ts --max-warnings 0", "lint-sass": "yarn stylelint \"**/*.scss\" --quiet-deprecation-warnings", @@ -20,15 +21,13 @@ "directory": "packages/eui-theme-base" }, "private": true, - "dependencies": { - "@elastic/eui-common": "workspace:^" - }, "devDependencies": { "@babel/cli": "^7.21.5", "@babel/core": "^7.21.8", "@babel/preset-env": "^7.21.5", "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.21.5", + "@elastic/eui-common": "workspace:^", "@types/jest": "^29.5.12", "@types/prettier": "2.7.3", "@typescript-eslint/eslint-plugin": "^5.59.7", @@ -48,17 +47,21 @@ "stylelint-config-standard-scss": "^9.0.0", "typescript": "4.5.3" }, - "main": "src/index.ts", + "peerDependencies": { + "@elastic/eui-common": "workspace:^" + }, + "main": "lib/cjs/index.js", "exports": { "./lib/*": "./lib/*", ".": { "require": "./lib/cjs/index.js", "import": "./lib/esm/index.js", - "default": "./lib/esm/index.js" + "default": "./lib/cjs/index.js" } }, "files": [ "lib/", + "src/**/*.scss", "README.md" ], "installConfig": { diff --git a/packages/eui-theme-berlin/package.json b/packages/eui-theme-berlin/package.json index 6260b270f569..51b6b546bb88 100644 --- a/packages/eui-theme-berlin/package.json +++ b/packages/eui-theme-berlin/package.json @@ -14,13 +14,15 @@ "directory": "packages/eui-theme-berlin" }, "private": true, - "dependencies": { - "@elastic/eui-common": "workspace:^", - "@elastic/eui-theme-base": "workspace:^" - }, "devDependencies": { + "@elastic/eui-common": "workspace:^", + "@elastic/eui-theme-base": "workspace:^", "typescript": "^5.6.2" }, + "peerDependencies": { + "@elastic/eui-common": "workspace:^", + "@elastic/eui-theme-base": "workspace:^" + }, "main": "lib/index.js", "exports": { "./lib/*": "./lib/*", @@ -30,6 +32,7 @@ }, "files": [ "lib/", + "src/**/*.scss", "README.md" ] } diff --git a/packages/eui/package.json b/packages/eui/package.json index 4a42420e7cda..2a2a5f9f2fea 100644 --- a/packages/eui/package.json +++ b/packages/eui/package.json @@ -16,7 +16,7 @@ ], "scripts": { "start": "cross-env BABEL_MODULES=false webpack serve --config=src-docs/webpack.config.js", - "init:workspaces": "yarn workspaces foreach -Rpti --from @elastic/eui --exclude @elastic/eui run build", + "init:workspaces": "yarn workspaces foreach -Rti --from @elastic/eui --exclude @elastic/eui run build", "build-docs": "cross-env BABEL_MODULES=false cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=4096 webpack --config=src-docs/webpack.config.js", "build": "node ./scripts/compile-i18n-strings.js && node ./scripts/compile-clean.js && node ./scripts/compile-eui.js && yarn compile-scss", "build-pack": "yarn build && npm pack", @@ -52,9 +52,6 @@ "url": "https://github.com/elastic/eui.git" }, "dependencies": { - "@elastic/eui-common": "workspace:^", - "@elastic/eui-theme-base": "workspace:^", - "@elastic/eui-theme-berlin": "workspace:^", "@hello-pangea/dnd": "^16.6.0", "@types/lodash": "^4.14.202", "@types/numeral": "^2.0.5", @@ -107,6 +104,9 @@ "@cypress/webpack-dev-server": "^1.7.0", "@elastic/charts": "^64.1.0", "@elastic/datemath": "^5.0.3", + "@elastic/eui-common": "workspace:^", + "@elastic/eui-theme-base": "workspace:^", + "@elastic/eui-theme-berlin": "workspace:^", "@emotion/babel-preset-css-prop": "^11.11.0", "@emotion/cache": "^11.11.0", "@emotion/css": "^11.11.0", @@ -257,6 +257,9 @@ }, "peerDependencies": { "@elastic/datemath": "^5.0.2", + "@elastic/eui-common": "workspace:^", + "@elastic/eui-theme-base": "workspace:^", + "@elastic/eui-theme-berlin": "workspace:^", "@emotion/css": "11.x", "@emotion/react": "11.x", "@types/react": "^16.9 || ^17.0 || ^18.0", diff --git a/packages/website/package.json b/packages/website/package.json index 77302ccfb73d..b6263ad491fd 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "docusaurus": "docusaurus", + "init:workspaces": "yarn workspace @elastic/eui-common run build && yarn workspace @elastic/eui-theme-base run build && yarn workspace @elastic/eui-theme-berlin run build && yarn workspaces foreach -Rti --from @elastic/eui-website run build", "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider docusaurus start", "build": "cross-env NODE_OPTIONS=--openssl-legacy-provider docusaurus build", "swizzle": "docusaurus swizzle", diff --git a/yarn.lock b/yarn.lock index 245f66b7f4ab..2b0914ea5468 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5803,6 +5803,8 @@ __metadata: stylelint-config-standard: "npm:^33.0.0" stylelint-config-standard-scss: "npm:^9.0.0" typescript: "npm:4.5.3" + peerDependencies: + "@elastic/eui-common": "workspace:^" languageName: unknown linkType: soft @@ -5813,6 +5815,9 @@ __metadata: "@elastic/eui-common": "workspace:^" "@elastic/eui-theme-base": "workspace:^" typescript: "npm:^5.6.2" + peerDependencies: + "@elastic/eui-common": "workspace:^" + "@elastic/eui-theme-base": "workspace:^" languageName: unknown linkType: soft @@ -6053,6 +6058,9 @@ __metadata: yo: "npm:^4.3.1" peerDependencies: "@elastic/datemath": ^5.0.2 + "@elastic/eui-common": "workspace:^" + "@elastic/eui-theme-base": "workspace:^" + "@elastic/eui-theme-berlin": "workspace:^" "@emotion/css": 11.x "@emotion/react": 11.x "@types/react": ^16.9 || ^17.0 || ^18.0