diff --git a/src/database/seeders/20211209204301-add-projects.js b/src/database/seeders/20211209204301-add-projects.js index 49ff6d52..09f886df 100644 --- a/src/database/seeders/20211209204301-add-projects.js +++ b/src/database/seeders/20211209204301-add-projects.js @@ -1,12 +1,12 @@ 'use strict'; -import ProjectStub from '../../models/projects/projects.stub.json' assert { type: 'json' }; -import CoBenifetStub from '../../models/co-benefits/co-benefits.stub.json' assert { type: 'json' }; -import RelatedProjectStub from '../../models/related-projects/related-projects.stub.json' assert { type: 'json' }; -import LabelStub from '../../models/labels/labels.stub.json' assert { type: 'json' }; -import RatingsStub from '../../models/ratings/ratings.stub.json' assert { type: 'json' }; -import IssuanceStub from '../../models/issuances/issuances.stub.json' assert { type: 'json' }; -import LocationsStub from '../../models/locations/locations.stub.json' assert { type: 'json' }; +import ProjectStub from '../../models/projects/projects.stub.json'; +import CoBenifetStub from '../../models/co-benefits/co-benefits.stub.json'; +import RelatedProjectStub from '../../models/related-projects/related-projects.stub.json'; +import LabelStub from '../../models/labels/labels.stub.json'; +import RatingsStub from '../../models/ratings/ratings.stub.json'; +import IssuanceStub from '../../models/issuances/issuances.stub.json'; +import LocationsStub from '../../models/locations/locations.stub.json'; export default { // eslint-disable-next-line no-unused-vars diff --git a/src/database/seeders/20211209205139-add-units.js b/src/database/seeders/20211209205139-add-units.js index 9e14ef76..ce68f87f 100644 --- a/src/database/seeders/20211209205139-add-units.js +++ b/src/database/seeders/20211209205139-add-units.js @@ -1,7 +1,7 @@ 'use strict'; -import UnitStub from '../../models/units/units.stub.json' assert { type: 'json' }; -import LabelUnitStub from '../../models/labelUnits/labelUnits.stub.json' assert { type: 'json' }; +import UnitStub from '../../models/units/units.stub.json'; +import LabelUnitStub from '../../models/labelUnits/labelUnits.stub.json'; export default { // eslint-disable-next-line no-unused-vars diff --git a/src/middleware.js b/src/middleware.js index 488fe349..9425debe 100644 --- a/src/middleware.js +++ b/src/middleware.js @@ -14,7 +14,7 @@ import { assertDataLayerAvailable, assertWalletIsAvailable, } from './utils/data-assertions'; -import packageJson from '../package.json' assert { type: 'json' }; +import packageJson from '../package.json'; import datalayer from './datalayer'; const { API_KEY, READ_ONLY, IS_GOVERNANCE_BODY, USE_SIMULATOR } = diff --git a/src/models/audit/audit.mock.js b/src/models/audit/audit.mock.js index 737b7e21..30ea0de6 100644 --- a/src/models/audit/audit.mock.js +++ b/src/models/audit/audit.mock.js @@ -1,4 +1,4 @@ -import stub from './audit.stub.json' assert { type: 'json' }; +import stub from './audit.stub.json'; export const AuditMock = { findAll: () => stub, diff --git a/src/models/co-benefits/co-benefits.mock.js b/src/models/co-benefits/co-benefits.mock.js index c8e973b3..55e27718 100644 --- a/src/models/co-benefits/co-benefits.mock.js +++ b/src/models/co-benefits/co-benefits.mock.js @@ -1,4 +1,4 @@ -import stub from './co-benefits.stub.json' assert { type: 'json' }; +import stub from './co-benefits.stub.json'; export const CoBenefitsMock = { findAll: () => stub, diff --git a/src/models/file-store/file-store.mock.js b/src/models/file-store/file-store.mock.js index 2c0a1e46..901dc1fb 100644 --- a/src/models/file-store/file-store.mock.js +++ b/src/models/file-store/file-store.mock.js @@ -1,4 +1,4 @@ -import stub from './file-store.stub.json' assert { type: 'json' }; +import stub from './file-store.stub.json'; export const FileStoreMock = { findAll: () => stub, diff --git a/src/models/issuances/issuances.mock.js b/src/models/issuances/issuances.mock.js index 70265eab..063795c3 100644 --- a/src/models/issuances/issuances.mock.js +++ b/src/models/issuances/issuances.mock.js @@ -1,4 +1,4 @@ -import stub from './issuances.stub.json' assert { type: 'json' }; +import stub from './issuances.stub.json'; export const IssuanceMock = { findAll: () => stub, diff --git a/src/models/labelUnits/labelUnits.mock.js b/src/models/labelUnits/labelUnits.mock.js index a37e0c48..6c35c4f7 100644 --- a/src/models/labelUnits/labelUnits.mock.js +++ b/src/models/labelUnits/labelUnits.mock.js @@ -1,4 +1,4 @@ -import stub from './labelUnits.stub.json' assert { type: 'json' }; +import stub from './labelUnits.stub.json'; export const LabelUnitsMock = { findAll: () => stub, diff --git a/src/models/labels/labels.mock.js b/src/models/labels/labels.mock.js index d945e1a7..1d6499d0 100644 --- a/src/models/labels/labels.mock.js +++ b/src/models/labels/labels.mock.js @@ -1,4 +1,4 @@ -import stub from './labels.stub.json' assert { type: 'json' }; +import stub from './labels.stub.json'; export const LabelsMock = { findAll: () => stub, diff --git a/src/models/locations/locations.mock.js b/src/models/locations/locations.mock.js index d5ceb84a..b720a55e 100644 --- a/src/models/locations/locations.mock.js +++ b/src/models/locations/locations.mock.js @@ -1,4 +1,4 @@ -import stub from './locations.stub.json' assert { type: 'json' }; +import stub from './locations.stub.json'; export const LocationMock = { findAll: () => stub, diff --git a/src/models/meta/meta.mock.js b/src/models/meta/meta.mock.js index 52ef8df1..2bae4c24 100644 --- a/src/models/meta/meta.mock.js +++ b/src/models/meta/meta.mock.js @@ -1,4 +1,4 @@ -import stub from './meta.stub.json' assert { type: 'json' }; +import stub from './meta.stub.json'; export const MetaMock = { findAll: () => stub, diff --git a/src/models/organizations/organizations.mock.js b/src/models/organizations/organizations.mock.js index e72e2d20..fbff4564 100644 --- a/src/models/organizations/organizations.mock.js +++ b/src/models/organizations/organizations.mock.js @@ -1,4 +1,4 @@ -import stub from './organizations.stub.json' assert { type: 'json' }; +import stub from './organizations.stub.json'; export const OrganizationMock = { findAll: () => stub, diff --git a/src/models/projects/projects.mock.js b/src/models/projects/projects.mock.js index 76e086df..4902024a 100644 --- a/src/models/projects/projects.mock.js +++ b/src/models/projects/projects.mock.js @@ -1,4 +1,4 @@ -import stub from './projects.stub.json' assert { type: 'json' }; +import stub from './projects.stub.json'; export const ProjectMock = { findAll: ({ limit, offset }) => stub.slice(offset * limit, (offset + 1) * limit), diff --git a/src/models/ratings/ratings.mock.js b/src/models/ratings/ratings.mock.js index 9e73d508..3dc7356d 100644 --- a/src/models/ratings/ratings.mock.js +++ b/src/models/ratings/ratings.mock.js @@ -1,4 +1,4 @@ -import stub from './ratings.stub.json' assert { type: 'json' }; +import stub from './ratings.stub.json'; export const RatingMock = { findAll: () => stub, diff --git a/src/models/related-projects/related-projects.mock.js b/src/models/related-projects/related-projects.mock.js index cae4b5d3..af21c4d5 100644 --- a/src/models/related-projects/related-projects.mock.js +++ b/src/models/related-projects/related-projects.mock.js @@ -1,4 +1,4 @@ -import stub from './related-projects.stub.json' assert { type: 'json' }; +import stub from './related-projects.stub.json'; export const RelatedProjectMock = { findAll: () => stub, diff --git a/src/models/simulator/simulator.mock.js b/src/models/simulator/simulator.mock.js index 65b2a0b8..ee10f672 100644 --- a/src/models/simulator/simulator.mock.js +++ b/src/models/simulator/simulator.mock.js @@ -1,4 +1,4 @@ -import stub from './simulator.stub.json' assert { type: 'json' }; +import stub from './simulator.stub.json'; export const SimulatorMock = { findAll: () => stub, diff --git a/src/models/staging/staging.mock.js b/src/models/staging/staging.mock.js index cb2d1ca1..96d2618c 100644 --- a/src/models/staging/staging.mock.js +++ b/src/models/staging/staging.mock.js @@ -1,4 +1,4 @@ -import stub from './staging.stub.json' assert { type: 'json' }; +import stub from './staging.stub.json'; export const StagingMock = { findAll: () => stub, diff --git a/src/models/units/units.mock.js b/src/models/units/units.mock.js index 8703b70b..b27b3782 100644 --- a/src/models/units/units.mock.js +++ b/src/models/units/units.mock.js @@ -1,4 +1,4 @@ -import stub from './units.stub.json' assert { type: 'json' }; +import stub from './units.stub.json'; export const UnitMock = { findAll: ({ limit, offset }) => stub.slice(offset * limit, (offset + 1) * limit), diff --git a/src/utils/config-loader.js b/src/utils/config-loader.js index dea44378..a5afb83a 100644 --- a/src/utils/config-loader.js +++ b/src/utils/config-loader.js @@ -7,7 +7,7 @@ import path from 'path'; import { logger } from '../config/logger.cjs'; import { getDataModelVersion } from './helpers'; -import defaultConfig from './defaultConfig.json' assert { type: 'json' }; +import defaultConfig from './defaultConfig.json'; export const getConfig = _.memoize(() => { const homeDir = os.homedir(); diff --git a/src/utils/helpers.js b/src/utils/helpers.js index 758101a7..cbe17922 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -4,7 +4,7 @@ import _ from 'lodash'; import { isPluralized } from './string-utils.js'; import { formatModelAssociationName } from './model-utils.js'; -import packageJson from '../../package.json' assert { type: 'json' }; +import packageJson from '../../package.json'; export const paginationParams = (page, limit) => { if (page === undefined || limit === undefined) { diff --git a/tests/resources/projects.spec.js b/tests/resources/projects.spec.js index b2fa78f2..dd300271 100644 --- a/tests/resources/projects.spec.js +++ b/tests/resources/projects.spec.js @@ -4,7 +4,7 @@ import * as testFixtures from '../test-fixtures'; import sinon from 'sinon'; import datalayer from '../../src/datalayer'; const { expect } = chai; -import newProject from '../test-data/new-project.json' assert { type: 'json' }; +import newProject from '../test-data/new-project.json'; import supertest from 'supertest'; import app from '../../src/server'; import { Organization } from '../../src/models/organizations/index.js'; diff --git a/tests/resources/staging.spec.js b/tests/resources/staging.spec.js index cd85cb4a..2b4398be 100644 --- a/tests/resources/staging.spec.js +++ b/tests/resources/staging.spec.js @@ -1,6 +1,6 @@ import app from '../../src/server'; import supertest from 'supertest'; -import newProject from '../test-data/new-project.json' assert { type: 'json' }; +import newProject from '../test-data/new-project.json'; import { pullPickListValues } from '../../src/utils/data-loaders'; import { expect } from 'chai'; import { prepareDb } from '../../src/database'; diff --git a/tests/resources/units.spec.js b/tests/resources/units.spec.js index 1c3f4b2d..82b08c14 100644 --- a/tests/resources/units.spec.js +++ b/tests/resources/units.spec.js @@ -8,7 +8,7 @@ import app from '../../src/server'; import * as testFixtures from '../test-fixtures'; import datalayer from '../../src/datalayer'; import { prepareDb } from '../../src/database'; -import newUnit from '../test-data/new-unit.json' assert { type: 'json' }; +import newUnit from '../test-data/new-unit.json'; import { pullPickListValues } from '../../src/utils/data-loaders'; const TEST_WAIT_TIME = datalayer.POLLING_INTERVAL * 2; diff --git a/tests/test-fixtures/project-fixtures.js b/tests/test-fixtures/project-fixtures.js index c6128250..ff63fa83 100644 --- a/tests/test-fixtures/project-fixtures.js +++ b/tests/test-fixtures/project-fixtures.js @@ -5,8 +5,8 @@ import chai from 'chai'; const { expect } = chai; import app from '../../src/server'; -import newProject from '../test-data/new-project.json' assert { type: 'json' }; -import updateProjectJson from '../test-data/update-project.json' assert { type: 'json' }; +import newProject from '../test-data/new-project.json'; +import updateProjectJson from '../test-data/update-project.json'; import { ProjectMirror, Project } from '../../src/models'; export const createNewProject = async (payload = newProject) => { diff --git a/tests/test-fixtures/unit-fixtures.js b/tests/test-fixtures/unit-fixtures.js index 0b8b233d..c297fee8 100644 --- a/tests/test-fixtures/unit-fixtures.js +++ b/tests/test-fixtures/unit-fixtures.js @@ -5,8 +5,8 @@ import chai from 'chai'; const { expect } = chai; import app from '../../src/server'; -import newUnit from '../test-data/new-unit.json' assert { type: 'json' }; -import updateUnitJson from '../test-data/update-unit.json' assert { type: 'json' }; +import newUnit from '../test-data/new-unit.json'; +import updateUnitJson from '../test-data/update-unit.json'; import { UnitMirror, Unit } from '../../src/models'; export const createNewUnit = async (payload = newUnit) => {