Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] [6.x]: DS-900: Yarn 2 #2581

Open
wants to merge 22 commits into
base: release/6.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,12 @@ scripts/release/verdaccio
# used when doing subtree splitting to read-only repos
.subsplit
.DS_Store

# Yarn 2
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_cache:
before_install:
- openssl aes-256-cbc -K $encrypted_4537e53f71e7_key -iv $encrypted_4537e53f71e7_iv -in scripts/bolt-design-system-bot.private-key.pem.enc -out scripts/bolt-design-system-bot.private-key.pem -d
- nvm install # version lifted from `.nvmrc`
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.19.1
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.19
- export PATH="$HOME/.yarn/bin:$PATH"
- composer config --global github-oauth.github.com ${GITHUB_TOKEN}

Expand All @@ -42,6 +42,7 @@ jobs:
- stage: Pre-deploy
name: 'Smoke Tests: Jest Component-Specific Tests'
install:
- yarn
- yarn run setup
- yarn workspace @bolt/website prep # creates data and manifest files
# before_script: ./scripts/check-run-queue.js 'Jest Component Tests'
Expand All @@ -54,6 +55,7 @@ jobs:
- stage: Pre-deploy
name: 'Smoke Tests: Lint + Jest Unit Tests'
install:
- yarn
- yarn run setup
- yarn workspace @bolt/website prep # creates data and manifest files
# before_script: ./scripts/check-run-queue.js 'Lint + Unit Tests'
Expand All @@ -76,6 +78,7 @@ jobs:
name: 'Build + Deploy Website + Lighthouse CLI'
if: (NOT tag =~ ^v) AND (NOT branch =~ /(master|release|bug|fix)/)
install:
- yarn
- yarn run setup
- npx lerna run postbootstrap
- export GIT_SHA=$(./scripts/get-git-sha.js)
Expand Down Expand Up @@ -109,6 +112,7 @@ jobs:
name: 'Build + Deploy Website (Full)'
if: (tag =~ ^v) OR (branch =~ /(master|release|bug|fix)/)
install:
- yarn
- yarn run setup
- export GIT_SHA=$(./scripts/get-git-sha.js)
before_script:
Expand Down
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

