Skip to content

Commit

Permalink
updates for buffer undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Emslie committed Sep 16, 2021
1 parent 74ed9ef commit 6ce9293
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"author": "Gareth Emslie",
"license": "MIT",
"dependencies": {
"Buffer": "0.0.0",
"azure-devops-extension-api": "^1.158.0",
"azure-devops-extension-sdk": "^2.0.11",
"csvtojson": "^2.0.10",
Expand Down
9 changes: 7 additions & 2 deletions src/import-csv-discussions-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,15 @@ class ImportCSVDiscussionsAction implements IContributedMenuSource {
this._logger.info(`Ended Import.`);
});
}
else
{
alert("Unable to parse CSV file contents.")
this._logger.error("Unable to parse CSV file contents.");
}
}
else {
alert("Error : CSV File is Empty.")
this._logger.error("Error : CSV File is Empty.");
alert("CSV File is Empty.")
this._logger.error("CSV File is Empty.");
}
}
};
Expand Down
6 changes: 6 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ module.exports = {
},
resolve: {
extensions: [ '.html', '.ts', '.js' ],
fallback: {
"buffer": require.resolve("buffer/")
}
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
})
]
};

0 comments on commit 6ce9293

Please sign in to comment.