-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build update for common, encryption and storage packages
- Loading branch information
Showing
26 changed files
with
322 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,6 @@ | |
"author": "yknl <[email protected]>", | ||
"homepage": "https://blockstack.org", | ||
"license": "GPL-3.0-or-later", | ||
"main": "./dist/index.js", | ||
"umd:main": "./dist/common.umd.production.js", | ||
"module": "./dist/common.esm.js", | ||
"directories": { | ||
"lib": "lib", | ||
"dist": "dist", | ||
|
@@ -24,12 +21,17 @@ | |
"url": "git+https://github.com/blockstack/blockstack.js.git" | ||
}, | ||
"scripts": { | ||
"build": "cross-env NODE_ENV=production tsdx build --format=cjs,esm,umd", | ||
"build-all": "run-p build:*", | ||
"build:cjs": "tsc --outDir ./lib -m commonjs -t es2017", | ||
"build:esm": "tsc --outDir ./lib-esm -m es6 -t es2017", | ||
"build:cjs:watch": "tsc --outDir ./lib -m commonjs -t es2017 --watch", | ||
"build:esm:watch": "tsc --outDir ./lib-esm -m es6 -t es2017 --watch", | ||
"dev": "yarn start", | ||
"lint": "yarn lint:eslint && yarn lint:prettier", | ||
"lint:eslint": "eslint \"src/**/*.{ts,tsx}\" -f unix", | ||
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" -f unix --fix", | ||
"lint:prettier": "prettier --check \"src/**/*.{ts,tsx}\" *.js", | ||
"lint:prettier:fix": "prettier --write \"src/**/*.{ts,tsx}\" *.js", | ||
"start": "tsdx watch --verbose --noClean --onSuccess yalc publish --push", | ||
"build": "tsdx build --format cjs,esm,umd", | ||
"typecheck": "tsc --noEmit", | ||
"typecheck:watch": "npm run typecheck -- --watch", | ||
"prepublishOnly": "yarn build", | ||
"test": "jest", | ||
"test:watch": "jest --watch --coverage=false", | ||
"codecovUpload": "codecov" | ||
|
@@ -40,12 +42,18 @@ | |
"dependencies": { | ||
"bitcoinjs-lib": "^5.1.10", | ||
"codecov": "^3.7.2", | ||
"cross-fetch": "^3.0.5", | ||
"tsdx": "^0.13.3" | ||
"cross-fetch": "^3.0.5" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "24.9.0", | ||
"jest": "^24.9.0", | ||
"jest-fetch-mock": "^3.0.3" | ||
} | ||
"jest-fetch-mock": "^3.0.3", | ||
"tsdx": "^0.14.0" | ||
}, | ||
"sideEffects": false, | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"typings": "dist/auth/src/index.d.ts", | ||
"umd:main": "dist/auth.umd.production.js", | ||
"unpkg": "dist/auth.cjs.production.min.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": [ | ||
"./src/**/*", | ||
"./tests/**/*" | ||
] | ||
} | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"lib": ["dom", "esnext"], | ||
"jsx": "react", | ||
"importHelpers": true, | ||
"declaration": true, | ||
"sourceMap": true, | ||
"moduleResolution": "node", | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"pretty": true, | ||
"removeComments": true, | ||
"noImplicitAny": true, | ||
"strictFunctionTypes": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
"stripInternal": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"emitDecoratorMetadata": false, | ||
"noEmit": false, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"suppressImplicitAnyIndexErrors": false, | ||
"outDir": "./dist", | ||
"baseUrl": "./src", | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"strictNullChecks": true, | ||
"paths": { | ||
"@stacks/auth": ["../../auth/src"], | ||
"@stacks/cli": ["../../cli/src"], | ||
"@stacks/common": ["../../common/src"], | ||
"@stacks/encryption": ["../../encryption/src"], | ||
"@stacks/keychain": ["../../keychain/src"], | ||
"@stacks/network": ["../../network/src"], | ||
"@stacks/profile": ["../../profile/src"], | ||
"@stacks/storage": ["../../storage/src"], | ||
"@stacks/transactions": ["../../transactions/src"] | ||
} | ||
}, | ||
"include": ["src/**/*", "tests/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
rollup(config, options) { | ||
if (options.format === 'esm') { | ||
config.output = { | ||
...config.output, | ||
dir: 'dist/', | ||
entryFileNames: '[name].esm.js', | ||
preserveModules: true, | ||
preserveModulesRoot: 'src', | ||
}; | ||
delete config.output.file; | ||
} | ||
return config; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,6 @@ | |
"author": "yknl <[email protected]>", | ||
"homepage": "https://blockstack.org", | ||
"license": "GPL-3.0-or-later", | ||
"main": "./dist/index.js", | ||
"umd:main": "./dist/common.umd.production.js", | ||
"module": "./dist/common.esm.js", | ||
"directories": { | ||
"lib": "lib", | ||
"dist": "dist", | ||
|
@@ -21,12 +18,17 @@ | |
"url": "git+https://github.com/blockstack/blockstack.js.git" | ||
}, | ||
"scripts": { | ||
"build": "cross-env NODE_ENV=production tsdx build --format=cjs,esm,umd", | ||
"build-all": "run-p build:*", | ||
"build:cjs": "tsc --outDir ./lib -m commonjs -t es2017", | ||
"build:esm": "tsc --outDir ./lib-esm -m es6 -t es2017", | ||
"build:cjs:watch": "tsc --outDir ./lib -m commonjs -t es2017 --watch", | ||
"build:esm:watch": "tsc --outDir ./lib-esm -m es6 -t es2017 --watch", | ||
"dev": "yarn start", | ||
"lint": "yarn lint:eslint && yarn lint:prettier", | ||
"lint:eslint": "eslint \"src/**/*.{ts,tsx}\" -f unix", | ||
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" -f unix --fix", | ||
"lint:prettier": "prettier --check \"src/**/*.{ts,tsx}\" *.js", | ||
"lint:prettier:fix": "prettier --write \"src/**/*.{ts,tsx}\" *.js", | ||
"start": "tsdx watch --verbose --noClean --onSuccess yalc publish --push", | ||
"build": "tsdx build --format cjs,esm,umd", | ||
"typecheck": "tsc --noEmit", | ||
"typecheck:watch": "npm run typecheck -- --watch", | ||
"prepublishOnly": "yarn build", | ||
"test": "jest", | ||
"test:watch": "jest --watch --coverage=false", | ||
"codecovUpload": "codecov" | ||
|
@@ -43,12 +45,18 @@ | |
"elliptic": "^6.5.2", | ||
"randombytes": "^2.1.0", | ||
"ripemd160-min": "^0.0.6", | ||
"sha.js": "^2.4.11", | ||
"tsdx": "^0.13.3" | ||
"sha.js": "^2.4.11" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "24.9.0", | ||
"jest": "^24.9.0", | ||
"jest-fetch-mock": "^3.0.3" | ||
} | ||
"jest-fetch-mock": "^3.0.3", | ||
"tsdx": "^0.14.0" | ||
}, | ||
"sideEffects": false, | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"typings": "dist/auth/src/index.d.ts", | ||
"umd:main": "dist/auth.umd.production.js", | ||
"unpkg": "dist/auth.cjs.production.min.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": [ | ||
"./src/**/*", | ||
"./tests/**/*" | ||
] | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"lib": ["dom", "esnext"], | ||
"jsx": "react", | ||
"importHelpers": true, | ||
"declaration": true, | ||
"sourceMap": true, | ||
"moduleResolution": "node", | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"pretty": true, | ||
"removeComments": true, | ||
"noImplicitAny": true, | ||
"strictFunctionTypes": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
"stripInternal": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"emitDecoratorMetadata": false, | ||
"noEmit": false, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"suppressImplicitAnyIndexErrors": false, | ||
"outDir": "./dist", | ||
"baseUrl": "./src", | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"strictNullChecks": true, | ||
"paths": { | ||
"@stacks/auth": ["../../auth/src"], | ||
"@stacks/cli": ["../../cli/src"], | ||
"@stacks/common": ["../../common/src"], | ||
"@stacks/encryption": ["../../encryption/src"], | ||
"@stacks/keychain": ["../../keychain/src"], | ||
"@stacks/network": ["../../network/src"], | ||
"@stacks/profile": ["../../profile/src"], | ||
"@stacks/storage": ["../../storage/src"], | ||
"@stacks/transactions": ["../../transactions/src"] | ||
} | ||
}, | ||
"include": ["src/**/*", "tests/**/*"] | ||
} |
Oops, something went wrong.