File tree Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
1
## Change log
2
2
3
+ ### Version: 4.3.0
4
+ #### Date: October-14-2024
5
+ Refactor: Package type changed to be module instead of CommonJS
6
+
3
7
### Version: 4.3.0
4
8
#### Date: Septmber-09-2024
5
9
Feat: Include refernce accepts array of values
Original file line number Diff line number Diff line change 1
- const path = require ( 'path' ) ;
1
+ import path , { dirname } from 'path' ;
2
+ import { fileURLToPath } from 'url' ;
2
3
3
- module . exports = {
4
+ // Replicating __dirname in ES modules
5
+ const __filename = fileURLToPath ( import . meta. url ) ;
6
+ const __dirname = dirname ( __filename ) ;
7
+
8
+ export default {
4
9
mode : 'production' ,
5
10
entry : './src/index.ts' ,
6
11
output : {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @contentstack/delivery-sdk" ,
3
- "version" : " 4.3 .0" ,
4
- "type" : " commonjs " ,
3
+ "version" : " 4.4 .0" ,
4
+ "type" : " module " ,
5
5
"main" : " ./dist/cjs/src/index.js" ,
6
6
"types" : " ./dist/types/src/index.d.ts" ,
7
7
"scripts" : {
Original file line number Diff line number Diff line change 1
- const fs = require ( 'fs' ) ;
2
- const path = require ( 'path' ) ;
1
+ import fs from 'fs' ;
2
+ import { fileURLToPath } from 'url' ;
3
+ import path , { dirname } from 'path' ;
4
+
5
+ const __filename = fileURLToPath ( import . meta. url ) ;
6
+ const __dirname = dirname ( __filename ) ;
3
7
4
8
// To remove the relative path
5
9
function sanitizePath ( str ) {
You can’t perform that action at this time.
0 commit comments