File tree Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 1
- ## Change log
2
- ### Version: 4.3.1
3
- #### Date: October-22-2024
1
+ ### Version: 4.4.0
2
+ #### Date: October-21-2024
4
3
Enh: Node version bump
4
+ Refactor: Package type changed to be module instead of CommonJS
5
5
6
6
### Version: 4.3.0
7
7
#### Date: Septmber-09-2024
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.1 " ,
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