Skip to content

Commit

Permalink
Merge pull request #68 from 10up/develop
Browse files Browse the repository at this point in the history
10up-toolkit@1.0.6
  • Loading branch information
nicholasio authored May 27, 2021
2 parents 227bf0e + f3069b0 commit f7febcd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 76 deletions.
3 changes: 3 additions & 0 deletions packages/toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file, per [the Keep a Changelog standard](http://keepachangelog.com/).

## 1.0.6
- Fixed: webpack externals definitions [#67](https://github.com/10up/10up-toolkit/pull/67)

## 1.0.5
- Fixed: Regex in asset/resources. [#63](https://github.com/10up/10up-toolkit/pull/63)
- Fixed: Babel transpilation for publishing packages `["sourceType": "unambiguous"]`. [#63](https://github.com/10up/10up-toolkit/pull/63)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,10 @@ Object {
},
},
"externals": Object {
"lodash": Object {
"amd": "lodash",
"commonjs": "lodash",
"commonjs2": "lodash",
},
"read-pkg": Object {
"amd": "read-pkg",
"commonjs": "read-pkg",
"commonjs2": "read-pkg",
},
"read-pkg-up": Object {
"amd": "read-pkg-up",
"commonjs": "read-pkg-up",
"commonjs2": "read-pkg-up",
},
"resolve-bin": Object {
"amd": "resolve-bin",
"commonjs": "resolve-bin",
"commonjs2": "resolve-bin",
},
"lodash": "commonjs2 lodash",
"read-pkg": "commonjs2 read-pkg",
"read-pkg-up": "commonjs2 read-pkg-up",
"resolve-bin": "commonjs2 resolve-bin",
},
"mode": "development",
"module": Object {
Expand Down Expand Up @@ -376,21 +360,9 @@ Object {
},
},
"externals": Object {
"read-pkg": Object {
"amd": "read-pkg",
"commonjs": "read-pkg",
"commonjs2": "read-pkg",
},
"read-pkg-up": Object {
"amd": "read-pkg-up",
"commonjs": "read-pkg-up",
"commonjs2": "read-pkg-up",
},
"resolve-bin": Object {
"amd": "resolve-bin",
"commonjs": "resolve-bin",
"commonjs2": "resolve-bin",
},
"read-pkg": "commonjs2 read-pkg",
"read-pkg-up": "commonjs2 read-pkg-up",
"resolve-bin": "commonjs2 resolve-bin",
},
"mode": "development",
"module": Object {
Expand Down Expand Up @@ -576,21 +548,9 @@ Object {
},
},
"externals": Object {
"read-pkg": Object {
"amd": "read-pkg",
"commonjs": "read-pkg",
"commonjs2": "read-pkg",
},
"read-pkg-up": Object {
"amd": "read-pkg-up",
"commonjs": "read-pkg-up",
"commonjs2": "read-pkg-up",
},
"resolve-bin": Object {
"amd": "resolve-bin",
"commonjs": "resolve-bin",
"commonjs2": "resolve-bin",
},
"read-pkg": "commonjs2 read-pkg",
"read-pkg-up": "commonjs2 read-pkg-up",
"resolve-bin": "commonjs2 resolve-bin",
},
"mode": "development",
"module": Object {
Expand Down Expand Up @@ -784,26 +744,10 @@ Object {
},
},
"externals": Object {
"lodash": Object {
"amd": "lodash",
"commonjs": "lodash",
"commonjs2": "lodash",
},
"read-pkg": Object {
"amd": "read-pkg",
"commonjs": "read-pkg",
"commonjs2": "read-pkg",
},
"read-pkg-up": Object {
"amd": "read-pkg-up",
"commonjs": "read-pkg-up",
"commonjs2": "read-pkg-up",
},
"resolve-bin": Object {
"amd": "resolve-bin",
"commonjs": "resolve-bin",
"commonjs2": "resolve-bin",
},
"lodash": "commonjs2 lodash",
"read-pkg": "commonjs2 read-pkg",
"read-pkg-up": "commonjs2 read-pkg-up",
"resolve-bin": "commonjs2 resolve-bin",
},
"mode": "development",
"module": Object {
Expand Down
9 changes: 7 additions & 2 deletions packages/toolkit/config/webpack/externals.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
module.exports = ({ isPackage, packageConfig: { externals } }) => {
module.exports = ({ isPackage, packageConfig: { externals, packageType } }) => {
if (isPackage) {
return externals.reduce((acc, current) => {
acc[current] = { commonjs: current, commonjs2: current, amd: current };
if (packageType === 'umd') {
acc[current] = { commonjs: current, commonjs2: current, amd: current };
} else {
acc[current] = `commonjs2 ${current}`;
}

return acc;
}, {});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"url": "git+https://github.com/10up/10up-toolkit.git",
"directory": "packages/toolkit"
},
"version": "1.0.5",
"version": "1.0.6",
"bin": {
"10up-toolkit": "bin/10up-toolkit.js"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/10up-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"node": ">=12.0.0"
},
"devDependencies": {
"10up-toolkit": "1.0.5"
"10up-toolkit": "1.0.6"
},
"dependencies": {
"normalize.css": "^8.0.1",
Expand Down
2 changes: 1 addition & 1 deletion projects/library-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/10up/component-accordion#readme",
"devDependencies": {
"10up-toolkit": "1.0.5"
"10up-toolkit": "1.0.6"
},
"10up-toolkit": {
"libraryName": "TenUpAccordion"
Expand Down
2 changes: 1 addition & 1 deletion projects/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/user-event": "^12.6.3",
"jest-axe": "^4.1.0",
"10up-toolkit": "1.0.5",
"10up-toolkit": "1.0.6",
"concurrently": "^5.3.0"
},
"10up-toolkit": {
Expand Down

0 comments on commit f7febcd

Please sign in to comment.