807 changes: 807 additions & 0 deletions .yarn/releases/yarn-3.3.0.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.3.0.cjs
2 changes: 1 addition & 1 deletion docs-site/.incache

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions docs-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
"license": "MIT",
"main": "bolt.js",
"scripts": {
"analyze": "bolt start --analyze",
"analyze:prod": "bolt build --prod --analyze",
"build": "bolt build",
"build:noisy": "bolt build --verbosity 5",
"build:pl": "bolt prep && npx lerna exec --scope @bolt/uikit-workshop --loglevel=silent -- yarn run build",
"build:prod": "bolt build --prod",
"build:webpack": "bolt webpack --prod",
"clean": "cd ../ && npm run clean",
"prep": "bolt prep",
"serve": "bolt serve",
"setup": "cd ../ && npm run setup",
"start": "bolt start",
"start:prod": "bolt start --prod",
"analyze": "yarn node ${PROJECT_CWD}/packages/build-tools start --analyze",
"analyze:prod": "yarn node ${PROJECT_CWD}/packages/build-tools build --prod --analyze",
"bolt:build": "yarn node ${PROJECT_CWD}/packages/build-tools build",
"bolt:start": "yarn node ${PROJECT_CWD}/packages/build-tools start",
"build:noisy": "yarn node ${PROJECT_CWD}/packages/build-tools build --verbosity 5",
"build:pl": "yarn node ${PROJECT_CWD}/packages/build-tools prep && yarn run lerna exec --scope @bolt/uikit-workshop --loglevel=silent -- yarn run build",
"build:prod": "yarn node ${PROJECT_CWD}/packages/build-tools build --prod",
"build:webpack": "yarn node ${PROJECT_CWD}/packages/build-tools webpack --prod",
"clean": "cd ../ && yarn clean",
"prep": "yarn node ${PROJECT_CWD}/packages/build-tools prep",
"serve": "yarn node ${PROJECT_CWD}/packages/build-tools serve",
"setup": "cd ../ && yarn setup",
"start:prod": "yarn node ${PROJECT_CWD}/packages/build-tools start --prod",
"test:links": "blc http://localhost:3000 --recursive --ordered --filter-level 2",
"watch": "bolt watch"
"watch": "yarn node ${PROJECT_CWD}/packages/build-tools watch"
},
"jest": {
"setupFilesAfterEnv": [
Expand Down
61 changes: 33 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@
"docs-site/src/components/radio-switch",
"packages/*",
"packages/*/*",
"packages/build-tools/__tests__/*",
"packages/build-tools/plugins/*",
"scripts"
],
"nohoist": [
"lazysizes",
"**/lazysizes"
]
},
"scripts": {
Expand All @@ -43,39 +38,39 @@
"build": "cd docs-site && yarn run build:prod",
"cc": "yarn create:component",
"ce": "yarn create:element",
"clean": "npx npm-run-all --parallel clean:*",
"clean:cache": "find . -name 'cache' -type d -exec rm -rf {} +",
"clean:composer": "find . -name 'vendor' -type d -exec rm -rf {} +",
"clean": "yarn npm-run-all --parallel 'clean:*'",
"clean:cache": "find . -name 'cache' -type d -exec rm -rf '{}' +",
"clean:composer": "find . -name 'vendor' -type d -exec rm -rf '{}' +",
"clean:empty": "find . -empty -type d -delete",
"clean:npm": "find . -name 'node_modules' -type d -exec rm -rf {} +",
"clean:www": "find . -name 'www' -type d -exec rm -rf {} +",
"create:component": "plop component --plopfile ./packages/generators/bolt-generator/plopfile.js",
"create:element": "plop element --plopfile ./packages/generators/bolt-generator/plopfile.js",
"clean:npm": "find . -name 'node_modules' -type d -exec rm -rf '{}' +",
"clean:www": "find . -name 'www' -type d -exec rm -rf '{}' +",
"create:component": "yarn run plop component --plopfile ${PROJECT_CWD}/packages/generators/bolt-generator/plopfile.js",
"create:element": "yarn run plop element --plopfile ${PROJECT_CWD}/packages/generators/bolt-generator/plopfile.js",
"deploy": "./scripts/deploy.js",
"fix": "yarn lint:js --fix; yarn lint:scss --fix",
"fix": "yarn run lint:js --fix; yarn run lint:scss --fix",
"gds": "github-deploy-status -u boltdesignsystem -p bolt --token ${GITHUB_TOKEN}",
"postinstall": "patch-package && npx lerna run postbootstrap",
"postinstall": "patch-package && yarn run lerna run postbootstrap",
"jest": "jest --maxWorkers=3 --all --colors",
"lint": "npm-run-all --parallel lint:*",
"lint": "yarn npm-run-all --parallel 'lint:*'",
"lint:js": "eslint '**/*.js'",
"lint:scss": "stylelint '**/*.scss' --config .stylelintrc",
"release": "node ./auto-release.js",
"serve": "node packages/servers/default-server",
"setup": "yarn && yarn run setup:php",
"release": "yarn node ./auto-release.js",
"serve": "yarn node packages/servers/default-server",
"setup": "yarn run setup:php",
"setup:full": "yarn --force && yarn run setup:php",
"setup:php": "npx lerna exec --parallel --scope @bolt/twig-renderer --scope @bolt/drupal-twig-extensions --scope @bolt/core-php --scope @bolt/website -- composer install --prefer-dist",
"setup:php": "yarn run lerna exec --parallel --scope @bolt/twig-renderer --scope @bolt/drupal-twig-extensions --scope @bolt/core-php --scope @bolt/website -- composer install --prefer-dist",
"setup:quick": "yarn && yarn run setup:php",
"start": "cd docs-site && yarn run start",
"start": "cd docs-site && yarn run bolt:start",
"start:compat": "cd docs-site && yarn run start:compat",
"test": "npm-run-all --parallel --aggregate-output test:js test:php test:monorepo test:build-tools",
"test": "yarn npm-run-all --parallel --aggregate-output 'test:js test:php test:monorepo test:build-tools'",
"test:build-tools": "cd packages/build-tools && yarn run test",
"pretest:js": "npm run setup:php",
"test:js": "NODE_ENV='test' jest --all --colors 'packages|scripts' --passWithNoTests ",
"test:js:quick": "NODE_ENV='test' jest --colors \"$(bolt-list-pkg-paths-changed)\" --passWithNoTests",
"pretest:js": "yarn run setup:php",
"test:js": "yarn pretest:js && NODE_ENV='test' yarn run jest --all --colors 'packages|scripts' --passWithNoTests ",
"test:js:quick": "NODE_ENV='test' yarn run jest --colors \"$(bolt-list-pkg-paths-changed)\" --passWithNoTests",
"test:js:update": "yarn run test:js -u",
"test:monorepo": "jest ./__tests__/monorepo -c jest.config.quick.js --noStackTrace",
"test:monorepo": "yarn run jest ./__tests__/monorepo -c jest.config.quick.js --noStackTrace",
"test:php": "cd packages/twig-integration/twig-extensions-shared && composer run test",
"test:pkgs": "npx lerna run test --ignore=@bolt/uikit-* --stream",
"test:pkgs": "yarn run lerna run test --ignore='@bolt/uikit-*' --stream",
"test:types": "tsc"
},
"husky": {
Expand Down Expand Up @@ -111,6 +106,8 @@
"ci-utils": "^0.6.0",
"conf": "^5.0.0",
"eslint": "^6.0.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.0",
"find-pkg": "^2.0.0",
"fs-extra": "^8.1.0",
Expand All @@ -123,7 +120,6 @@
"lint-staged": "^9.5.0",
"lit-element": "^2.2.0",
"lit-html": "^1.1.1",
"npm-run-all": "^4.1.5",
"patch-package": "^6.1.2",
"postcss": "^8.4.18",
"semver": "^7.1.1",
Expand All @@ -132,12 +128,21 @@
"typescript": "^3.5.3"
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"plop": "^3.1.1",
"stylelint": "^14.8.2"
},
"optionalDependencies": {
"prettier": ">= 1.13.0"
},
"publishConfig": {
"access": "public"
}
},
"installConfig": {
"hoistingLimits": [
"lazysizes",
"**/lazysizes"
]
},
"packageManager": "[email protected]"
}
3 changes: 2 additions & 1 deletion packages/build-tools/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const fs = require('fs');
const path = require('path');
const program = require('commander');
const cosmiconfig = require('cosmiconfig');
const { cosmiconfig } = require('cosmiconfig');
const explorer = cosmiconfig('bolt');
const configStore = require('@bolt/build-utils/config-store');
const log = require('@bolt/build-utils/log');
Expand All @@ -21,6 +21,7 @@ const parseIntWithRadix = string => parseInt(string, 10);

