Skip to content

Commit

Permalink
Merge pull request reef-pi#2295 from reef-pi/csv_parse
Browse files Browse the repository at this point in the history
(chore)fix csv-parse import issues
  • Loading branch information
ranjib authored Jan 30, 2025
2 parents 7dae205 + bc07cc8 commit 7f76681
Show file tree
Hide file tree
Showing 4 changed files with 819 additions and 854 deletions.
2 changes: 1 addition & 1 deletion build/translations/csv-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const PATH_CSV = './front-end/assets/translations/'
const referenceFile = 'en.csv'
const files = fs.readdirSync(PATH_CSV).filter(f => f !== referenceFile)
const {stringify} = require('csv-stringify')
const parse = require('csv-parse/lib/sync')
const {parse} = require('csv-parse/sync')

function aggregateRecords(records) {
const common = records.filter(r => {
Expand Down
2 changes: 1 addition & 1 deletion build/translations/loader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { genTsObj } = require('./csv-json')
const parse = require('csv-parse/lib/sync')
const {parse} = require('csv-parse/sync')

exports.default = function(source) {
const records = parse(source, {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"clean-webpack-plugin": "4.0.0",
"cross-env": "7.0.2",
"css-loader": "6.8.1",
"csv-parse": "^4.15.4",
"csv-stringify": "6.4.4",
"csv-parse": "^5.6.0",
"csv-stringify": "6.5.2",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7",
"eslint": "8.48.0",
Expand All @@ -32,8 +32,9 @@
"humanize-duration": "^3.31.0",
"i18next": "22.0.6",
"i18next-browser-languagedetector": "8.0.0",
"jest": "27.4.5",
"jest": "29.7.0",
"jest-date-mock": "1.0.8",
"jest-environment-jsdom": "^29.7.0",
"jquery": "^3.6.1",
"json-loader": "0.5.7",
"lodash.debounce": "4.0.8",
Expand Down
Loading

0 comments on commit 7f76681

Please sign in to comment.