Skip to content

Monorepo Updates: Yarn, Lerna Fixed, Node v12, etc #1071

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

Merged
merged 8 commits into from
Oct 22, 2019
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ packages/*/public
!packages/core/test/patterns/testDependencyGraph.json
lerna-debug.log
packages/edition-node-gulp/dependencyGraph.json
packages/uikit-workshop/dist
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.0
12.9.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a small nit for next time - so we're on the same page - i like to adhere to the guidance that production apps should use ACTIVE, not CURRENT according to this schedule. In this case, we are talking a few days, but it's wanted to bring attention to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally fair — happy to bump to down to 11.x (but yep, 9 days to go till LTS!).

LMK if you think we should change this before merging down.

22 changes: 12 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ addons:
chrome: stable

before_install:
- phantomjs --version
# version lifted from `.nvmrc`
- nvm install
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.19.0
- export PATH="$HOME/.yarn/bin:$PATH"

before_script:
- npm install -g lerna@3.2.1
- npm run setup
- lerna add @pattern-lab/engine-mustache --scope=@pattern-lab/core
- lerna add @pattern-lab/engine-handlebars --scope=@pattern-lab/core
- lerna add @pattern-lab/engine-underscore --scope=@pattern-lab/core
- lerna add @pattern-lab/engine-liquid --scope=@pattern-lab/core
- lerna add @pattern-lab/engine-twig --scope=@pattern-lab/core
- lerna add @pattern-lab/engine-react --scope=@pattern-lab/core
- yarn run setup
- npx lerna add @pattern-lab/engine-mustache --scope=@pattern-lab/core
- npx lerna add @pattern-lab/engine-handlebars --scope=@pattern-lab/core
- npx lerna add @pattern-lab/engine-underscore --scope=@pattern-lab/core
- npx lerna add @pattern-lab/engine-liquid --scope=@pattern-lab/core
- npx lerna add @pattern-lab/engine-twig --scope=@pattern-lab/core
- npx lerna add @pattern-lab/engine-react --scope=@pattern-lab/core

script: travis_wait npm run test
script: travis_wait yarn run test

branches:
only:
Expand Down
37 changes: 22 additions & 15 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
{
"lerna": "3.11.0",
"version": "0.0.0",
"packages": [
"packages/*"
],
"version": "independent",
"command": {
"init": {
"exact": true
},
"bootstrap": {
"hoist": [
"tap",
"eslin*",
"husky",
"prettier",
"pretty-quick",
"babel-eslint"
]
},
"publish": {
"allowBranch": [
"dev",
"master"
]
"master",
"dev"
],
"conventionalCommits": true,
"gitReset": true,
"includeMergedTags": true,
"noCommitHooks": true,
"verifyAccess": true
},
"changed": {
"includeMergedTags": true
}
},
"ignoreChanges": [
"**/__fixtures__/**",
"**/__tests__/**",
"**/*.md",
"**/__snapshots__/**"
],
"npmClient": "yarn",
"npmClientArgs": [
"--ignore-optional",
"--registry=https://registry.npmjs.org/"
]
],
"useWorkspaces": true
}
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"@pattern-lab/engine-*",
"**/@pattern-lab/engine-*",
"**/@pattern-lab/uikit-workshop"
]
},
"dependencies": {
"@babel/plugin-proposal-decorators": "^7.4.4",
"@babel/plugin-syntax-jsx": "^7.2.0",
Expand All @@ -8,8 +18,8 @@
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.0",
"lerna": "3.11.0",
"prettier": "^1.14.3",
"lerna": "3.17.0",
"pretty-quick": "^1.11.1",
"auto": "^7.8.0"
},
Expand All @@ -19,9 +29,8 @@
},
"private": true,
"scripts": {
"postinstall": "npm run bootstrap",
"bootstrap": "lerna bootstrap",
"setup": "npm install && npm run build:uikit",
"postinstall": "lerna run postbootstrap",
"setup": "yarn",
"build:uikit": "cd packages/uikit-workshop && npm run build",
"precommit": "pretty-quick --staged",
"lint:fix": "npm run lint -- --fix",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/lib/plugin_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ const plugin_manager = function() {
foundPlugins.forEach(plugin => {
logger.info(`Found plugin: ${plugin}`);
logger.info(`Attempting to load and initialize plugin.`);
const pluginModule = loadPlugin(
path.join(process.cwd(), 'node_modules', plugin)
);
const pluginModule = loadPlugin(plugin);
pluginModule(patternlab);
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-nunjucks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "The nunjucks PatternEngine for Pattern Lab / Node",
"dependencies": {
"fs-extra": "7.0.0",
"nunjucks": "3.1.3"
"nunjucks": "^3.2.0"
},
"engines": {
"node": ">=10.0"
Expand Down
1 change: 1 addition & 0 deletions packages/uikit-workshop/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ src/bower_components/*
.sass-cache/*
.DS_Store
/.eslintignore
dist
6 changes: 0 additions & 6 deletions packages/uikit-workshop/dist/index.html

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 2 additions & 0 deletions packages/uikit-workshop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"description": "Front-end assets and templates for the default Pattern Lab workshop view",
"main": "gulpfile.js",
"scripts": {
"prepublish": "npm run build",
"postbootstrap": "npm run build",
"build": "webpack-cli --config webpack.config.js --progress --bail --display=minimal",
"watch": "webpack-cli --config webpack.config.js --progress --watch --display=minimal",
"test": "npm run build"
Expand Down
Loading