// global `bolt` cli options & meta
program
.name('bolt')
.version(packageJson.version)
.option(
'-C, --config-file <path>',
Expand Down
4 changes: 2 additions & 2 deletions packages/build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"check-links": "^1.1.8",
"cheerio": "^1.0.0-rc.3",
"chokidar": "^3.3.1",
"commander": "^2.20.0",
"commander": "^9.4.1",
"copy-webpack-plugin": "^11.0.0",
"cosmiconfig": "^5.2.1",
"cosmiconfig": "^8.0.0",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^4.2.2",
"deepmerge": "^4.2.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* stylelint-disable scss/at-function-pattern, scss/at-mixin-pattern */
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
"small",
"medium",
"large"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"sizes": {
"s": "5px",
"m": "10px",
"l": "15px"
},
"classNames": [
"small",
"medium",
"large"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"s": "5px",
"m": "10px",
"l": "15px"
}
6 changes: 3 additions & 3 deletions packages/build-tools/utils/config-store.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const chalk = require('chalk');
const path = require('path');
const cosmiconfig = require('cosmiconfig');
const { cosmiconfigSync } = require('cosmiconfig');
const argv = require('yargs').argv;
const explorer = cosmiconfig('bolt');
const explorerSync = cosmiconfigSync('bolt');
const address = require('address');

const { readYamlFileSync } = require('./yaml');
Expand Down Expand Up @@ -85,7 +85,7 @@ async function isReady() {
// 'Bolt config not yet setup -- trying to find a .boltconfig.rc file...',
// ),
// );
const searchedFor = explorer.searchSync();
const searchedFor = explorerSync.search();
if (searchedFor) {
if (searchedFor.config) {
await init({
Expand Down
2 changes: 1 addition & 1 deletion packages/build-tools/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"address": "^1.1.0",
"chalk": "^2.4.2",
"convert-hrtime": "^3.0.0",
"cosmiconfig": "^5.2.1",
"cosmiconfig": "^8.0.0",
"del": "^4.1.1",
"execa": "^1.0.0",
"globby": "^11.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/components/bolt-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"license": "MIT",
"author": "Salem Ghoweri",
"style": "index.scss",
"scripts": {},
"dependencies": {
"@bolt/core-v3.x": "^5.8.0"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/components/bolt-typeahead/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
"@bolt/elements-icon": "^5.8.0",
"@bolt/lazy-queue": "^5.0.0",
"fuse.js": "^3.4.5",
"html-react-parser": "^3.0.4",
"mousetrap": "^1.6.3",
"react": "^18.2.0",
"react-autosuggest": "^10.1.0",
"html-react-parser": "^3.0.4"
"react-autosuggest": "^10.1.0"
},
"optionalDependencies": {
"react": ">=0.14.7 || ^15.0.0 || ^16.0.0-0"
Expand Down
2 changes: 1 addition & 1 deletion packages/core-v3.x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"raf": "^3.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass-mq": "github:bolt-design-system/sass-mq#master",
"sass-mq": "github:boltdesignsystem/sass-mq#master",
"sassy-lists": "^3.0.1",
"sassy-maps": "github:at-import/Sassy-Maps#0.x.x",
"skatejs": "^5.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/servers/default-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
]
},
"scripts": {
"start": "node index.js"
"start": "yarn node index.js"
},
"dependencies": {
"@bolt/api": "^5.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/servers/testing-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"main": "index.js",
"scripts": {
"start": "node index.js"
"start": "yarn node index.js"
},
"dependencies": {
"@bolt/api": "^5.8.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/website-ui/uikit-workshop/.npmrc

This file was deleted.

6 changes: 3 additions & 3 deletions packages/website-ui/uikit-workshop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"build": "webpack-cli --config webpack.config.js --stats=minimal",
"prepublish": "npm run build",
"start": "node ./build-tools.js",
"start": "yarn node ./build-tools.js",
"watch": "webpack-cli --config webpack.config.js --progress --watch --stats=minimal"
},
"browserslist": [
Expand Down Expand Up @@ -52,7 +52,7 @@
"clean-webpack-plugin": "0.1.19",
"clipboard": "^2.0.4",
"copy-webpack-plugin": "^11.0.0",
"cosmiconfig": "^5.0.6",
"cosmiconfig": "^8.0.0",
"css-loader": "^6.7.1",
"ejs": "^3.0.1",
"express": "^4.17.1",
Expand All @@ -64,6 +64,7 @@
"hogan.js": "^3.0.2",
"htm": "^3.0.2",
"html-loader": "^0.5.5",
"html-react-parser": "^3.0.4",
"html-webpack-plugin": "^5.5.0",
"iframe-resizer": "^4.2.9",
"lit-element": "^2.2.1",
Expand All @@ -81,7 +82,6 @@
"pwa-helpers": "^0.9.1",
"react-autosuggest": "^9.4.3",
"react-dom": "^16.12.0",
"html-react-parser": "^3.0.4",
"react-popper-tooltip": "^2.10.1",
"redux": "4.0.5",
"redux-thunk": "^2.3.0",
Expand Down
Loading