Skip to content

Commit c9a9e38

Browse files
committed
chore: cleaned packages's package.json
wip(feathers-localforage): Migrate feathers-localforage to this monorepo #7
1 parent 69b75c9 commit c9a9e38

10 files changed

Lines changed: 76 additions & 2017 deletions

File tree

packages/feathers-keycloak-listener/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"type": "module",
66
"exports": {
77
".": {
8+
"development": "./src/index.js",
89
"import": "./dist/index.js",
910
"require": "./dist/index.cjs"
1011
}

packages/feathers-localforage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# feathers-localforage
22

3-
__
3+
_A FeathersJS client side service based on localforage that persists to IndexedDB, WebSQL, or LocalStorage_
44

55
---
66

Lines changed: 33 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,49 @@
11
{
22
"name": "@kalisio/feathers-localforage",
3-
"version": "1.2.0",
43
"description": "A FeathersJS client side service based on localforage that persists to IndexedDB, WebSQL, or LocalStorage",
4+
"version": "1.2.0",
5+
"type": "module",
6+
"exports": {
7+
".": {
8+
"development": "./src/index.js",
9+
"import": "./dist/index.mjs",
10+
"require": "./dist/index.cjs"
11+
}
12+
},
13+
"files": [
14+
"dist"
15+
],
16+
"standard": {
17+
"ignore": [
18+
"dist/**"
19+
]
20+
},
21+
"scripts": {
22+
"build": "vite build",
23+
"lint": "standard --fix",
24+
"test": "vitest run --coverage"
25+
},
526
"keywords": [
6-
"feathers",
7-
"feathers-plugin",
8-
"feathersjs-offline",
27+
"feathersjs",
28+
"locaforage",
929
"offline-first",
1030
"mobile"
1131
],
1232
"author": {
13-
"name": "Feathersjs-offline contributors",
14-
"email": "feathersjs-offline@hillerstrom.name",
15-
"url": "https://github.com/feathersjs-offline"
33+
"name": "KALISIO <contact@kalisio.com>",
34+
"url": "https://github.com/kalisio"
1635
},
17-
"contributors": [
18-
{
19-
"name": "Kalisio contributors",
20-
"url": "https://github.com/kalisio"
21-
}
22-
],
23-
"bugs": {
24-
"url": "https://github.com/feathersjs-offline/localforage/issues"
25-
},
26-
"homepage": "https://github.com/feathersjs-offline/localforage",
36+
"contributors": [],
2737
"license": "MIT",
28-
"main": "lib/feathers-localforage.js",
29-
"type": "module",
30-
"directories": {
31-
"src": "src",
32-
"lib": "lib",
33-
"test": "test"
34-
},
35-
"files": [
36-
"src",
37-
"lib"
38-
],
39-
"funding": {
40-
"type": "opencollective",
41-
"url": "https://opencollective.com/feathers"
42-
},
4338
"repository": {
4439
"type": "git",
45-
"url": "git://github.com/feathersjs-offline/localforage.git"
40+
"url": "git://github.com/kalisio/feathers-ekosystem.git",
41+
"directory": "packages/feathers-localforage"
4642
},
47-
"engines": {
48-
"node": ">= 12"
49-
},
50-
"standard": {
51-
"ignore": ["lib/"]
52-
},
53-
"scripts": {
54-
"test": "npm run vitest",
55-
"vitest": "vitest run",
56-
"test:watch": "vitest",
57-
"lint": "standard --fix",
58-
"prepublish": "npm run build",
59-
"publish": "git push origin --tags && git push origin",
60-
"build": "vite build",
61-
"release:patch": "npm version --force patch && npm publish --access public",
62-
"release:minor": "npm version --force minor && npm publish --access public",
63-
"release:major": "npm version --force major && npm publish --access public"
43+
"bugs": {
44+
"url": "https://github.com/kalisio/feathers-ekosystem/issues"
6445
},
46+
"homepage": "https://kalisio.github.io/feathers-ekosystem/packages/feathers-locaforage",
6547
"dependencies": {
6648
"@feathersjs/adapter-commons": "catalog:",
6749
"@feathersjs/commons": "catalog:",
@@ -78,21 +60,11 @@
7860
"@types/debug": "catalog:",
7961
"@types/express": "catalog:",
8062
"@types/node": "catalog:",
81-
"chai": "catalog:",
8263
"core-js": "catalog:",
83-
"cross-env": "catalog:",
84-
"eslint-config-standard": "catalog:",
8564
"fs-extra": "catalog:",
8665
"npm-check-updates": "catalog:",
87-
"nyc": "catalog:",
88-
"parallel-webpack": "catalog:",
89-
"shx": "catalog:",
9066
"ts-node": "catalog:",
9167
"tslint": "catalog:",
92-
"typescript": "catalog:",
93-
"vite": "catalog:",
94-
"vite-plugin-node-polyfills": "catalog:",
95-
"webpack": "catalog:",
96-
"webpack-merge": "catalog:"
68+
"typescript": "catalog:"
9769
}
9870
}

packages/feathers-localforage/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,6 @@ export class Service extends Adapter {
379379
return this._remove(id, params)
380380
}
381381
}
382-
export default function init (options) {
382+
export function init (options) {
383383
return new Service(options)
384-
};
384+
}

packages/feathers-localforage/test/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import { describe, it, beforeEach, afterAll, afterEach } from 'vitest'
12
import adapterTests from '@feathersjs/adapter-tests'
23
import errors from '@feathersjs/errors'
34
import { feathers } from '@feathersjs/feathers'
45
import assert from 'assert'
56
import service from '../src/index.js'
6-
import { describe, it, beforeEach, afterAll, afterEach } from 'vitest'
77

88
const testSuite = adapterTests([
99
'.options',
Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
import { dirname, resolve } from 'node:path'
2-
import path from 'path'
3-
import fs from 'fs-extra'
41
import { fileURLToPath } from 'node:url'
5-
import { defineConfig } from 'vite'
6-
import { nodePolyfills } from 'vite-plugin-node-polyfills'
2+
import { builtinModules } from 'node:module'
3+
import path from 'node:path'
4+
import { defineConfig, mergeConfig } from 'vite'
5+
import { baseConfig } from '../../vite.base-config'
76

8-
const __dirname = dirname(fileURLToPath(import.meta.url))
9-
const packageInfo = fs.readJsonSync(path.join(__dirname, 'package.json'))
7+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
108

11-
export default defineConfig({
12-
plugins: [nodePolyfills({})],
13-
test: {
14-
globals: true,
15-
environment: 'node'
16-
},
9+
export default mergeConfig(baseConfig, defineConfig({
10+
root: __dirname,
1711
build: {
18-
outDir: './lib',
19-
minify: false,
20-
emptyOutDir: true,
21-
rollupOptions: {
22-
// Make sure to externalize deps that shouldn't be bundled into your library
23-
external: Object.keys(packageInfo.dependencies)
24-
},
2512
lib: {
26-
entry: resolve(__dirname, './src/index.js'),
27-
name: '@kalisio/feathers-localforage',
28-
// the proper extensions will be added
29-
fileName: 'feathers-localforage'
13+
entry: 'src/index.js',
14+
formats: ['es', 'cjs'],
15+
fileName: (format) => format === 'es' ? 'index.mjs' : 'index.cjs'
16+
},
17+
rollupOptions: {
18+
external: [
19+
...builtinModules,
20+
...builtinModules.map(m => `node:${m}`),
21+
/@feathersjs\//,
22+
'debug',
23+
'localforage',
24+
'sift'
25+
]
3026
}
3127
}
32-
})
28+
}))

packages/feathers-localforage/vitest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
88
export default mergeConfig(baseConfig, defineConfig({
99
root: __dirname,
1010
test: {
11-
name: 'feathers-distributed',
11+
name: 'feathers-localforage',
1212
globals: true,
1313
environment: 'node',
1414
setupFiles: ['./vitest.setup.js'],

packages/feathers-s3/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
"type": "module",
66
"exports": {
77
"./server": {
8+
"development": "./src/server/index.js",
89
"import": "./dist/server.mjs",
910
"require": "./dist/server.cjs"
1011
},
1112
"./client": {
13+
"development": "./src/client/index.js",
1214
"import": "./dist/client.mjs",
1315
"require": "./dist/client.cjs"
1416
}

packages/feathers-webpush/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
"type": "module",
66
"exports": {
77
"./server": {
8+
"development": "./src/server/index.js",
89
"import": "./dist/server.mjs",
910
"require": "./dist/server.cjs"
1011
},
1112
"./client": {
13+
"development": "./src/client/index.js",
1214
"import": "./dist/client.mjs",
1315
"require": "./dist/client.cjs"
1416
}

0 commit comments

Comments
 (0)