From d23f5ec3f15258701e85f1020426da4ee2919be7 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 20 Sep 2023 18:32:12 -0700 Subject: [PATCH] remove cruft packages (uri, nsid, identifier) (#1606) * remove @atproto/nsid (previously moved to syntax) * remove @atproto/uri (previously moved to syntax) * remove @atproto/identifier (previously moved to syntax) * bump lockfile to remove old packages --------- Co-authored-by: Eric Bailey --- packages/identifier/CHANGELOG.md | 8 ------- packages/identifier/README.md | 22 ------------------ packages/identifier/babel.config.js | 1 - packages/identifier/build.js | 14 ----------- packages/identifier/jest.config.js | 6 ----- packages/identifier/package.json | 24 ------------------- packages/identifier/src/index.ts | 25 -------------------- packages/identifier/tsconfig.build.json | 4 ---- packages/identifier/tsconfig.json | 10 -------- packages/nsid/CHANGELOG.md | 8 ------- packages/nsid/README.md | 31 ------------------------- packages/nsid/babel.config.js | 1 - packages/nsid/build.js | 14 ----------- packages/nsid/jest.config.js | 6 ----- packages/nsid/package.json | 24 ------------------- packages/nsid/src/index.ts | 6 ----- packages/nsid/tsconfig.build.json | 4 ---- packages/nsid/tsconfig.json | 8 ------- packages/uri/CHANGELOG.md | 8 ------- packages/uri/README.md | 18 -------------- packages/uri/babel.config.js | 1 - packages/uri/build.js | 14 ----------- packages/uri/jest.config.js | 6 ----- packages/uri/package.json | 24 ------------------- packages/uri/src/index.ts | 6 ----- packages/uri/tsconfig.build.json | 4 ---- packages/uri/tsconfig.json | 13 ----------- pnpm-lock.yaml | 18 -------------- 28 files changed, 328 deletions(-) delete mode 100644 packages/identifier/CHANGELOG.md delete mode 100644 packages/identifier/README.md delete mode 100644 packages/identifier/babel.config.js delete mode 100644 packages/identifier/build.js delete mode 100644 packages/identifier/jest.config.js delete mode 100644 packages/identifier/package.json delete mode 100644 packages/identifier/src/index.ts delete mode 100644 packages/identifier/tsconfig.build.json delete mode 100644 packages/identifier/tsconfig.json delete mode 100644 packages/nsid/CHANGELOG.md delete mode 100644 packages/nsid/README.md delete mode 100644 packages/nsid/babel.config.js delete mode 100644 packages/nsid/build.js delete mode 100644 packages/nsid/jest.config.js delete mode 100644 packages/nsid/package.json delete mode 100644 packages/nsid/src/index.ts delete mode 100644 packages/nsid/tsconfig.build.json delete mode 100644 packages/nsid/tsconfig.json delete mode 100644 packages/uri/CHANGELOG.md delete mode 100644 packages/uri/README.md delete mode 100644 packages/uri/babel.config.js delete mode 100644 packages/uri/build.js delete mode 100644 packages/uri/jest.config.js delete mode 100644 packages/uri/package.json delete mode 100644 packages/uri/src/index.ts delete mode 100644 packages/uri/tsconfig.build.json delete mode 100644 packages/uri/tsconfig.json diff --git a/packages/identifier/CHANGELOG.md b/packages/identifier/CHANGELOG.md deleted file mode 100644 index f01512f9e96..00000000000 --- a/packages/identifier/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# @atproto/identifier - -## 0.2.1 - -### Patch Changes - -- Updated dependencies [[`b1dc3555`](https://github.com/bluesky-social/atproto/commit/b1dc355504f9f2e047093dc56682b8034518cf80)]: - - @atproto/syntax@0.1.1 diff --git a/packages/identifier/README.md b/packages/identifier/README.md deleted file mode 100644 index cfbd0ac5cc6..00000000000 --- a/packages/identifier/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Identifier - -Validation logic for AT identifiers - DIDs & Handles - -## Usage - -```typescript -import * as identifier from '@atproto/identifier' - -isValidHandle('alice.test') // returns true -ensureValidHandle('alice.test') // returns void - -isValidHandle('al!ce.test') // returns false -ensureValidHandle('al!ce.test') // throws - -ensureValidDid('did:method:val') // returns void -ensureValidDid(':did:method:val') // throws -``` - -## License - -MIT diff --git a/packages/identifier/babel.config.js b/packages/identifier/babel.config.js deleted file mode 100644 index 0126e9dbaa6..00000000000 --- a/packages/identifier/babel.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../babel.config.js') diff --git a/packages/identifier/build.js b/packages/identifier/build.js deleted file mode 100644 index e880ae9930b..00000000000 --- a/packages/identifier/build.js +++ /dev/null @@ -1,14 +0,0 @@ -const { nodeExternalsPlugin } = require('esbuild-node-externals') - -const buildShallow = - process.argv.includes('--shallow') || process.env.ATP_BUILD_SHALLOW === 'true' - -require('esbuild').build({ - logLevel: 'info', - entryPoints: ['src/index.ts'], - bundle: true, - sourcemap: true, - outdir: 'dist', - platform: 'node', - plugins: buildShallow ? [nodeExternalsPlugin()] : [], -}) diff --git a/packages/identifier/jest.config.js b/packages/identifier/jest.config.js deleted file mode 100644 index 096d01562c4..00000000000 --- a/packages/identifier/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -const base = require('../../jest.config.base.js') - -module.exports = { - ...base, - displayName: 'Identifier', -} diff --git a/packages/identifier/package.json b/packages/identifier/package.json deleted file mode 100644 index 074da48a9fc..00000000000 --- a/packages/identifier/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@atproto/identifier", - "version": "0.2.1", - "main": "src/index.ts", - "publishConfig": { - "main": "dist/index.js", - "types": "dist/index.d.ts" - }, - "scripts": { - "test": "true", - "build": "node ./build.js", - "postbuild": "tsc --build tsconfig.build.json", - "update-main-to-dist": "node ../../update-main-to-dist.js packages/identifier" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/bluesky-social/atproto.git", - "directory": "packages/identifier" - }, - "dependencies": { - "@atproto/syntax": "workspace:^" - } -} diff --git a/packages/identifier/src/index.ts b/packages/identifier/src/index.ts deleted file mode 100644 index a590a9da09c..00000000000 --- a/packages/identifier/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -export { - ATP_URI_REGEX, - AtUri, - DISALLOWED_TLDS, - DisallowedDomainError, - INVALID_HANDLE, - InvalidDidError, - InvalidHandleError, - InvalidNsidError, - NSID, - ReservedHandleError, - UnsupportedDomainError, - ensureValidAtUri, - ensureValidAtUriRegex, - ensureValidDid, - ensureValidDidRegex, - ensureValidHandle, - ensureValidHandleRegex, - ensureValidNsid, - ensureValidNsidRegex, - isValidHandle, - isValidTld, - normalizeAndEnsureValidHandle, - normalizeHandle, -} from '@atproto/syntax' diff --git a/packages/identifier/tsconfig.build.json b/packages/identifier/tsconfig.build.json deleted file mode 100644 index 02a84823b65..00000000000 --- a/packages/identifier/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/*.spec.ts", "**/*.test.ts"] -} diff --git a/packages/identifier/tsconfig.json b/packages/identifier/tsconfig.json deleted file mode 100644 index db7a7c4ad35..00000000000 --- a/packages/identifier/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist", // Your outDir, - "emitDeclarationOnly": true - }, - "include": ["./src", "__tests__/**/**.ts"], - "references": [{ "path": "../common/tsconfig.build.json" }] -} diff --git a/packages/nsid/CHANGELOG.md b/packages/nsid/CHANGELOG.md deleted file mode 100644 index b351d372ae5..00000000000 --- a/packages/nsid/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# @atproto/nsid - -## 0.1.1 - -### Patch Changes - -- Updated dependencies [[`b1dc3555`](https://github.com/bluesky-social/atproto/commit/b1dc355504f9f2e047093dc56682b8034518cf80)]: - - @atproto/syntax@0.1.1 diff --git a/packages/nsid/README.md b/packages/nsid/README.md deleted file mode 100644 index 180a88338bb..00000000000 --- a/packages/nsid/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# NameSpaced IDs (NSID) API - -## Usage - -```typescript -import { NSID } from '@atproto/nsid' - -const id1 = NSID.parse('com.example.foo') -id1.authority // => 'example.com' -id1.name // => 'foo' -id1.toString() // => 'com.example.foo' - -const id2 = NSID.create('example.com', 'foo') -id2.authority // => 'example.com' -id2.name // => 'foo' -id2.toString() // => 'com.example.foo' - -const id3 = NSID.create('example.com', 'someRecord') -id3.authority // => 'example.com' -id3.name // => 'someRecord' -id3.toString() // => 'com.example.someRecord' - -NSID.isValid('com.example.foo') // => true -NSID.isValid('com.example.someRecord') // => true -NSID.isValid('example.com/foo') // => false -NSID.isValid('foo') // => false -``` - -## License - -MIT diff --git a/packages/nsid/babel.config.js b/packages/nsid/babel.config.js deleted file mode 100644 index 0126e9dbaa6..00000000000 --- a/packages/nsid/babel.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../babel.config.js') diff --git a/packages/nsid/build.js b/packages/nsid/build.js deleted file mode 100644 index e880ae9930b..00000000000 --- a/packages/nsid/build.js +++ /dev/null @@ -1,14 +0,0 @@ -const { nodeExternalsPlugin } = require('esbuild-node-externals') - -const buildShallow = - process.argv.includes('--shallow') || process.env.ATP_BUILD_SHALLOW === 'true' - -require('esbuild').build({ - logLevel: 'info', - entryPoints: ['src/index.ts'], - bundle: true, - sourcemap: true, - outdir: 'dist', - platform: 'node', - plugins: buildShallow ? [nodeExternalsPlugin()] : [], -}) diff --git a/packages/nsid/jest.config.js b/packages/nsid/jest.config.js deleted file mode 100644 index 8dcec1ddc1e..00000000000 --- a/packages/nsid/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -const base = require('../../jest.config.base.js') - -module.exports = { - ...base, - displayName: 'NSID', -} diff --git a/packages/nsid/package.json b/packages/nsid/package.json deleted file mode 100644 index 8f0ce82f366..00000000000 --- a/packages/nsid/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@atproto/nsid", - "version": "0.1.1", - "main": "src/index.ts", - "publishConfig": { - "main": "dist/index.js", - "types": "dist/src/index.d.ts" - }, - "scripts": { - "test": "true", - "build": "node ./build.js", - "postbuild": "tsc --build tsconfig.build.json", - "update-main-to-dist": "node ../../update-main-to-dist.js packages/nsid" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/bluesky-social/atproto.git", - "directory": "packages/nsid" - }, - "dependencies": { - "@atproto/syntax": "workspace:^" - } -} diff --git a/packages/nsid/src/index.ts b/packages/nsid/src/index.ts deleted file mode 100644 index 7a2efe52465..00000000000 --- a/packages/nsid/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { - NSID, - ensureValidNsid, - ensureValidNsidRegex, - InvalidNsidError, -} from '@atproto/syntax' diff --git a/packages/nsid/tsconfig.build.json b/packages/nsid/tsconfig.build.json deleted file mode 100644 index 02a84823b65..00000000000 --- a/packages/nsid/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/*.spec.ts", "**/*.test.ts"] -} diff --git a/packages/nsid/tsconfig.json b/packages/nsid/tsconfig.json deleted file mode 100644 index fee83b7f23b..00000000000 --- a/packages/nsid/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist", // Your outDir, - "emitDeclarationOnly": true - }, - "include": ["./src", "__tests__/**/**.ts"] -} diff --git a/packages/uri/CHANGELOG.md b/packages/uri/CHANGELOG.md deleted file mode 100644 index b6bf96be8a1..00000000000 --- a/packages/uri/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# @atproto/uri - -## 0.1.1 - -### Patch Changes - -- Updated dependencies [[`b1dc3555`](https://github.com/bluesky-social/atproto/commit/b1dc355504f9f2e047093dc56682b8034518cf80)]: - - @atproto/syntax@0.1.1 diff --git a/packages/uri/README.md b/packages/uri/README.md deleted file mode 100644 index 8aaee47f7f2..00000000000 --- a/packages/uri/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# ATP URI API - -## Usage - -```typescript -import { AtUri } from '@atproto/uri' - -const uri = new AtUri('at://bob.com/com.example.post/1234') -uri.protocol // => 'at:' -uri.origin // => 'at://bob.com' -uri.hostname // => 'bob.com' -uri.collection // => 'com.example.post' -uri.rkey // => '1234' -``` - -## License - -MIT diff --git a/packages/uri/babel.config.js b/packages/uri/babel.config.js deleted file mode 100644 index 0126e9dbaa6..00000000000 --- a/packages/uri/babel.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../babel.config.js') diff --git a/packages/uri/build.js b/packages/uri/build.js deleted file mode 100644 index e880ae9930b..00000000000 --- a/packages/uri/build.js +++ /dev/null @@ -1,14 +0,0 @@ -const { nodeExternalsPlugin } = require('esbuild-node-externals') - -const buildShallow = - process.argv.includes('--shallow') || process.env.ATP_BUILD_SHALLOW === 'true' - -require('esbuild').build({ - logLevel: 'info', - entryPoints: ['src/index.ts'], - bundle: true, - sourcemap: true, - outdir: 'dist', - platform: 'node', - plugins: buildShallow ? [nodeExternalsPlugin()] : [], -}) diff --git a/packages/uri/jest.config.js b/packages/uri/jest.config.js deleted file mode 100644 index b2aa92b9eca..00000000000 --- a/packages/uri/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -const base = require('../../jest.config.base.js') - -module.exports = { - ...base, - displayName: 'URI', -} diff --git a/packages/uri/package.json b/packages/uri/package.json deleted file mode 100644 index 65664ff5634..00000000000 --- a/packages/uri/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@atproto/uri", - "version": "0.1.1", - "main": "src/index.ts", - "publishConfig": { - "main": "dist/index.js", - "types": "dist/index.d.ts" - }, - "scripts": { - "test": "true", - "build": "node ./build.js", - "postbuild": "tsc --build tsconfig.build.json", - "update-main-to-dist": "node ../../update-main-to-dist.js packages/uri" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/bluesky-social/atproto.git", - "directory": "packages/uri" - }, - "dependencies": { - "@atproto/syntax": "workspace:^" - } -} diff --git a/packages/uri/src/index.ts b/packages/uri/src/index.ts deleted file mode 100644 index 1c657b16049..00000000000 --- a/packages/uri/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { - ATP_URI_REGEX, - AtUri, - ensureValidAtUri, - ensureValidAtUriRegex, -} from '@atproto/syntax' diff --git a/packages/uri/tsconfig.build.json b/packages/uri/tsconfig.build.json deleted file mode 100644 index 02a84823b65..00000000000 --- a/packages/uri/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/*.spec.ts", "**/*.test.ts"] -} diff --git a/packages/uri/tsconfig.json b/packages/uri/tsconfig.json deleted file mode 100644 index 4faf3966f41..00000000000 --- a/packages/uri/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist", // Your outDir, - "emitDeclarationOnly": true - }, - "include": ["./src", "__tests__/**/**.ts"], - "references": [ - { "path": "../identifier/tsconfig.build.json" }, - { "path": "../nsid/tsconfig.build.json" } - ] -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb80b8c6a35..843e3acd27e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -387,12 +387,6 @@ importers: specifier: ^10.8.1 version: 10.8.2(@swc/core@1.3.42)(@types/node@18.17.8)(typescript@4.9.5) - packages/identifier: - dependencies: - '@atproto/syntax': - specifier: workspace:^ - version: link:../syntax - packages/identity: dependencies: '@atproto/common-web': @@ -466,12 +460,6 @@ importers: specifier: ^3.21.4 version: 3.21.4 - packages/nsid: - dependencies: - '@atproto/syntax': - specifier: workspace:^ - version: link:../syntax - packages/pds: dependencies: '@atproto/api': @@ -668,12 +656,6 @@ importers: specifier: workspace:^ version: link:../common-web - packages/uri: - dependencies: - '@atproto/syntax': - specifier: workspace:^ - version: link:../syntax - packages/xrpc: dependencies: '@atproto/lexicon':