From a6ff1995cc82d67e85848d6d1c22fac185c1ea85 Mon Sep 17 00:00:00 2001 From: Austin Turner Date: Sun, 16 Jun 2024 11:30:03 -0600 Subject: [PATCH 1/2] Fix release-it post command --- .release-it.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.release-it.json b/.release-it.json index 7d524c6..020c03f 100644 --- a/.release-it.json +++ b/.release-it.json @@ -8,6 +8,6 @@ "hooks": { "before:init": ["npm test"], "after:bump": "npm run build", - "after:release": "npm run copy-tc-to-docs && cd docs && npm install soql-parser-js@${version} && git add package*.json && git add static/sample-queries-json.json && git commit -m \"Updated docs version\" && git push && npm run deploy" + "after:release": "npm run copy-tc-to-docs && cd docs && npm install @jetstreamapp/soql-parser-js@${version} && git add package*.json && git add static/sample-queries-json.json && git commit -m \"Updated docs version\" && git push && npm run deploy" } } From dfb86892f5a3d32cc726af1260e07d68c280cea9 Mon Sep 17 00:00:00 2001 From: Austin Turner Date: Sun, 16 Jun 2024 11:45:46 -0600 Subject: [PATCH 2/2] Update import path in docs and readme --- CHANGELOG.md | 2 +- README.md | 16 ++++++++-------- docs/docs/examples.md | 14 +++++++------- docs/docs/overview.md | 6 +++--- docs/docusaurus.config.js | 2 +- docs/src/components/ComposeQueries/index.tsx | 2 +- .../ParseQueries/ParsedOutput/index.tsx | 2 +- docs/src/components/Utilities/index.tsx | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 116e470..50c027a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -644,7 +644,7 @@ Minified, uncompressed: - Version 2.0: **207kb** ```javascript -var soqlParser = require('soql-parser-js'); +var soqlParser = require('@jetstreamapp/soql-parser-js'); const query = soqlParser.parseQuery(`SELECT Id FROM Account WHERE Id = 'FOO'`); console.log('query', query); diff --git a/README.md b/README.md index 6699aa3..3b9a843 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ The **commander** dependency is only required for the cli, the other two depende ## Quick Start ```javascript -import { parseQuery, composeQuery, isQueryValid } from 'soql-parser-js'; +import { parseQuery, composeQuery, isQueryValid } from '@jetstreamapp/soql-parser-js'; const query = parseQuery(`SELECT Id FROM Account WHERE Id = 'FOO'`); console.log('query', query); @@ -125,7 +125,7 @@ Many of hte utility functions are provided to easily determine the shape of spec Parsing a SOQL query can be completed by calling `parseQuery(soqlQueryString)`. A `Query` data structure will be returned. ```typescript -import { parseQuery } from 'soql-parser-js'; +import { parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = ` SELECT UserId, COUNT(Id) @@ -189,7 +189,7 @@ console.log(JSON.stringify(soqlQuery, null, 2)); Added support for `allowPartialQuery` in version `4.4.0` ```typescript -import { parseQuery } from 'soql-parser-js'; +import { parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = ` WHERE LoginTime > 2010-09-20T22:16:30.000Z @@ -235,7 +235,7 @@ console.log(JSON.stringify(soqlQuery, null, 2)); ### Validating Queries ```typescript -import { isQueryValid } from 'soql-parser-js'; +import { isQueryValid } from '@jetstreamapp/soql-parser-js'; const invalidSoql = `SELECT UserId, COUNT(Id) Account`; const validSoql = `SELECT UserId, COUNT(Id) Account`; @@ -259,7 +259,7 @@ Some utility methods have been provided to make it easier to build the field dat **Note:** There are a number of fields populated on the Query object when `parseQuery()` is called that are not required to compose a query. Look at the examples below and the comments in the data model for more information. ```typescript -import { composeQuery, getField, Query } from 'soql-parser-js'; +import { composeQuery, getField, Query } from '@jetstreamapp/soql-parser-js'; // Build a subquery const oppLineItemsSubquery = { @@ -339,7 +339,7 @@ Starting in version `4.4`, compose will not fail if there are missing `SELECT` a Partial compose support it supported without any additional steps. ```typescript -import { Compose, parseQuery } from 'soql-parser-js'; +import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = `WHERE Name LIKE 'A%' AND MailingCity = 'California`; const parsedQuery = parseQuery(soql, { allowPartialQuery: true }); @@ -374,7 +374,7 @@ If you need to compose just a part of a query instead of the entire query, you c For example, if you just need the `WHERE` clause from a query as a string, you can do the following: ```typescript -import { Compose, parseQuery } from 'soql-parser-js'; +import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = `SELECT Id FROM Account WHERE Name = 'Foo'`; const parsedQuery = parseQuery(soql); @@ -430,7 +430,7 @@ This function is provided as a convenience and just calls parse and compose. [Check out the demo](https://jetstreamapp.github.io/soql-parser-js/) to see the outcome of the various format options. ```typescript -import { formatQuery } from 'soql-parser-js'; +import { formatQuery } from '@jetstreamapp/soql-parser-js'; const query = `SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy, ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type, Website, (SELECT Id, Name, AccountId, Amount, CampaignId, CloseDate, CreatedById, Type FROM Opportunities), (SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, Website FROM ChildAccounts) FROM Account WHERE Name LIKE 'a%' OR Name LIKE 'b%' OR Name LIKE 'c%'`; diff --git a/docs/docs/examples.md b/docs/docs/examples.md index e376a3b..41e7176 100644 --- a/docs/docs/examples.md +++ b/docs/docs/examples.md @@ -9,7 +9,7 @@ sidebar_position: 4 Parsing a SOQL query can be completed by calling `parseQuery(soqlQueryString)`. A `Query` data structure will be returned. ```typescript -import { parseQuery } from 'soql-parser-js'; +import { parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = ` SELECT UserId, COUNT(Id) @@ -71,7 +71,7 @@ console.log(JSON.stringify(soqlQuery, null, 2)); Added support for `allowPartialQuery` in version `4.4.0` ```typescript -import { parseQuery } from 'soql-parser-js'; +import { parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = ` WHERE LoginTime > 2010-09-20T22:16:30.000Z @@ -117,7 +117,7 @@ console.log(JSON.stringify(soqlQuery, null, 2)); ### Validating Queries ```typescript -import { isQueryValid } from 'soql-parser-js'; +import { isQueryValid } from '@jetstreamapp/soql-parser-js'; const invalidSoql = `SELECT UserId, COUNT(Id) Account`; const validSoql = `SELECT UserId, COUNT(Id) Account`; @@ -141,7 +141,7 @@ Some utility methods have been provided to make it easier to build the field dat **Note:** There are a number of fields populated on the Query object when `parseQuery()` is called that are not required to compose a query. Look at the examples below and the comments in the data model for more information. ```typescript -import { composeQuery, getField, Query } from 'soql-parser-js'; +import { composeQuery, getField, Query } from '@jetstreamapp/soql-parser-js'; // Build a subquery const oppLineItemsSubquery = { @@ -221,7 +221,7 @@ Starting in version `4.4`, compose will not fail if there are missing `SELECT` a Partial compose support it supported without any additional steps. ```typescript -import { Compose, parseQuery } from 'soql-parser-js'; +import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = `WHERE Name LIKE 'A%' AND MailingCity = 'California`; const parsedQuery = parseQuery(soql, { allowPartialQuery: true }); @@ -256,7 +256,7 @@ If you need to compose just a part of a query instead of the entire query, you c For example, if you just need the `WHERE` clause from a query as a string, you can do the following: ```typescript -import { Compose, parseQuery } from 'soql-parser-js'; +import { Compose, parseQuery } from '@jetstreamapp/soql-parser-js'; const soql = `SELECT Id FROM Account WHERE Name = 'Foo'`; const parsedQuery = parseQuery(soql); @@ -312,7 +312,7 @@ This function is provided as a convenience and just calls parse and compose. [Check out the demo](https://paustint.github.io/soql-parser-js/) to see the outcome of the various format options. ```typescript -import { formatQuery } from 'soql-parser-js'; +import { formatQuery } from '@jetstreamapp/soql-parser-js'; const query = `SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, BillingCity, BillingCountry, BillingGeocodeAccuracy, ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type, Website, (SELECT Id, Name, AccountId, Amount, CampaignId, CloseDate, CreatedById, Type FROM Opportunities), (SELECT Id, Name, AccountNumber, AccountSource, AnnualRevenue, BillingAddress, Website FROM ChildAccounts) FROM Account WHERE Name LIKE 'a%' OR Name LIKE 'b%' OR Name LIKE 'c%'`; diff --git a/docs/docs/overview.md b/docs/docs/overview.md index 6cc7155..30d35bf 100644 --- a/docs/docs/overview.md +++ b/docs/docs/overview.md @@ -22,7 +22,7 @@ These are the most common functions exported by the library: ## Parse a query ```typescript -import { parseQuery, Query } from 'soql-parser-js'; +import { parseQuery, Query } from '@jetstreamapp/soql-parser-js'; const query = parseQuery(`SELECT Id FROM Account WHERE Name = 'foo'`); @@ -53,7 +53,7 @@ console.log(query); Composing a query will take a query object and return a soql query. ```typescript -import { composeQuery, Query } from 'soql-parser-js'; +import { composeQuery, Query } from '@jetstreamapp/soql-parser-js'; const query = { fields: [ @@ -85,7 +85,7 @@ console.log(soql); You can use the `getField` helper function to simplify the field generation. Read the api docs for more information. ```typescript -import { composeQuery, getField } from 'soql-parser-js'; +import { composeQuery, getField } from '@jetstreamapp/soql-parser-js'; const soql = composeQuery({ fields: [ diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 7b32cfe..66ad1a8 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -17,7 +17,7 @@ const config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: 'jetstreamapp', - projectName: 'soql-parser-js', + projectName: '@jetstreamapp/soql-parser-js', deploymentBranch: 'gh-pages', trailingSlash: false, diff --git a/docs/src/components/ComposeQueries/index.tsx b/docs/src/components/ComposeQueries/index.tsx index cd5d0e1..4500480 100644 --- a/docs/src/components/ComposeQueries/index.tsx +++ b/docs/src/components/ComposeQueries/index.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; import React, { useEffect, useState } from 'react'; -import { composeQuery, parseQuery } from 'soql-parser-js'; +import { composeQuery, parseQuery } from '@jetstreamapp/soql-parser-js'; import ParsedOutput from './ParsedOutput'; import QueryInput from './QueryInput'; diff --git a/docs/src/components/ParseQueries/ParsedOutput/index.tsx b/docs/src/components/ParseQueries/ParsedOutput/index.tsx index 00ebad4..336e0fb 100644 --- a/docs/src/components/ParseQueries/ParsedOutput/index.tsx +++ b/docs/src/components/ParseQueries/ParsedOutput/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { parseQuery, Query } from 'soql-parser-js'; +import { parseQuery, Query } from '@jetstreamapp/soql-parser-js'; export interface ParsedOutputProps { query: string; diff --git a/docs/src/components/Utilities/index.tsx b/docs/src/components/Utilities/index.tsx index 9022621..fae56b3 100644 --- a/docs/src/components/Utilities/index.tsx +++ b/docs/src/components/Utilities/index.tsx @@ -32,7 +32,7 @@ import { ValueWithDateLiteralCondition, ValueWithDateNLiteralCondition, WhereClause, -} from 'soql-parser-js'; +} from '@jetstreamapp/soql-parser-js'; const sampleQuery: Query = { fields: [