Skip to content

Commit

Permalink
feat: export sapphire package version (#181)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeroen Claassens <support@favware.tech>
  • Loading branch information
leonardssh and favna committed Mar 2, 2021
1 parent 2245a3d commit 6df4be0
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 20 deletions.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,25 @@
"build": "run-s build:tsc",
"build:cleanup": "node scripts/clean-dist.mjs",
"build:tsc": "tsc -b src",
"build:rollup": "rollup -c rollup.config.ts",
"build:rollup-bundle": "rollup -c scripts/rollup.bundle.ts",
"build:rollup-types": "rollup -c scripts/rollup.types.ts",
"build:clean-extraneous-types": "node scripts/clean-extraneous-types.mjs",
"clean": "tsc -b src --clean",
"clean": "yarn build:cleanup",
"watch": "tsc -b src -w",
"sversion": "standard-version",
"commit": "git-cz",
"cz": "git-cz",
"prepublishOnly": "run-s build:** && pinst --disable",
"postinstall": "husky install .github/husky",
"postpublish": "pinst --enable"
"prepublishOnly": "run-s build:**",
"prepare": "husky install .github/husky"
},
"dependencies": {
"@sapphire/discord-utilities": "^2.0.5",
"@sapphire/discord.js-utilities": "^1.5.0",
"@sapphire/pieces": "^1.2.2",
"@sapphire/ratelimits": "^1.1.5",
"@sapphire/utilities": "^1.4.5",
"lexure": "^0.17.0"
"lexure": "^0.17.0",
"tslib": "^2.1.0"
},
"peerDependencies": {
"discord.js": "12.x"
Expand All @@ -61,11 +62,11 @@
"jest-circus": "^26.6.3",
"lint-staged": "^10.5.4",
"npm-run-all": "^4.1.5",
"pinst": "^2.1.6",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"rollup": "^2.40.0",
"rollup-plugin-dts": "^2.0.1",
"rollup-plugin-version-injector": "^1.3.2",
"standard-version": "^9.1.1",
"ts-jest": "^26.5.2",
"ts-node": "^9.1.1",
Expand Down
12 changes: 12 additions & 0 deletions scripts/rollup.bundle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import versionInjector from 'rollup-plugin-version-injector';

export default {
input: 'dist/index.js',
output: [
{
file: './dist/index.js',
format: 'cjs'
}
],
plugins: [versionInjector()]
};
File renamed without changes.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ export * from './lib/utils/preconditions/containers/PermissionsPrecondition';
export * from './lib/utils/preconditions/IPreconditionContainer';
export * from './lib/utils/preconditions/PreconditionContainerArray';
export * from './lib/utils/preconditions/PreconditionContainerSingle';

export const version = '[VI]{version}[/VI]';
6 changes: 5 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "@sapphire/ts-config"
"extends": "@sapphire/ts-config",
"compilerOptions": {
"importHelpers": true,
"noEmitHelpers": true
}
}
31 changes: 19 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,11 @@ dateformat@^3.0.0:
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==

dateformat@^4.2.1:
version "4.5.1"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.5.1.tgz#c20e7a9ca77d147906b6dc2261a8be0a5bd2173c"
integrity sha512-OD0TZ+B7yP7ZgpJf5K2DIbj3FZvFvxgFUuaqA/V5zTjAtAAXZ1E8bktHxmAGs4x5b7PflqA9LeQ84Og7wYtF7Q==

debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
Expand Down Expand Up @@ -2639,11 +2644,6 @@ fragment-cache@^0.2.1:
dependencies:
map-cache "^0.2.2"

fromentries@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a"
integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==

fs-access@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a"
Expand Down Expand Up @@ -4844,13 +4844,6 @@ pinkie@^2.0.0:
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=

pinst@^2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/pinst/-/pinst-2.1.6.tgz#8d968b8ec1dac5dddcfc976c735592dbec58b42c"
integrity sha512-B4dYmf6nEXg1NpDSB+orYWvKa5Kfmz5KzWC29U59dpVM4S/+xp0ak/JMEsw04UQTNNKps7klu0BUalr343Gt9g==
dependencies:
fromentries "^1.3.2"

pirates@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87"
Expand Down Expand Up @@ -5262,6 +5255,15 @@ rollup-plugin-dts@^2.0.1:
optionalDependencies:
"@babel/code-frame" "^7.10.4"

rollup-plugin-version-injector@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/rollup-plugin-version-injector/-/rollup-plugin-version-injector-1.3.2.tgz#c6b3c54c6dfe0a07d72c189ec6aae842869f7b23"
integrity sha512-xdWLp5xUPSHPWV+4xeohaFqE0od7uQdV314JSlKEdTrYnffMA65AnGw5uQ5W7Lp6YHBGqOfnZY49n4/XMdS2lg==
dependencies:
chalk "^4.1.0"
dateformat "^4.2.1"
lodash "^4.17.20"

rollup@^2.40.0:
version "2.40.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.40.0.tgz#efc218eaede7ab590954df50f96195188999c304"
Expand Down Expand Up @@ -5994,6 +5996,11 @@ tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==

tsutils@^3.17.1:
version "3.20.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.20.0.tgz#ea03ea45462e146b53d70ce0893de453ff24f698"
Expand Down

0 comments on commit 6df4be0

Please sign in to comment.