Skip to content

Commit

Permalink
Fixes libui release
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Jan 15, 2020
1 parent c2d1633 commit 6ffb3c4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ package.tgz
# Those folders are meant to contain the prepack build artifacts; we don't commit them
/packages/*/lib/*

# Those packages are built inline and the JS files must not be checked-in
/packages/yarnpkg-libui/sources/**/*.js

# We check-in the PnP hook because it would be heavy to regenerate it before each bundle build
!/packages/yarnpkg-pnp/lib/hook.js
6 changes: 6 additions & 0 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,22 @@ gen_enforced_field(WorkspaceCwd, 'scripts.update-local', '<any value>') :-
% Only if they don't have a script set
\+ workspace_field(WorkspaceCwd, 'scripts.update-local', _).

inline_compile('@yarnpkg/libui').

gen_enforced_field(WorkspaceCwd, 'scripts.prepack', 'run build:compile "$(pwd)"') :-
workspace(WorkspaceCwd),
% This package is built using Webpack, so we allow it to configure its build scripts itself
\+ workspace_ident(WorkspaceCwd, '@yarnpkg/pnp'),
% Those packages use a different build
\+ (workspace_ident(WorkspaceCwd, WorkspaceIdent), inline_compile(WorkspaceIdent)),
% Private packages aren't covered
\+ workspace_field_test(WorkspaceCwd, 'private', 'true').

gen_enforced_field(WorkspaceCwd, 'scripts.postpack', 'rm -rf lib') :-
workspace(WorkspaceCwd),
% This package is built using Webpack, so we allow it to configure its build scripts itself
\+ workspace_ident(WorkspaceCwd, '@yarnpkg/pnp'),
% Those packages use a different build
\+ (workspace_ident(WorkspaceCwd, WorkspaceIdent), inline_compile(WorkspaceIdent)),
% Private packages aren't covered
\+ workspace_field_test(WorkspaceCwd, 'private', 'true').
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
},
"scripts": {
"build:compile": "rm -rf \"$0\"/lib && mkdir -p \"$0\"/lib && babel \"$0\"/sources --out-dir \"$0\"/lib --copy-files --extensions .js,.ts,.tsx",
"build:compile-inline": "find \"$0\"/sources -name '*.js' && babel \"$0\"/sources --out-dir \"$0\"/sources --extensions .ts,.tsx",
"gen-tssdk": "pnpify --sdk scripts",
"release:all": "./scripts/release.sh",
"test:lint": "eslint \"packages/**/@(sources|tests)/**/!(libzip).@(tsx|ts|js)\"",
Expand Down
9 changes: 6 additions & 3 deletions packages/yarnpkg-libui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@yarnpkg/libui",
"version": "2.0.0-rc.4",
"private": true,
"version": "2.0.0-rc.6",
"sideEffects": false,
"peerDependencies": {
"ink": "^2.3.0",
Expand All @@ -17,6 +16,10 @@
"url": "ssh://[email protected]/yarnpkg/berry.git"
},
"dependencies": {
"redux": "npm:^4.0.0"
"redux": "^4.0.0"
},
"scripts": {
"postpack": "find sources -name '*.js' -delete",
"prepack": "yarn build:compile-inline \"$(pwd)\""
}
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4829,7 +4829,7 @@ __metadata:
"@types/react": ^16.8.0
ink: ^2.3.0
react: ^16.8.4
redux: "npm:^4.0.0"
redux: ^4.0.0
peerDependencies:
ink: ^2.3.0
react: ^16.8.4
Expand Down

0 comments on commit 6ffb3c4

Please sign in to comment.