-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ESM build to SDK packages. (#1027)
* added ESM build to base packages.
- Loading branch information
Showing
85 changed files
with
1,458 additions
and
297 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
'@moralisweb3/common-streams-utils': patch | ||
'@moralisweb3/common-aptos-utils': patch | ||
'@moralisweb3/common-auth-utils': patch | ||
'@moralisweb3/common-evm-utils': patch | ||
'@moralisweb3/common-sol-utils': patch | ||
'@moralisweb3/common-core': patch | ||
'@moralisweb3/api-utils': patch | ||
'@moralisweb3/evm-utils': patch | ||
'@moralisweb3/sol-utils': patch | ||
'@moralisweb3/streams': patch | ||
'@moralisweb3/evm-api': patch | ||
'@moralisweb3/sol-api': patch | ||
'@moralisweb3/auth': patch | ||
'@moralisweb3/moralis': patch | ||
--- | ||
|
||
Added ESM build. |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const Moralis = require('moralis').default; | ||
|
||
Moralis.start({ | ||
apiKey: 'REPLACE_ME', | ||
}); | ||
|
||
console.log(typeof Moralis.Auth); | ||
console.log(typeof Moralis.Core); | ||
console.log(typeof Moralis.EvmApi); | ||
console.log(typeof Moralis.EvmUtils); | ||
console.log(typeof Moralis.SolApi); | ||
console.log(typeof Moralis.SolUtils); | ||
console.log(typeof Moralis.start); | ||
|
||
console.log('Done! 🦋'); |
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,12 @@ | ||
{ | ||
"name": "demo-cli-common-js", | ||
"author": "Moralis", | ||
"private": true, | ||
"version": "1.0.0", | ||
"scripts": { | ||
"start": "node index.js" | ||
}, | ||
"dependencies": { | ||
"moralis": "^2.14.3" | ||
} | ||
} |
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 @@ | ||
import Moralis from 'moralis'; | ||
|
||
Moralis.start({ | ||
apiKey: 'REPLACE_ME', | ||
}); | ||
|
||
console.log(typeof Moralis.Auth); | ||
console.log(typeof Moralis.Core); | ||
console.log(typeof Moralis.EvmApi); | ||
console.log(typeof Moralis.EvmUtils); | ||
console.log(typeof Moralis.SolApi); | ||
console.log(typeof Moralis.SolUtils); | ||
console.log(typeof Moralis.start); | ||
|
||
console.log('Done! 🐝'); |
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,13 @@ | ||
{ | ||
"name": "demo-cli-esm-js", | ||
"author": "Moralis", | ||
"private": true, | ||
"version": "1.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"start": "node index.js" | ||
}, | ||
"dependencies": { | ||
"moralis": "^2.14.3" | ||
} | ||
} |
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
File renamed without changes.
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 was deleted.
Oops, something went wrong.
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,46 @@ | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import cleaner from 'rollup-plugin-cleaner'; | ||
import dts from 'rollup-plugin-dts'; | ||
import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import fs from 'fs'; | ||
|
||
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8')); | ||
const external = Object.keys(packageJson.dependencies); | ||
|
||
export default [ | ||
{ | ||
input: './src/index.ts', | ||
plugins: [ | ||
cleaner({ | ||
targets: ['./lib'], | ||
}), | ||
typescript({ | ||
useTsconfigDeclarationDir: true, | ||
}), | ||
nodeResolve(), | ||
], | ||
cache: false, | ||
external, | ||
output: [ | ||
{ | ||
file: './lib/cjs/index.cjs', | ||
format: 'cjs', | ||
exports: 'named', | ||
}, | ||
{ | ||
file: './lib/esm/index.js', | ||
format: 'esm', | ||
}, | ||
], | ||
}, | ||
{ | ||
input: './build/index.d.ts', | ||
output: [ | ||
{ | ||
file: './lib/index.d.ts', | ||
format: 'es', | ||
}, | ||
], | ||
plugins: [dts()], | ||
}, | ||
]; |
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
File renamed without changes.
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 was deleted.
Oops, something went wrong.
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,46 @@ | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import cleaner from 'rollup-plugin-cleaner'; | ||
import dts from 'rollup-plugin-dts'; | ||
import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import fs from 'fs'; | ||
|
||
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8')); | ||
const external = Object.keys(packageJson.dependencies); | ||
|
||
export default [ | ||
{ | ||
input: './src/index.ts', | ||
plugins: [ | ||
cleaner({ | ||
targets: ['./lib'], | ||
}), | ||
typescript({ | ||
useTsconfigDeclarationDir: true, | ||
}), | ||
nodeResolve(), | ||
], | ||
cache: false, | ||
external, | ||
output: [ | ||
{ | ||
file: './lib/cjs/index.cjs', | ||
format: 'cjs', | ||
exports: 'named', | ||
}, | ||
{ | ||
file: './lib/esm/index.js', | ||
format: 'esm', | ||
}, | ||
], | ||
}, | ||
{ | ||
input: './build/index.d.ts', | ||
output: [ | ||
{ | ||
file: './lib/index.d.ts', | ||
format: 'es', | ||
}, | ||
], | ||
plugins: [dts()], | ||
}, | ||
]; |
This file was deleted.
Oops, something went wrong.
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,5 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.package.json", | ||
"compilerOptions": {}, | ||
"include": ["src/**/*", "types/**/*", "integration/**/*"] | ||
"compilerOptions": { | ||
"outDir": "./build", | ||
"declarationDir": "./build", | ||
"rootDir": "./src" | ||
}, | ||
"include": ["src/**/*", "types/**/*"] | ||
} |
File renamed without changes.
Oops, something went wrong.
521534f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test coverage