🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@babel/plugin-syntax-pipeline-operator

Package Overview
Dependencies
Maintainers
4
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-pipeline-operator - npm Package Compare versions

Comparing version
8.0.0-rc.6
to
8.0.0
+1
-1
lib/index.js

@@ -10,3 +10,3 @@ import { declare } from '@babel/helper-plugin-utils';

}) => {
api.assertVersion("^7.0.0-0 || ^8.0.0 || 8.0.0-rc.6");
api.assertVersion("^7.0.0-0 || ^8.0.0");
if (typeof proposal !== "string" || !PIPELINE_PROPOSALS.includes(proposal)) {

@@ -13,0 +13,0 @@ const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", ");

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\n\nconst PIPELINE_PROPOSALS = [\"fsharp\", \"hack\"] as const;\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"] as const;\nconst documentationURL =\n \"https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator\";\n\nexport interface Options {\n proposal: (typeof PIPELINE_PROPOSALS)[number];\n topicToken?: (typeof TOPIC_TOKENS)[number];\n}\n\nexport default declare((api, { proposal, topicToken }: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.0-0 || ^8.0.0\"));\n\n if (typeof proposal !== \"string\" || !PIPELINE_PROPOSALS.includes(proposal)) {\n const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin requires a \"proposal\" option. \"proposal\" must be one of: ${proposalList}. See <${documentationURL}>.`,\n );\n }\n\n if (proposal === \"hack\" && !TOPIC_TOKENS.includes(topicToken!)) {\n const topicTokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin in \"proposal\": \"hack\" mode also requires a \"topicToken\" option. \"topicToken\" must be one of: ${topicTokenList}. See <${documentationURL}>.`,\n );\n }\n\n return {\n name: \"syntax-pipeline-operator\",\n\n manipulateOptions(opts, parserOpts) {\n // Add parser options.\n parserOpts.plugins.push([\"pipelineOperator\", { proposal, topicToken }]);\n\n // Add generator options.\n opts.generatorOpts.topicToken = topicToken;\n },\n };\n});\n"],"names":["PIPELINE_PROPOSALS","TOPIC_TOKENS","documentationURL","declare","api","proposal","topicToken","assertVersion","includes","proposalList","map","p","join","Error","topicTokenList","t","name","manipulateOptions","opts","parserOpts","plugins","push","generatorOpts"],"mappings":";;AAEA,MAAMA,kBAAkB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAU;AACtD,MAAMC,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AACzD,MAAMC,gBAAgB,GACpB,oEAAoE;AAOtE,cAAeC,OAAO,CAAC,CAACC,GAAG,EAAE;EAAEC,QAAQ;AAAEC,EAAAA;AAAoB,CAAC,KAAK;EACjEF,GAAG,CAACG,aAAa,CAAA,kCAAuC,CAAC;AAEzD,EAAA,IAAI,OAAOF,QAAQ,KAAK,QAAQ,IAAI,CAACL,kBAAkB,CAACQ,QAAQ,CAACH,QAAQ,CAAC,EAAE;AAC1E,IAAA,MAAMI,YAAY,GAAGT,kBAAkB,CAACU,GAAG,CAACC,CAAC,IAAI,CAAA,CAAA,EAAIA,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IACrE,MAAM,IAAIC,KAAK,CACb,CAAA,6EAAA,EAAgFJ,YAAY,CAAA,OAAA,EAAUP,gBAAgB,IACxH,CAAC;AACH,EAAA;EAEA,IAAIG,QAAQ,KAAK,MAAM,IAAI,CAACJ,YAAY,CAACO,QAAQ,CAACF,UAAW,CAAC,EAAE;AAC9D,IAAA,MAAMQ,cAAc,GAAGb,YAAY,CAACS,GAAG,CAACK,CAAC,IAAI,CAAA,CAAA,EAAIA,CAAC,GAAG,CAAC,CAACH,IAAI,CAAC,IAAI,CAAC;IACjE,MAAM,IAAIC,KAAK,CACb,CAAA,iHAAA,EAAoHC,cAAc,CAAA,OAAA,EAAUZ,gBAAgB,IAC9J,CAAC;AACH,EAAA;EAEA,OAAO;AACLc,IAAAA,IAAI,EAAE,0BAA0B;AAEhCC,IAAAA,iBAAiBA,CAACC,IAAI,EAAEC,UAAU,EAAE;AAElCA,MAAAA,UAAU,CAACC,OAAO,CAACC,IAAI,CAAC,CAAC,kBAAkB,EAAE;QAAEhB,QAAQ;AAAEC,QAAAA;AAAW,OAAC,CAAC,CAAC;AAGvEY,MAAAA,IAAI,CAACI,aAAa,CAAChB,UAAU,GAAGA,UAAU;AAC5C,IAAA;GACD;AACH,CAAC,CAAC;;;;"}
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\n\nconst PIPELINE_PROPOSALS = [\"fsharp\", \"hack\"] as const;\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"] as const;\nconst documentationURL =\n \"https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator\";\n\nexport interface Options {\n proposal: (typeof PIPELINE_PROPOSALS)[number];\n topicToken?: (typeof TOPIC_TOKENS)[number];\n}\n\nexport default declare((api, { proposal, topicToken }: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.0-0 || ^8.0.0\"));\n\n if (typeof proposal !== \"string\" || !PIPELINE_PROPOSALS.includes(proposal)) {\n const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin requires a \"proposal\" option. \"proposal\" must be one of: ${proposalList}. See <${documentationURL}>.`,\n );\n }\n\n if (proposal === \"hack\" && !TOPIC_TOKENS.includes(topicToken!)) {\n const topicTokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n throw new Error(\n `The pipeline plugin in \"proposal\": \"hack\" mode also requires a \"topicToken\" option. \"topicToken\" must be one of: ${topicTokenList}. See <${documentationURL}>.`,\n );\n }\n\n return {\n name: \"syntax-pipeline-operator\",\n\n manipulateOptions(opts, parserOpts) {\n // Add parser options.\n parserOpts.plugins.push([\"pipelineOperator\", { proposal, topicToken }]);\n\n // Add generator options.\n opts.generatorOpts.topicToken = topicToken;\n },\n };\n});\n"],"names":[],"mappings":";;AAEA,MAAM,kBAAkB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAU;AACtD,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AACzD,MAAM,gBAAgB,GACpB,oEAAoE;AAOtE,cAAe,OAAO,CAAC,CAAC,GAAG,EAAE;EAAE,QAAQ;AAAE,EAAA;AAAoB,CAAC,KAAK;EACjE,GAAG,CAAC,aAAa,CAAA,oBAAuC,CAAC;AAEzD,EAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC1E,IAAA,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA,CAAA,EAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACrE,MAAM,IAAI,KAAK,CACb,CAAA,6EAAA,EAAgF,YAAY,CAAA,OAAA,EAAU,gBAAgB,IACxH,CAAC;AACH,EAAA;EAEA,IAAI,QAAQ,KAAK,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAW,CAAC,EAAE;AAC9D,IAAA,MAAM,cAAc,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA,CAAA,EAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACjE,MAAM,IAAI,KAAK,CACb,CAAA,iHAAA,EAAoH,cAAc,CAAA,OAAA,EAAU,gBAAgB,IAC9J,CAAC;AACH,EAAA;EAEA,OAAO;AACL,IAAA,IAAI,EAAE,0BAA0B;AAEhC,IAAA,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE;AAElC,MAAA,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE;QAAE,QAAQ;AAAE,QAAA;AAAW,OAAC,CAAC,CAAC;AAGvE,MAAA,IAAI,CAAC,aAAa,CAAC,UAAU,GAAG,UAAU;AAC5C,IAAA;GACD;AACH,CAAC,CAAC;;;;"}
{
"name": "@babel/plugin-syntax-pipeline-operator",
"version": "8.0.0-rc.6",
"version": "8.0.0",
"description": "Allow parsing of the pipeline operator",

@@ -20,9 +20,9 @@ "repository": {

"dependencies": {
"@babel/helper-plugin-utils": "^8.0.0-rc.6"
"@babel/helper-plugin-utils": "^8.0.0"
},
"peerDependencies": {
"@babel/core": "^8.0.0-rc.6"
"@babel/core": "^8.0.0"
},
"devDependencies": {
"@babel/core": "^8.0.0-rc.6"
"@babel/core": "^8.0.0"
},

@@ -29,0 +29,0 @@ "engines": {