diff --git a/package.json b/package.json index b29943fc567..ff91c62f684 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ ], "scripts": { "preinstall": "npx only-allow pnpm", - "build": "microbundle --compress --strict --raw", + "build": "microbundle --strict --raw", "browser": "gulp browser", "docs:build": "vitepress build docs", "docs:build:ci": "run-s build browser docs:build", diff --git a/test/address.spec.ts b/test/address.spec.ts index 7b615926959..ad7b2e22d1a 100644 --- a/test/address.spec.ts +++ b/test/address.spec.ts @@ -1,6 +1,6 @@ import type { JestMockCompat } from 'vitest'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('address', () => { describe('city()', () => { diff --git a/test/all_functional.spec.ts b/test/all_functional.spec.ts index 779d8335bd4..5783baaa9dd 100644 --- a/test/all_functional.spec.ts +++ b/test/all_functional.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; const IGNORED_MODULES = [ 'locales', diff --git a/test/animal.spec.ts b/test/animal.spec.ts index a2c63eab74e..4196c57fa7b 100644 --- a/test/animal.spec.ts +++ b/test/animal.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('animal', () => { describe('dog()', () => { diff --git a/test/commerce.spec.ts b/test/commerce.spec.ts index 4f3cde72167..3e0b01dbdcb 100644 --- a/test/commerce.spec.ts +++ b/test/commerce.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('commerce', () => { describe('color()', () => { diff --git a/test/company.spec.ts b/test/company.spec.ts index 4fe37eee513..1a92f68285c 100644 --- a/test/company.spec.ts +++ b/test/company.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('company', () => { describe('companyName()', () => { diff --git a/test/database.spec.ts b/test/database.spec.ts index 1d551339ce3..bc5550c09e7 100644 --- a/test/database.spec.ts +++ b/test/database.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('database', () => { describe('column()', () => { diff --git a/test/datatype.spec.ts b/test/datatype.spec.ts index 3831495177d..f0b4e341f04 100644 --- a/test/datatype.spec.ts +++ b/test/datatype.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('datatype', () => { describe('number', () => { diff --git a/test/date.spec.ts b/test/date.spec.ts index 8f7aa21447c..fa74e3c78d6 100644 --- a/test/date.spec.ts +++ b/test/date.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('date', () => { describe('past()', () => { diff --git a/test/fake.spec.ts b/test/fake.spec.ts index 6e04a3a1e58..8f46b40ba93 100644 --- a/test/fake.spec.ts +++ b/test/fake.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('fake', () => { describe('fake()', () => { diff --git a/test/finance.spec.ts b/test/finance.spec.ts index fb6b7f8782b..86fb50820b7 100644 --- a/test/finance.spec.ts +++ b/test/finance.spec.ts @@ -1,6 +1,6 @@ import type { JestMockCompat } from 'vitest'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; import { luhnCheck } from './support/luhnCheck'; faker.seed(1234); @@ -383,7 +383,7 @@ describe('finance', () => { }); describe('iban()', () => { - const ibanLib = require('../lib/iban').default; + const ibanLib = require('../dist/faker/iban').default; it('returns a random yet formally correct IBAN number', () => { const iban = // @ts-expect-error @@ -414,7 +414,7 @@ describe('finance', () => { }); describe('bic()', () => { - const ibanLib = require('../lib/iban').default; + const ibanLib = require('../dist/faker/iban').default; it('returns a random yet formally correct BIC number', () => { const bic = faker.finance.bic(); const expr = new RegExp( diff --git a/test/finance_iban.spec.ts b/test/finance_iban.spec.ts index 0a1f9e23f76..0c5d90dc06c 100644 --- a/test/finance_iban.spec.ts +++ b/test/finance_iban.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'vitest'; import { describe, it } from 'vitest'; -import { faker } from '../lib'; -import ibanLib from '../lib/iban'; +import { faker } from '../dist/faker'; +import ibanLib from '../dist/faker/iban'; function getAnIbanByCountry(countryCode) { let iban = @@ -99,7 +99,7 @@ describe('finance_iban.js', () => { // Account Code 16 digits // Total Length 24 chars - const ibanLib = require('../lib/iban').default; + const ibanLib = require('../dist/faker/iban').default; it('IBAN for Pakistan is correct', () => { faker.seed(28); @@ -163,7 +163,7 @@ describe('finance_iban.js', () => { // Chiffre d'indicatif national 0 // Numéro de compte bancaire 0519786457841326 - const ibanLib = require('../lib/iban').default; + const ibanLib = require('../dist/faker/iban').default; it('IBAN for Turkish is correct', () => { faker.seed(37); @@ -236,7 +236,7 @@ describe('finance_iban.js', () => { // example IBAN AZ21 NABZ 0000 0000 1370 1000 1944 - const ibanLib = require('../lib/iban').default; + const ibanLib = require('../dist/faker/iban').default; it('IBAN for Azerbaijan is correct', () => { faker.seed(21); diff --git a/test/git.spec.ts b/test/git.spec.ts index f8c776f2d6c..8ddd5281919 100644 --- a/test/git.spec.ts +++ b/test/git.spec.ts @@ -1,6 +1,6 @@ import type { JestMockCompat } from 'vitest'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('git.js', () => { describe('branch()', () => { diff --git a/test/helpers.spec.ts b/test/helpers.spec.ts index 65e040dca9f..d0d431d953d 100644 --- a/test/helpers.spec.ts +++ b/test/helpers.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; import { luhnCheck } from './support/luhnCheck'; describe('helpers.js', () => { diff --git a/test/image.spec.ts b/test/image.spec.ts index f585aa1e856..cab00e3cb94 100644 --- a/test/image.spec.ts +++ b/test/image.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('image', () => { describe('lorempicsum', () => { diff --git a/test/internet.spec.ts b/test/internet.spec.ts index 9df1e8053f8..943a6b6a21b 100644 --- a/test/internet.spec.ts +++ b/test/internet.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('internet.js', () => { describe('email()', () => { diff --git a/test/locales.spec.ts b/test/locales.spec.ts index 942d483798d..8b56faddf09 100644 --- a/test/locales.spec.ts +++ b/test/locales.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; // Remark: actual use of locales functionality is currently tested in all.functional.js test diff --git a/test/lorem.spec.ts b/test/lorem.spec.ts index b2f740daa4f..2ef6c4590a6 100644 --- a/test/lorem.spec.ts +++ b/test/lorem.spec.ts @@ -1,6 +1,6 @@ import type { JestMockCompat } from 'vitest'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('lorem.js', () => { describe('word()', () => { diff --git a/test/music.spec.ts b/test/music.spec.ts index a2351dfd797..84c3d461c4d 100644 --- a/test/music.spec.ts +++ b/test/music.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; faker.seed(1234); diff --git a/test/name.spec.ts b/test/name.spec.ts index b8f30ab2cc6..e0ca280a72a 100644 --- a/test/name.spec.ts +++ b/test/name.spec.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; function assertInArray(value: T, array: readonly T[]): void { const idx = array.indexOf(value); diff --git a/test/phone_number.spec.ts b/test/phone_number.spec.ts index 2aef409c0dd..5ee7319129f 100644 --- a/test/phone_number.spec.ts +++ b/test/phone_number.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('phone_number.js', () => { describe('phoneNumber()', () => { diff --git a/test/random.spec.ts b/test/random.spec.ts index f2e17a7e237..df6807de60d 100644 --- a/test/random.spec.ts +++ b/test/random.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; -import { Mersenne } from '../lib/mersenne'; +import { faker } from '../dist/faker'; +import { Mersenne } from '../dist/faker/mersenne'; const mersenne = new Mersenne(); diff --git a/test/system.spec.ts b/test/system.spec.ts index 5263a62fd4b..d4189d8efdf 100644 --- a/test/system.spec.ts +++ b/test/system.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('system', () => { describe('directoryPath()', () => { diff --git a/test/time.spec.ts b/test/time.spec.ts index 4ef28952318..4fdbcc50a7c 100644 --- a/test/time.spec.ts +++ b/test/time.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; faker.seed(1234); diff --git a/test/unique.spec.ts b/test/unique.spec.ts index 26b80bff825..7bac7825cbd 100644 --- a/test/unique.spec.ts +++ b/test/unique.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('unique', () => { describe('unique()', () => { diff --git a/test/vehicle.spec.ts b/test/vehicle.spec.ts index 57606d92387..f20cb9fea00 100644 --- a/test/vehicle.spec.ts +++ b/test/vehicle.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'vitest'; import { describe, it, vi } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('vehicle', () => { describe('vehicle()', () => { diff --git a/test/word.spec.ts b/test/word.spec.ts index 3790861c512..8b1a60df7ad 100644 --- a/test/word.spec.ts +++ b/test/word.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../lib'; +import { faker } from '../dist/faker'; describe('word', () => { const methods = [