Skip to content

Commit

Permalink
Merge pull request #232 from 18alantom/bump-versions
Browse files Browse the repository at this point in the history
build(deps): bump versions of all except vue
  • Loading branch information
18alantom authored Nov 5, 2021
2 parents b77f553 + 1a8a23d commit c6c89c2
Show file tree
Hide file tree
Showing 138 changed files with 3,320 additions and 2,661 deletions.
9 changes: 6 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ module.exports = {
env: {
node: true
},
extends: ["plugin:vue/essential", "@vue/prettier"],
extends: ["plugin:vue/essential"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
"vue/multi-word-component-names": "off"
},
parserOptions: {
parser: "babel-eslint"
parser: "@babel/eslint-parser"
}
};
2 changes: 1 addition & 1 deletion accounting/exchangeRate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let { DateTime } = require('luxon');
import { DateTime } from 'luxon';

export async function getExchangeRate({ fromCurrency, toCurrency, date }) {
if (!date) {
Expand Down
10 changes: 5 additions & 5 deletions accounting/importCOA.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const frappe = require('frappejs');
const countries = require('../fixtures/countryInfo.json');
const standardCOA = require('../fixtures/verified/standardCOA.json');
import frappe from 'frappejs';
import countries from '../fixtures/countryInfo.json';
import standardCOA from '../fixtures/verified/standardCOA.json';
const accountFields = [
'accountType',
'rootType',
Expand Down Expand Up @@ -57,14 +57,14 @@ async function getCountryCOA() {
const conCode = countries[doc.country].code;

try {
const countryCoa = require('../fixtures/verified/' + conCode + '.json');
const countryCoa = await import('../fixtures/verified/' + conCode + '.json');
return countryCoa.tree;
} catch (e) {
return standardCOA;
}
}

module.exports = async function importCharts() {
export default async function importCharts() {
const chart = await getCountryCOA();
await importAccounts(chart, '', '', true);
};
6 changes: 3 additions & 3 deletions accounting/ledgerPosting.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const frappe = require('frappejs');
const { round } = require('frappejs/utils/numberFormat');
import frappe from 'frappejs';
import { round } from 'frappejs/utils/numberFormat';

module.exports = class LedgerPosting {
export default class LedgerPosting {
constructor({ reference, party, date, description }) {
this.reference = reference;
this.party = party;
Expand Down
34 changes: 17 additions & 17 deletions accounting/utils.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module.exports = {
ledgerLink: {
label: 'Ledger Entries',
condition: doc => doc.submitted,
action: (doc, router) => {
router.push({
name: 'Report',
params: {
reportName: 'general-ledger',
defaultFilters: {
referenceType: doc.doctype,
referenceName: doc.name
}
}
});
}
}
export const ledgerLink = {
label: 'Ledger Entries',
condition: (doc) => doc.submitted,
action: (doc, router) => {
router.push({
name: 'Report',
params: {
reportName: 'general-ledger',
defaultFilters: {
referenceType: doc.doctype,
referenceName: doc.name,
},
},
});
},
};

export default { ledgerLink };
2 changes: 1 addition & 1 deletion build/notarize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { notarize } = require('electron-notarize');
import { notarize } from 'electron-notarize';

exports.default = async context => {
const { electronPlatformName, appOutDir } = context;
Expand Down
4 changes: 2 additions & 2 deletions fixtures/invoicePrint.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
doctype: "PrintFormat",
name: "Standard Invoice Format",
for: "SalesInvoice",
Expand Down Expand Up @@ -71,4 +71,4 @@ module.exports = {
{{ frappe.format(doc.terms, 'Text') }}
</div>
`
}
};
6 changes: 3 additions & 3 deletions fixtures/standardCOA.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const frappe = require('frappejs');
import frappe from 'frappejs';
const _ = frappe._.bind(frappe);

module.exports = {
export default {
[_("Application of Funds (Assets)")]: {
[_("Current Assets")]: {
[_("Accounts Receivable")]: {
Expand Down Expand Up @@ -170,4 +170,4 @@ module.exports = {
},
"rootType": "Equity"
}
}
};
7 changes: 4 additions & 3 deletions models/doctype/Account/Account.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const frappe = require('frappejs');
import frappe from 'frappejs';
import Account from './AccountDocument';

module.exports = {
export default {
name: 'Account',
label: 'Account',
doctype: 'DocType',
documentClass: require('./AccountDocument.js'),
documentClass: Account,
isSingle: 0,
isTree: 1,
keywordFields: ['name', 'rootType', 'accountType'],
Expand Down
6 changes: 3 additions & 3 deletions models/doctype/Account/AccountDocument.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const frappe = require('frappejs');
const BaseDocument = require('frappejs/model/document');
import frappe from 'frappejs';
import BaseDocument from 'frappejs/model/document';

module.exports = class Account extends BaseDocument {
export default class Account extends BaseDocument {
async validate() {
if (!this.accountType && this.parentAccount) {
this.accountType = await frappe.db.getValue(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
name: 'AccountingLedgerEntry',
label: 'Ledger Entry',
naming: 'autoincrement',
Expand Down
5 changes: 3 additions & 2 deletions models/doctype/AccountingSettings/AccountingSettings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const countryList = Object.keys(require('~/fixtures/countryInfo.json')).sort();
import countryInfo from '~/fixtures/countryInfo.json';

module.exports = {
const countryList = Object.keys(countryInfo).sort();
export default {
name: 'AccountingSettings',
label: 'Accounting Settings',
naming: 'name', // {random|autoincrement}
Expand Down
2 changes: 1 addition & 1 deletion models/doctype/Address/Address.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
name: 'Address',
doctype: 'DocType',
isSingle: 0,
Expand Down
2 changes: 1 addition & 1 deletion models/doctype/Color/Color.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
name: 'Color',
doctype: 'DocType',
fields: [
Expand Down
4 changes: 2 additions & 2 deletions models/doctype/CompanySettings/CompanySettings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
"name": "CompanySettings",
"label": "Company Settings",
"naming": "autoincrement",
Expand All @@ -24,4 +24,4 @@ module.exports = {
"target": "Address"
}
]
}
};
4 changes: 2 additions & 2 deletions models/doctype/Contact/Contact.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
"name": "Contact",
"doctype": "DocType",
"isSingle": 0,
Expand Down Expand Up @@ -78,4 +78,4 @@ module.exports = {
]
}
]
}
};
2 changes: 1 addition & 1 deletion models/doctype/Currency/Currency.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
name: 'Currency',
label: 'Currency',
doctype: 'DocType',
Expand Down
6 changes: 3 additions & 3 deletions models/doctype/Email/Email.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const frappe = require('frappejs');
import frappe from 'frappejs';

module.exports = {
export default {
"name": "Email",
"doctype": "DocType",
"pageSettings": {
Expand Down Expand Up @@ -69,4 +69,4 @@ module.exports = {
"hidden": 1,
}
]
}
};
6 changes: 3 additions & 3 deletions models/doctype/EmailAccount/EmailAccount.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const frappe = require('frappejs');
import frappe from 'frappejs';

module.exports = {
export default {
"name": "EmailAccount",
"label": "Email Account",
"doctype": "DocType",
Expand Down Expand Up @@ -56,4 +56,4 @@ module.exports = {
"default": "465"
}
]
}
};
6 changes: 3 additions & 3 deletions models/doctype/Event/Event.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { DateTime } = require('luxon');
const EventDocument = require('./EventDocument');
import { DateTime } from 'luxon';
import EventDocument from './EventDocument';

module.exports = {
export default {
name: 'Event',
doctype: 'DocType',
naming: 'random',
Expand Down
8 changes: 4 additions & 4 deletions models/doctype/Event/EventDocument.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const frappe = require('frappejs');
const BaseDocument = require('frappejs/model/document');
import frappe from 'frappejs';
import BaseDocument from 'frappejs/model/document';

module.exports = class Event extends BaseDocument {
export default class Event extends BaseDocument {
alertEvent() {
alert(this.title);
}
}
};
4 changes: 2 additions & 2 deletions models/doctype/EventSchedule/EventSchedule.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
name: 'EventSchedule',
doctype: 'DocType',
isChild: 1,
Expand All @@ -14,4 +14,4 @@ module.exports = {
fieldtype: 'Data',
},
]
}
};
4 changes: 2 additions & 2 deletions models/doctype/EventSettings/EventSettings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
"name": "EventSettings",
"label": "Event Settings",
"doctype": "DocType",
Expand All @@ -12,4 +12,4 @@ module.exports = {
fieldtype: "Check"
}
]
}
};
6 changes: 3 additions & 3 deletions models/doctype/Fulfillment/Fulfillment.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const model = require('frappejs/model');
const Quotation = require('../Quotation/Quotation');
import model from 'frappejs/model';
import Quotation from '../Quotation/Quotation';

module.exports = model.extend(Quotation, {
export default model.extend(Quotation, {
name: "Fulfillment",
label: "Fulfillment",
settings: "FulfillmentSettings",
Expand Down
6 changes: 3 additions & 3 deletions models/doctype/FulfillmentItem/FulfillmentItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const model = require('frappejs/model');
const QuotationItem = require('../QuotationItem/QuotationItem');
import model from 'frappejs/model';
import QuotationItem from '../QuotationItem/QuotationItem';

module.exports = model.extend(QuotationItem, {
export default model.extend(QuotationItem, {
name: "FulfillmentItem"
});
6 changes: 3 additions & 3 deletions models/doctype/FulfillmentSettings/FulfillmentSettings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const model = require('frappejs/model');
const QuotationSettings = require('../QuotationSettings/QuotationSettings');
import model from 'frappejs/model';
import QuotationSettings from '../QuotationSettings/QuotationSettings';

module.exports = model.extend(QuotationSettings, {
export default model.extend(QuotationSettings, {
"name": "FulfillmentSettings",
"label": "Fulfillment Settings",
"fields": [
Expand Down
7 changes: 4 additions & 3 deletions models/doctype/GSTR3B/GSTR3B.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const frappe = require('frappejs');
import frappe from 'frappejs';
import GSTR3B from './GSTR3BDocument.js';

module.exports = {
export default {
name: 'GSTR3B',
label: 'GSTR 3B',
doctype: 'DocType',
documentClass: require('./GSTR3BDocument.js'),
documentClass: GSTR3B,
print: {
printFormat: 'GSTR3B Print Format'
},
Expand Down
8 changes: 4 additions & 4 deletions models/doctype/GSTR3B/GSTR3BDocument.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const BaseDocument = require('frappejs/model/document');
const frappe = require('frappejs');
const { format } = require('./GSTR3BFormat');
import BaseDocument from 'frappejs/model/document';
import frappe from 'frappejs';
import format from './GSTR3BFormat';

module.exports = class GSTR3B extends BaseDocument {
export default class GSTR3B extends BaseDocument {
async getData() {
const monthIndex = [
'January',
Expand Down
8 changes: 2 additions & 6 deletions models/doctype/GSTR3B/GSTR3BFormat.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const format = {
export default {
gstin: '',
ret_period: '',
inward_sup: {
Expand Down Expand Up @@ -383,8 +383,4 @@ function generateHTML(data) {
</div>`;

return template;
}

module.exports = {
format
};
}
4 changes: 2 additions & 2 deletions models/doctype/GSTR3B/GSTR3BServer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const GSTR3B = require('./GSTR3BDocument');
import GSTR3B from './GSTR3BDocument';

module.exports = class GSTR3BServer extends GSTR3B {
export default class GSTR3BServer extends GSTR3B {
async validate() {
if (this.month.length === 0 || this.year.length != 4) {
frappe.call({
Expand Down
2 changes: 1 addition & 1 deletion models/doctype/GetStarted/GetStarted.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
name: 'GetStarted',
isSingle: 1,
fields: [
Expand Down
Loading

0 comments on commit c6c89c2

Please sign in to comment.